1 | <?php |
||
17 | class Language |
||
18 | { |
||
19 | /** |
||
20 | * Config. |
||
21 | * |
||
22 | * @var Config |
||
23 | */ |
||
24 | protected $config; |
||
25 | /** |
||
26 | * Current language. |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $language; |
||
31 | |||
32 | /** |
||
33 | * Language constructor. |
||
34 | * |
||
35 | * @param Config $config |
||
36 | * @param string|null $language |
||
37 | */ |
||
38 | public function __construct(Config $config, string $language = null) |
||
43 | |||
44 | public function __toString() |
||
52 | |||
53 | public function getName(): ?string |
||
59 | |||
60 | public function getLocale(): ?string |
||
66 | |||
67 | public function getWeight(): int |
||
75 | |||
76 | private function checkProperty(string $property): bool |
||
91 | } |
||
92 |
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.