Conditions | 3 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | public function execute($command, callable $next) |
||
31 | { |
||
32 | $element = $next($command); |
||
33 | $object = $command->getObject(); |
||
34 | |||
35 | if (isset($object->implements)) { |
||
36 | foreach ($object->implements as $interfaceClassName) { |
||
37 | $element->addInterface( |
||
38 | new Fqsen('\\' . $interfaceClassName->toString()) |
||
39 | ); |
||
40 | } |
||
41 | } |
||
42 | |||
43 | return $element; |
||
44 | } |
||
45 | } |
||
46 |
Classes in PHP are usually named in CamelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. The whole name starts with a capital letter as well.
Thus the name database provider becomes
DatabaseProvider
.