1 | <?php |
||
36 | class JsonParser implements ConfigurationParserInterface |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * The utility class that provides array handling functionality. |
||
41 | * |
||
42 | * @var \TechDivision\Import\Configuration\Jms\Utils\ArrayUtilInterface |
||
43 | */ |
||
44 | protected $arrayUtil; |
||
45 | |||
46 | /** |
||
47 | * Initializes the parser with the array utility instance. |
||
48 | * |
||
49 | * @param \TechDivision\Import\Configuration\Jms\Utils\ArrayUtilInterface $arrayUtil The utility instance |
||
50 | */ |
||
51 | public function __construct(ArrayUtilInterface $arrayUtil) |
||
55 | |||
56 | /** |
||
57 | * Parsing the configuration and merge it recursively. |
||
58 | * |
||
59 | * @param array $directories An array with diretories to parse |
||
60 | * |
||
61 | * @return void |
||
62 | * @throws \Exception Is thrown if the configuration can not be loaded from the configuration files |
||
63 | */ |
||
64 | public function parse(array $directories) |
||
88 | |||
89 | /** |
||
90 | * Return's the array utility instance. |
||
91 | * |
||
92 | * @return \TechDivision\Import\Configuration\Jms\Utils\ArrayUtilInterface The utility instance |
||
93 | */ |
||
94 | protected function getArrayUtil() |
||
98 | |||
99 | /** |
||
100 | * Replaces the values of the first array with the ones from the arrays |
||
101 | * that has been passed as additional arguments. |
||
102 | * |
||
103 | * @param array ...$arrays The arrays with the values that has to be replaced |
||
104 | * |
||
105 | * @return array The array with the replaced values |
||
106 | */ |
||
107 | protected function replace(...$arrays) |
||
111 | |||
112 | /** |
||
113 | * List the filenames of a directory. |
||
114 | * |
||
115 | * @param string $directory The directory to list |
||
116 | * @param boolean $recursive Whether to list recursively |
||
|
|||
117 | * |
||
118 | * @return array A list of filenames |
||
119 | */ |
||
120 | protected function listContents($directory = '', $suffix = '*') |
||
137 | } |
||
138 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.