1 | <?php |
||
17 | class App implements TranslatableDocumentInterface |
||
18 | { |
||
19 | /** |
||
20 | * @var string app id |
||
21 | */ |
||
22 | protected $id; |
||
23 | |||
24 | /** |
||
25 | * @var string app Name |
||
26 | */ |
||
27 | protected $name; |
||
28 | |||
29 | /** |
||
30 | * @var boolean show app in menu |
||
31 | */ |
||
32 | protected $showInMenu; |
||
33 | |||
34 | /** |
||
35 | * @var int sort order |
||
36 | */ |
||
37 | protected $order; |
||
38 | |||
39 | /** |
||
40 | * make name translatable |
||
41 | * |
||
42 | * @return string[] |
||
43 | */ |
||
44 | 23 | public function getTranslatableFields() |
|
48 | |||
49 | /** |
||
50 | * return pretranslated fields |
||
51 | * |
||
52 | * @return string[] |
||
53 | */ |
||
54 | 16 | public function getPreTranslatedFields() |
|
58 | |||
59 | /** |
||
60 | * Set id |
||
61 | * |
||
62 | * @param string $id id for new document |
||
63 | * |
||
64 | * @return self |
||
65 | */ |
||
66 | 57 | public function setId($id) |
|
67 | { |
||
68 | 57 | $this->id = $id; |
|
69 | |||
70 | 57 | return $this; |
|
71 | } |
||
72 | |||
73 | /** |
||
74 | * Get id |
||
75 | * |
||
76 | * @return string $id |
||
77 | */ |
||
78 | 18 | public function getId() |
|
82 | |||
83 | /** |
||
84 | * Set name |
||
85 | * |
||
86 | * @param string $name name used for display |
||
87 | * |
||
88 | * @return self |
||
89 | */ |
||
90 | 57 | public function setName($name) |
|
91 | { |
||
92 | 57 | $this->name = $name; |
|
93 | |||
94 | 57 | return $this; |
|
95 | } |
||
96 | |||
97 | /** |
||
98 | * Get name |
||
99 | * |
||
100 | * @return string $name |
||
101 | */ |
||
102 | 17 | public function getName() |
|
106 | |||
107 | /** |
||
108 | * Set showInMenu |
||
109 | * |
||
110 | * @param boolean $showInMenu show app in menu |
||
111 | * |
||
112 | * @return self |
||
113 | */ |
||
114 | 57 | public function setShowInMenu($showInMenu) |
|
115 | { |
||
116 | 57 | $this->showInMenu = $showInMenu; |
|
117 | |||
118 | 57 | return $this; |
|
119 | } |
||
120 | |||
121 | /** |
||
122 | * Get showInMenu |
||
123 | * |
||
124 | * @return boolean $showInMenu |
||
125 | */ |
||
126 | 18 | public function getShowInMenu() |
|
130 | |||
131 | /** |
||
132 | * Get order |
||
133 | * |
||
134 | * @return int order |
||
135 | */ |
||
136 | 18 | public function getOrder() |
|
140 | |||
141 | /** |
||
142 | * Set order |
||
143 | * |
||
144 | * @param int $order order |
||
145 | * |
||
146 | * @return void |
||
147 | */ |
||
148 | 57 | public function setOrder($order) |
|
152 | } |
||
153 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.