1 | <?php |
||
34 | class CategoryPathUtil implements CategoryPathUtilInterface |
||
35 | { |
||
36 | |||
37 | const SEPARATOR = '/'; |
||
38 | |||
39 | /** |
||
40 | * The serializer instance. |
||
41 | * |
||
42 | * @var \TechDivision\Import\Serializer\SerializerInterface |
||
43 | */ |
||
44 | private $serializer; |
||
45 | |||
46 | /** |
||
47 | * |
||
48 | * @param \TechDivision\Import\Serializer\SerializerInterface $serialzier |
||
|
|||
49 | */ |
||
50 | public function __construct(SerializerInterface $serializer) |
||
54 | |||
55 | public function fromProduct(string $path = null) : array |
||
72 | |||
73 | public function fromCategory(string $path = null) : array |
||
77 | |||
78 | public function toProduct(array $paths) : string |
||
89 | |||
90 | /** |
||
91 | * Create a CSV compatible string from the passed category path. |
||
92 | * |
||
93 | * @param string The normalized category path (usually from the DB) |
||
94 | * |
||
95 | * @return string The denormalized category path for the import file |
||
96 | * @see \TechDivision\Import\Utils\CategoryPathUtilInterface::denormalize() |
||
97 | */ |
||
98 | public function denormalize(string $path) : string |
||
102 | |||
103 | public function normalize(string $path) : string |
||
107 | |||
108 | |||
109 | public function explode(string $path) : array |
||
113 | |||
114 | public function implode(array $elements) : string |
||
118 | |||
119 | /** |
||
120 | * Serializes the elements of the passed array. |
||
121 | * |
||
122 | * @param array|null $unserialized The serialized data |
||
123 | * @param string|null $delimiter The delimiter used to serialize the values |
||
124 | * |
||
125 | * @return string The serialized array |
||
126 | */ |
||
127 | public function serialize(array $unserialized = null, $delimiter = null) |
||
131 | |||
132 | /** |
||
133 | * Unserializes the elements of the passed string. |
||
134 | * |
||
135 | * @param string|null $serialized The value to unserialize |
||
136 | * @param string|null $delimiter The delimiter used to unserialize the elements |
||
137 | * |
||
138 | * @return array The unserialized values |
||
139 | */ |
||
140 | public function unserialize($serialized = null, $delimiter = null) |
||
144 | } |
||
145 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.