This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
19
{
20
/** Collection class key */
21
const KEY = 'instance';
22
23
/**
24
* {@inheritDoc}
25
*/
26
1
public function resolve(array $classDataArray, ClassMetadata $classMetadata)
27
{
28
// Iterate collection
29
// TODO Move this code into abstract class because this code are identical for three classes only with different configurator method name
30
1
if (array_key_exists('@attributes', $classDataArray)) {
31
// Iterate collection attribute configurators
32
1
foreach ($this->collectionConfigurators as $key => $collectionConfigurator) {
33
// If this is supported collection configurator
34
1
if (array_key_exists($key, $classDataArray['@attributes'])) {
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.