Total Complexity | 8 |
Total Lines | 58 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class Namefy |
||
10 | { |
||
11 | /** |
||
12 | * @param null|string $name |
||
13 | * @return Generator|Generator\HasStrategy|Strategies\AbstractStrategy|null |
||
14 | */ |
||
15 | public static function strategy($name = null) |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * @param string $name |
||
25 | * @return Name |
||
26 | */ |
||
27 | public static function model($name): Name |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @param string $name |
||
34 | * @return Name |
||
35 | */ |
||
36 | public static function repository($name): Name |
||
37 | { |
||
38 | return static::from($name, 'repository'); |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @param string $name |
||
43 | * @return Name |
||
44 | */ |
||
45 | public static function controller($name): Name |
||
46 | { |
||
47 | return static::from($name, 'controller'); |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @param string $name |
||
52 | * @param string $type |
||
53 | * @return Name |
||
54 | */ |
||
55 | protected static function from(string $name, $type): Name |
||
58 | } |
||
59 | |||
60 | protected static function self(): Generator |
||
67 | } |
||
68 | } |
||
69 |