1 | <?php |
||
31 | final class Function_ extends AbstractFactory implements ProjectFactoryStrategy |
||
|
|||
32 | { |
||
33 | |||
34 | /** |
||
35 | * Returns true when the strategy is able to handle the object. |
||
36 | * |
||
37 | * @param FunctionNode $object object to check. |
||
38 | * @return boolean |
||
39 | */ |
||
40 | 1 | public function matches($object) |
|
44 | |||
45 | /** |
||
46 | * Creates an FunctionDescriptor out of the given object including its child elements. |
||
47 | * |
||
48 | * @param \PhpParser\Node\Stmt\Function_ $object object to convert to an Element |
||
49 | * @param StrategyContainer $strategies used to convert nested objects. |
||
50 | * @param Context $context of the created object |
||
51 | * @return FunctionDescriptor |
||
52 | */ |
||
53 | 3 | protected function doCreate($object, StrategyContainer $strategies, Context $context = null) |
|
66 | } |
||
67 |
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
.