Skip to content

Commit 38c419b

Browse files
committed
CS Fix - example
1 parent dfc0383 commit 38c419b

1 file changed

Lines changed: 141 additions & 179 deletions

File tree

src/Entity/ItemType.php

Lines changed: 141 additions & 179 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<?php declare(strict_types=1);
2-
1+
<?php declare(strict_types = 1);
32

43
namespace App\Entity;
54

@@ -12,181 +11,144 @@
1211
*/
1312
class ItemType
1413
{
15-
/**
16-
* @var UuidInterface
17-
*
18-
* @ORM\Id
19-
* @ORM\Column(type="uuid", unique=true)
20-
*/
21-
protected $id;
22-
23-
/**
24-
* @var string
25-
* @ORM\Column(type="string", length=255)
26-
*/
27-
protected $commonName;
28-
29-
/**
30-
* @var string|null
31-
* @ORM\Column(type="string", length=1023, nullable=true)
32-
*/
33-
protected $officialName;
34-
35-
/**
36-
* @var int|null
37-
* @ORM\Column(type="integer", nullable=true)
38-
*/
39-
protected $basicRentalPrice;
40-
41-
/**
42-
* @var string|null
43-
* @ORM\Column(type="string", nullable=true)
44-
*/
45-
protected $productPageUrl;
46-
47-
/**
48-
* @var string|null
49-
* @TODO How to handle files
50-
* @ORM\Column(type="string", nullable=true)
51-
*/
52-
protected $avatar;
53-
54-
/**
55-
* @var string[]
56-
* @TODO How to handle files
57-
* @ORM\Column(type="json_array", nullable=true)
58-
*/
59-
protected $attachments;
60-
61-
/**
62-
* Weight in grams.
63-
*
64-
* @var int|null
65-
* @ORM\Column(type="integer", nullable=true)
66-
*/
67-
protected $weight;
68-
69-
/**
70-
* ItemType constructor.
71-
*
72-
* @param string $commonName
73-
*/
74-
public function __construct(string $commonName)
75-
{
76-
$this->commonName = $commonName;
77-
$this->id = Uuid::uuid4();
78-
}
79-
80-
/**
81-
* @return string
82-
*/
83-
public function getCommonName(): string
84-
{
85-
return $this->commonName;
86-
}
87-
88-
/**
89-
* @param string $commonName
90-
*/
91-
public function setCommonName(string $commonName): void
92-
{
93-
$this->commonName = $commonName;
94-
}
95-
96-
/**
97-
* @return null|string
98-
*/
99-
public function getOfficialName(): ?string
100-
{
101-
return $this->officialName;
102-
}
103-
104-
/**
105-
* @param null|string $officialName
106-
*/
107-
public function setOfficialName(?string $officialName): void
108-
{
109-
$this->officialName = $officialName;
110-
}
111-
112-
/**
113-
* @return int|null
114-
*/
115-
public function getBasicRentalPrice(): ?int
116-
{
117-
return $this->basicRentalPrice;
118-
}
119-
120-
/**
121-
* @param int|null $basicRentalPrice
122-
*/
123-
public function setBasicRentalPrice(?int $basicRentalPrice): void
124-
{
125-
$this->basicRentalPrice = $basicRentalPrice;
126-
}
127-
128-
/**
129-
* @return null|string
130-
*/
131-
public function getProductPageUrl(): ?string
132-
{
133-
return $this->productPageUrl;
134-
}
135-
136-
/**
137-
* @param null|string $productPageUrl
138-
*/
139-
public function setProductPageUrl(?string $productPageUrl): void
140-
{
141-
$this->productPageUrl = $productPageUrl;
142-
}
143-
144-
/**
145-
* @return null|string
146-
*/
147-
public function getAvatar(): ?string
148-
{
149-
return $this->avatar;
150-
}
151-
152-
/**
153-
* @param null|string $avatar
154-
*/
155-
public function setAvatar(?string $avatar): void
156-
{
157-
$this->avatar = $avatar;
158-
}
159-
160-
/**
161-
* @return string[]
162-
*/
163-
public function getAttachments(): array
164-
{
165-
return $this->attachments;
166-
}
167-
168-
/**
169-
* @param string[] $attachments
170-
*/
171-
public function setAttachments(array $attachments): void
172-
{
173-
$this->attachments = $attachments;
174-
}
175-
176-
/**
177-
* @return int|null
178-
*/
179-
public function getWeight(): ?int
180-
{
181-
return $this->weight;
182-
}
183-
184-
/**
185-
* @param int|null $weight
186-
*/
187-
public function setWeight(?int $weight): void
188-
{
189-
$this->weight = $weight;
190-
}
191-
14+
/**
15+
* @var UuidInterface
16+
*
17+
* @ORM\Id
18+
* @ORM\Column(type="Uuid", unique=true)
19+
*/
20+
protected $id;
21+
22+
/**
23+
* @var string
24+
* @ORM\Column(type="string", length=255)
25+
*/
26+
protected $commonName;
27+
28+
/**
29+
* @var string|null
30+
* @ORM\Column(type="string", length=1023, nullable=true)
31+
*/
32+
protected $officialName;
33+
34+
/**
35+
* @var int|null
36+
* @ORM\Column(type="integer", nullable=true)
37+
*/
38+
protected $basicRentalPrice;
39+
40+
/**
41+
* @var string|null
42+
* @ORM\Column(type="string", nullable=true)
43+
*/
44+
protected $productPageUrl;
45+
46+
/**
47+
* @var string|null
48+
* @TODO How to handle files
49+
* @ORM\Column(type="string", nullable=true)
50+
*/
51+
protected $avatar;
52+
53+
/**
54+
* @var string[]
55+
* @TODO How to handle files
56+
* @ORM\Column(type="json_array", nullable=true)
57+
*/
58+
protected $attachments;
59+
60+
/**
61+
* Weight in grams.
62+
*
63+
* @var int|null
64+
* @ORM\Column(type="integer", nullable=true)
65+
*/
66+
protected $weight;
67+
68+
/**
69+
* ItemType constructor.
70+
*
71+
* @param string $commonName
72+
*/
73+
public function __construct(string $commonName)
74+
{
75+
$this->commonName = $commonName;
76+
$this->id = Uuid::uuid4();
77+
}
78+
79+
public function getCommonName(): string
80+
{
81+
return $this->commonName;
82+
}
83+
84+
public function setCommonName(string $commonName): void
85+
{
86+
$this->commonName = $commonName;
87+
}
88+
89+
public function getOfficialName(): ?string
90+
{
91+
return $this->officialName;
92+
}
93+
94+
public function setOfficialName(?string $officialName): void
95+
{
96+
$this->officialName = $officialName;
97+
}
98+
99+
public function getBasicRentalPrice(): ?int
100+
{
101+
return $this->basicRentalPrice;
102+
}
103+
104+
public function setBasicRentalPrice(?int $basicRentalPrice): void
105+
{
106+
$this->basicRentalPrice = $basicRentalPrice;
107+
}
108+
109+
public function getProductPageUrl(): ?string
110+
{
111+
return $this->productPageUrl;
112+
}
113+
114+
public function setProductPageUrl(?string $productPageUrl): void
115+
{
116+
$this->productPageUrl = $productPageUrl;
117+
}
118+
119+
public function getAvatar(): ?string
120+
{
121+
return $this->avatar;
122+
}
123+
124+
public function setAvatar(?string $avatar): void
125+
{
126+
$this->avatar = $avatar;
127+
}
128+
129+
/**
130+
* @return string[]
131+
*/
132+
public function getAttachments(): array
133+
{
134+
return $this->attachments;
135+
}
136+
137+
/**
138+
* @param string[] $attachments
139+
*/
140+
public function setAttachments(array $attachments): void
141+
{
142+
$this->attachments = $attachments;
143+
}
144+
145+
public function getWeight(): ?int
146+
{
147+
return $this->weight;
148+
}
149+
150+
public function setWeight(?int $weight): void
151+
{
152+
$this->weight = $weight;
153+
}
192154
}

0 commit comments

Comments
 (0)