| Total Complexity | 6 |
| Total Lines | 60 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | class User |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | * |
||
| 22 | * @Id |
||
| 23 | * @Column(type="string", length=64) |
||
| 24 | */ |
||
| 25 | protected $id; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var Collection|Store[] |
||
| 29 | * |
||
| 30 | * @OneToMany(targetEntity="Store", mappedBy="user") |
||
| 31 | */ |
||
| 32 | protected $stores; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param string $id |
||
| 36 | */ |
||
| 37 | public function __construct(string $id) |
||
| 38 | { |
||
| 39 | $this->id = $id; |
||
| 40 | |||
| 41 | $this->stores = new ArrayCollection(); |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | public function getId(): string |
||
| 48 | { |
||
| 49 | return $this->id; |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @param Store[] $stores |
||
| 54 | */ |
||
| 55 | public function setStores(array $stores) |
||
| 60 | } |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @param Store $store |
||
| 65 | */ |
||
| 66 | public function addStore(Store $store) |
||
| 67 | { |
||
| 68 | $this->stores->add($store); |
||
| 69 | } |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @return Collection|Store[] |
||
| 73 | */ |
||
| 74 | public function getStores(): Collection |
||
| 77 | } |
||
| 78 | } |
||
| 79 |