| Total Complexity | 3 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class NameFactory |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @param $slug |
||
| 15 | * @param $type |
||
| 16 | * @param AbstractStrategy $strategy |
||
| 17 | * @return Name |
||
| 18 | */ |
||
| 19 | public static function from($slug, $type, AbstractStrategy $strategy): Name |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param $resource |
||
| 35 | * @return Name |
||
| 36 | */ |
||
| 37 | protected static function newName($resource): Name |
||
| 38 | { |
||
| 39 | $name = new Name(); |
||
| 40 | $name->setResource($resource); |
||
| 41 | return $name; |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param Name $name |
||
| 46 | * @param $strategy |
||
| 47 | */ |
||
| 48 | protected static function addCallbacks(Name &$name, $strategy) |
||
| 59 | } |
||
| 60 | ); |
||
| 63 |