1 | <?php |
||
19 | class Utils |
||
20 | { |
||
21 | /** |
||
22 | * @param RuleInterface $rule |
||
23 | * @return string|null |
||
24 | */ |
||
25 | public static function findName(RuleInterface $rule): ?string |
||
35 | |||
36 | /** |
||
37 | * @param Readable $file |
||
38 | * @param RuleInterface $rule |
||
39 | * @return string |
||
40 | * @throws SyntaxException |
||
41 | */ |
||
42 | public static function getName(Readable $file, RuleInterface $rule): string |
||
53 | |||
54 | /** |
||
55 | * @param RuleInterface $rule |
||
56 | * @return string|null |
||
57 | */ |
||
58 | public static function findDescription(RuleInterface $rule): ?string |
||
62 | |||
63 | /** |
||
64 | * @param RuleInterface $rule |
||
65 | * @param string $name |
||
66 | * @param int $group |
||
67 | * @return string|null |
||
68 | */ |
||
69 | public static function leaf(RuleInterface $rule, string $name, int $group = 0): ?string |
||
77 | |||
78 | /** |
||
79 | * @param RuleInterface $rule |
||
80 | * @param string $name |
||
81 | * @return RuleInterface|null |
||
82 | */ |
||
83 | public static function rule(RuleInterface $rule, string $name): ?RuleInterface |
||
93 | } |
||
94 |