1 | <?php |
||
17 | class Language extends BasicEntity |
||
18 | { |
||
19 | /** |
||
20 | * @ORM\Column(name="title", type="string", length=55) |
||
21 | * @Assert\NotBlank |
||
22 | * @Assert\NotNull |
||
23 | */ |
||
24 | private $title; |
||
25 | |||
26 | /** |
||
27 | * @ORM\Column(name="locale", type="string", length=2) |
||
28 | * @Assert\NotBlank |
||
29 | * @Assert\NotNull |
||
30 | */ |
||
31 | private $locale; |
||
32 | |||
33 | /** @ORM\Column(name="isDefault", type="boolean") */ |
||
34 | private $default = false; |
||
35 | |||
36 | /** |
||
37 | * Set locale of a language. |
||
38 | * |
||
39 | * @param String $locale locale of a language. |
||
40 | * |
||
41 | * @return Language Returns self. |
||
42 | */ |
||
43 | 14 | public function setLocale($locale) |
|
49 | |||
50 | /** |
||
51 | * Get locale. |
||
52 | * |
||
53 | * @return String Returns locale of language. |
||
54 | */ |
||
55 | 14 | public function getLocale() |
|
59 | |||
60 | /** |
||
61 | * Set whether language is default or not. |
||
62 | * |
||
63 | * @param String $default Default of a language. |
||
64 | * |
||
65 | * @return Language Returns self. |
||
66 | */ |
||
67 | 14 | public function setDefault($default) |
|
73 | |||
74 | /** |
||
75 | * Get whether language is default or not. |
||
76 | * |
||
77 | * @return boolean Returns if language is default. |
||
78 | */ |
||
79 | 4 | public function isDefault() |
|
83 | |||
84 | /** |
||
85 | * Gets the value of title. |
||
86 | * |
||
87 | * @return mixed |
||
88 | */ |
||
89 | 4 | public function getTitle() |
|
93 | |||
94 | /** |
||
95 | * Sets the value of title. |
||
96 | * |
||
97 | * @param string $title the title |
||
98 | * |
||
99 | * @return self |
||
100 | */ |
||
101 | 14 | public function setTitle($title) |
|
107 | } |
||
108 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.