1 | <?php |
||
13 | class Util |
||
14 | { |
||
15 | /** |
||
16 | * Symfony\Component\Filesystem. |
||
17 | * |
||
18 | * @var Filesystem |
||
19 | */ |
||
20 | protected static $fs; |
||
21 | |||
22 | /** |
||
23 | * Return Symfony\Component\Filesystem instance. |
||
24 | * |
||
25 | * @return Filesystem |
||
26 | */ |
||
27 | public static function getFS(): Filesystem |
||
35 | |||
36 | /** |
||
37 | * Checks if a date is valid. |
||
38 | * |
||
39 | * @param string|null $date |
||
40 | * @param string $format |
||
41 | * |
||
42 | * @return bool |
||
43 | */ |
||
44 | public static function dateIsValid($date = null, string $format = 'Y-m-d'): bool |
||
53 | |||
54 | /** |
||
55 | * Date to DateTime. |
||
56 | * |
||
57 | * @param mixed $date |
||
58 | * |
||
59 | * @return \DateTime |
||
60 | */ |
||
61 | public static function dateToDatetime($date): \DateTime |
||
76 | |||
77 | /** |
||
78 | * Format class name. |
||
79 | * |
||
80 | * @param \object $class |
||
81 | * @param array $options |
||
82 | * |
||
83 | * @return string |
||
84 | */ |
||
85 | public static function formatClassName($class, array $options = []): string |
||
97 | } |
||
98 |
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.