<commit_before><?php
/**
 * Author: <NAME>
 * Date: 9/24/14
 * Dime
 */

namespace Dime\InvoiceBundle\Entity;

use Dime\TimetrackerBundle\Entity\Entity;
use Dime\TimetrackerBundle\Entity\StandardDiscount;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Gedmo\Mapping\Annotation as Gedmo;
use JMS\Serializer\Annotation as JMS;
use Doctrine\Common\Collections\ArrayCollection;
use Dime\TimetrackerBundle\Model\DimeEntityInterface;
use Knp\JsonSchemaBundle\Annotations as Json;

/**
 * Class Invoice
 * @package Dime\InvoiceBundle\Entity
 *
 * @ORM\Table(name="invoices")
 * @ORM\Entity(repositoryClass="Dime\InvoiceBundle\Entity\InvoiceRepository")
 * @ORM\HasLifecycleCallbacks()
 * @Json\Schema("invoices")
 */
class Invoice extends Entity implements DimeEntityInterface
{
	/**
	 * @var string $name
	 *
	 * @Assert\NotBlank()
	 * @ORM\Column(type="string", length=255)
	 */
	protected $name;

	/**
	 * @var string $alias
	 *
	 * @Assert\NotBlank()
	 * @Gedmo\Slug(fields={"name"})
	 * @ORM\Column(type="string", length=30)
	 */
	protected $alias;

	/**
	 * @var string
	 * @ORM\Column(type="text")
	 */
	protected $description;

	/**
	 * @var \Dime\TimetrackerBundle\Entity\Project
	 * @ORM\ManyToOne(targetEntity="Dime\TimetrackerBundle\Entity\Project")
	 */
	protected $project;

	/**
	 * @var \Dime\OfferBundle\Entity\Offer
	 * @ORM\ManyToOne(targetEntity="Dime\OfferBundle\Entity\Offer")
	 */
	protected $offer;

	/**
	 * @var float
	 * @ORM\Column(type="decimal", scale=2, precision=4, nullable=true)
	 */
	protected $gross;

	/**
	 * @var ArrayCollection
	 * @ORM\OneToMany(targetEntity="Dime\InvoiceBundle\Entity\InvoiceItem", mappedBy="invoice", cascade={"all"})
	 */
	protected $items;

	/**
	 * @var ArrayCollection
	 * @ORM\ManyToMany(targetEntity="Dime\InvoiceBundle\Entity\InvoiceDiscount", cascade={"all"})
	 * @ORM\JoinTable(name="invoice_invoicediscounts",
	 *      joinColumns={@ORM\JoinColumn(name="invoice_id", referencedColumnName="id")},
	 *      inverseJoinColumns={@ORM\JoinColumn(name="invoicediscount_id", referencedColumnName="id", unique=true)}
	 *      )
	 */
	protected $invoiceDiscounts;

	/**
	 * @var ArrayCollection
	 * @ORM\ManyToMany(targetEntity="Dime\TimetrackerBundle\Entity\StandardDiscount")
	 * @ORM\JoinTable(name="invoice_standard_discounts",
	 *      joinColumns={@ORM\JoinColumn(name="invoice_id", referencedColumnName="id")},
	 *      inverseJoinColumns={@ORM\JoinColumn(name="standard_discount_id", referencedColumnName="id", unique=true)}
	 *      )
	 */
	protected $standardDiscounts;

	/**
	 * @var ArrayCollection $tags
	 *
	 * @JMS\Type("array")
	 * @JMS\SerializedName("tags")
	 * @ORM\ManyToMany(targetEntity="Dime\TimetrackerBundle\Entity\Tag", cascade="all")
	 * @ORM\JoinTable(name="invoice_tags")
	 */
	protected $tags;


