Hi Guys,
I am having a wired duplication on a single file, which I am sure there is no duplication and I can't get that's wrong with it.
By removing --fuzzy parameter seems to be working, but I would like to use it.
Can you please help?
Command:
phpcpd --fuzzy '/var/www/test/Brand.php'
Expected result:
No clones found.
Actual result:
Found 1 clones with 251 duplicated lines in 1 files:
- /var/www/test/Brand.php:31-282 (251 lines)
/var/www/test/Brand.php:40-291
86.25% duplicated lines out of 291 total lines of code.
Average size of duplication is 251 lines, largest clone has 251 of lines
Time: 00:00, Memory: 4.00 MB
File Content:
<?php
namespace CoreBundle\Entity\Company;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation as JMS;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* Class Brand
*
* @ORM\Entity(repositoryClass="CoreBundle\Repository\Company\BrandRepository")
* @ORM\Table(name="brand")
*
* @package CoreBundle\Entity\Company
*/
class Brand
{
/* Algolia index name */
const ALGOLIA_INDEX_NAME = 'BRAND';
/**
* @var int $id
*
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @var string $name
*
* @ORM\Column(name="name", type="string", length=32)
*
* @Gedmo\Translatable(fallback=true)
*/
protected $name;
/**
* @var string $nameAr
*
* @JMS\SerializedName("name_ar")
* @JMS\Groups({"searchable"})
*/
protected $nameAr;
/**
* @var string $slug
*
* @ORM\Column(name="slug", type="string")
*
* @Gedmo\Slug(fields={"name"}, updatable=false)
*/
protected $slug;
/**
* @var bool $enabled
*
* @ORM\Column(name="enabled", type="boolean", options={"default":1})
*/
protected $enabled;
/**
* @var bool $autoConfirmOrder
*
* @ORM\Column(name="auto_confirm_order", type="boolean", options={"default":0})
*/
protected $autoConfirmOrder;
/**
* @var bool $cashPaymentAllowed
*
* @ORM\Column(name="cash_payment_allowed", type="boolean", options={"default":0})
*/
protected $cashPaymentAllowed;
/**
* @var bool $nutritionalEnabled
*
* @ORM\Column(name="nutritional_enabled", type="boolean", options={"default":0})
*/
protected $nutritionalEnabled;
/**
* @var bool $loyaltyEnabled
*
* @ORM\Column(name="loyalty_enabled", type="boolean", options={"default":0})
*/
protected $loyaltyEnabled;
/**
* @var int $invoicePrintCopies
*
* @ORM\Column(name="invoice_print_copies", type="smallint", options={"default":2})
*/
protected $invoicePrintCopies;
/**
* @var bool $aggregate
*
* @ORM\Column(name="aggregate", type="boolean", options={"default":0})
*/
protected $aggregate;
/**
* @var \DateTime $aggregateDate
*
* @ORM\Column(name="aggregate_date", type="date", nullable=true)
*/
protected $aggregateDate;
/**
* @var \DateTime $firstOrderDate
*
* @ORM\Column(name="first_order_date", type="date", nullable=true)
*/
protected $firstOrderDate;
/**
* @var \DateTime $lastOrderDate
*
* @ORM\Column(name="last_order_date", type="date", nullable=true)
*/
protected $lastOrderDate;
/**
* @var bool $supermarket
*
* @ORM\Column(name="supermarket", type="boolean", options={"default":0})
*/
protected $supermarket;
/**
* @var MediaEntity $logo
*
* @ORM\OneToOne(targetEntity="CoreBundle\Entity\Media", cascade={"persist"})
* @ORM\JoinColumn(name="logo_media_id", referencedColumnName="id")
*/
protected $logo;
/**
* @var string $publicImageUrl
*
* @JMS\SerializedName("image_url")
* @JMS\Groups({"searchable"})
*/
protected $publicImageUrl;
/**
* @var MediaEntity $photo
*
* @ORM\OneToOne(targetEntity="CoreBundle\Entity\Media", cascade={"persist"})
* @ORM\JoinColumn(name="photo_media_id", referencedColumnName="id")
*/
protected $photo;
/**
* @var MediaEntity $productPhoto
*
* @ORM\ManyToOne(targetEntity="CoreBundle\Entity\Media", cascade={"persist"})
* @ORM\JoinColumn(name="product_photo_media_id", referencedColumnName="id")
*/
protected $productPhoto;
/**
* @var \DateTime $closingHour
*
* @ORM\Column(name="closing_hour", type="time")
*/
protected $closingHour;
/**
* @var bool $vThruTwilioTaskQueue
*
* @ORM\Column(name="vthru_twilio_task_queue", type="boolean")
*/
protected $vThruTwilioTaskQueue;
/**
* @var string $twilioTaskQueueSid
*
* @ORM\Column(name="twilio_task_queue_sid", type="text", nullable=true)
*/
protected $twilioTaskQueueSid;
/**
* @var string $compensationEmails
*
* @ORM\Column(name="compensation_emails", type="string", nullable=true)
*/
protected $compensationEmails;
/**
* @deprecated
* @var string
*
* @ORM\Column(name="gateway_destination_id", type="string", nullable=true)
*/
protected $gatewayDestinationId;
/**
* @var FeeEntity $fee
*
* @ORM\OneToOne(targetEntity="CoreBundle\Entity\Company\Brand\Fee", inversedBy="brand", cascade={"persist"})
*/
protected $fee;
/**
* @var BrandEntity\Financial $financial
*
* @ORM\OneToOne(targetEntity="CoreBundle\Entity\Company\Brand\Financial", inversedBy="brand", cascade={"persist"})
*/
protected $financial;
/**
* @var LoyaltyEntity $loyalty
*
* @ORM\OneToOne(targetEntity="CoreBundle\Entity\Company\Brand\Loyalty", cascade={"persist"})
* @ORM\JoinColumn(name="loyalty_id", referencedColumnName="id", nullable=true)
*/
protected $loyalty;
/**
* @var ArrayCollection $loyalties
*
* @ORM\OneToMany(targetEntity="CoreBundle\Entity\Company\Brand\Loyalty", mappedBy="brand", cascade={"persist"})
*/
protected $loyalties;
/**
* @var CompanyEntity $company
*
* @ORM\ManyToOne(targetEntity="CoreBundle\Entity\Company", inversedBy="brands")
* @ORM\JoinColumn(name="company_id", referencedColumnName="id")
*/
protected $company;
/**
* @var ArrayCollection $stores
*
* @ORM\OneToMany(targetEntity="CoreBundle\Entity\Company\Brand\Store", mappedBy="brand")
*/
protected $stores;
/**
* @var ArrayCollection $products
*
* @ORM\OneToMany(targetEntity="CoreBundle\Entity\Product", mappedBy="brand")
*/
protected $products;
/**
* @var ArrayCollection $categories
*
* @ORM\OneToMany(targetEntity="CoreBundle\Entity\Product\Category", mappedBy="brand")
*/
protected $categories;
/**
* @var ArrayCollection $tags
*
* @ORM\ManyToMany(targetEntity="CoreBundle\Entity\Company\Brand\Tag", mappedBy="brands")
*/
protected $tags;
/**
* @var WebsiteEntity $website
*
* @ORM\OneToOne(targetEntity="CoreBundle\Entity\Company\Brand\Website", inversedBy="brand", cascade={"persist"})
*/
protected $website;
/**
* @var IntegrationEntity $integration
*
* @ORM\OneToOne(targetEntity="IntegrationBundle\Entity\Integration")
* @ORM\JoinColumn(name="integration_id", referencedColumnName="id")
*/
protected $integration;
/**
* @deprecated
* @var string $tapDestResponse
*
* @ORM\Column(name="tap_dest_response", type="text", nullable=true)
*/
protected $tapDestResponse;
}