Conditions | 1 |
Paths | 1 |
Total Lines | 26 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
38 | 2 | protected function template($namespace, $name, $topNSPart = "Endpoints") |
|
39 | { |
||
40 | 2 | $className = str_plural($name); |
|
41 | 2 | $endpointName = strtolower($name); |
|
42 | 2 | $namespace = "{$namespace}\\{$topNSPart}"; |
|
43 | |||
44 | return <<< EOT |
||
45 | <?php |
||
46 | namespace $namespace; |
||
47 | |||
48 | use Atog\Api\Endpoint; |
||
49 | |||
50 | /** |
||
51 | 2 | * Class $className |
|
52 | 2 | * @package $namespace |
|
53 | */ |
||
54 | 2 | class $className extends Endpoint |
|
55 | { |
||
56 | /** |
||
57 | * @var string |
||
58 | */ |
||
59 | 2 | protected \$endpoint = '$endpointName'; |
|
60 | } |
||
61 | |||
62 | 2 | EOT; |
|
63 | } |
||
64 | } |
||
65 |