	public function __construct()<commit_msg>Fixed: Missing SerializerNames and some Copy-Paste Errors.<commit_after><?php
/**
 * Author: <NAME>
 * Date: 9/24/14
 * Dime
 */

namespace Dime\InvoiceBundle\Entity;

use Dime\TimetrackerBundle\Entity\Entity;
use Dime\TimetrackerBundle\Entity\StandardDiscount;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Gedmo\Mapping\Annotation as Gedmo;
use JMS\Serializer\Annotation as JMS;
use Doctrine\Common\Collections\ArrayCollection;
use Dime\TimetrackerBundle\Model\DimeEntityInterface;
use Knp\JsonSchemaBundle\Annotations as Json;

/**
 * Class Invoice
 * @package Dime\InvoiceBundle\Entity
 *
 * @ORM\Table(name="invoices")
 * @ORM\Entity(repositoryClass="Dime\InvoiceBundle\Entity\InvoiceRepository")
 * @ORM\HasLifecycleCallbacks()
 * @Json\Schema("invoices")
 */
class Invoice extends Entity implements DimeEntityInterface
{
	/**
	 * @var string $name
	 *
	 * @Assert\NotBlank()
	 * @ORM\Column(type="string", length=255)
	 */
	protected $name;

	/**
	 * @var string $alias
	 *
	 * @Assert\NotBlank()
	 * @Gedmo\Slug(fields={"name"})
	 * @ORM\Column(type="string", length=30)
	 */
	protected $alias;

	/**
	 * @var string
	 * @ORM\Column(type="text")
	 */
	protected $description;

	/**
	 * @var \Dime\TimetrackerBundle\Entity\Project
	 * @ORM\ManyToOne(targetEntity="Dime\TimetrackerBundle\Entity\Project")
	 */
	protected $project;

	/**
	 * @var \Dime\OfferBundle\Entity\Offer
	 * @ORM\ManyToOne(targetEntity="Dime\OfferBundle\Entity\Offer")
	 */
	protected $offer;

	/**
	 * @var float
	 * @ORM\Column(type="decimal", scale=2, precision=4, nullable=true)
	 */
	protected $gross;

	/**
	 * @var ArrayCollection
	 * @ORM\OneToMany(targetEntity="Dime\InvoiceBundle\Entity\InvoiceItem", mappedBy="invoice", cascade={"all"})
	 */
	protected $items;

	/**
	 * @var ArrayCollection
	 * @ORM\ManyToMany(targetEntity="Dime\InvoiceBundle\Entity\InvoiceDiscount", cascade={"all"})
	 * @ORM\JoinTable(name="invoice_invoicediscounts",
	 *      joinColumns={@ORM\JoinColumn(name="invoice_id", referencedColumnName="id")},
	 *      inverseJoinColumns={@ORM\JoinColumn(name="invoicediscount_id", referencedColumnName="id", unique=true)}
	 *      )
	 * @JMS\SerializedName("invoiceDiscounts")
	 */
	protected $invoiceDiscounts;

	/**
	 * @var ArrayCollection
	 * @ORM\ManyToMany(targetEntity="Dime\TimetrackerBundle\Entity\StandardDiscount")
	 * @ORM\JoinTable(name="invoice_standard_discounts",
	 *      joinColumns={@ORM\JoinColumn(name="invoice_id", referencedColumnName="id")},
	 *      inverseJoinColumns={@ORM\JoinColumn(name="standard_discount_id", referencedColumnName="id", unique=true)}
	 *      )
	 * @JMS\SerializedName("standardDiscounts")
	 */
	protected $standardDiscounts;

	/**
	 * @var ArrayCollection $tags
	 *
	 * @JMS\Type("array")
	 * @JMS\SerializedName("tags")
	 * @ORM\ManyToMany(targetEntity="Dime\TimetrackerBundle\Entity\Tag", cascade="all")
	 * @ORM\JoinTable(name="invoice_tags")
	 */
	protected $tags;


	public function __construct()
{'fraction_non_alphanumeric': 0.15933878663940013, 'fraction_numerical': 0.00408997955010225, 'mean_word_length': 4.93427704752275, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5478638', 'n_tokens_mistral': 2098, 'n_tokens_neox': 1936, 'n_words': 273}