Code Duplication    Length = 4-4 lines in 2 locations

Classes/Domain/Model/Content.php 1 location

@@ 121-124 (lines=4) @@
118
                }
119
            }
120
121
        } elseif (substr($methodName, 0, 3) === 'set' && strlen($methodName) > 4 && isset($arguments[0])) {
122
            $propertyName = strtolower(substr(substr($methodName, 3), 0, 1)) . substr(substr($methodName, 3), 1);
123
            $this->$propertyName = $arguments[0];
124
        }
125
        return $value;
126
    }
127

Classes/Domain/Repository/ContentRepository.php 1 location

@@ 451-454 (lines=4) @@
448
        if (substr($methodName, 0, 6) === 'findBy' && strlen($methodName) > 7) {
449
            $propertyName = strtolower(substr(substr($methodName, 6), 0, 1)) . substr(substr($methodName, 6), 1);
450
            $result = $this->processMagicCall($propertyName, $arguments[0]);
451
        } elseif (substr($methodName, 0, 9) === 'findOneBy' && strlen($methodName) > 10) {
452
            $propertyName = strtolower(substr(substr($methodName, 9), 0, 1)) . substr(substr($methodName, 9), 1);
453
            $result = $this->processMagicCall($propertyName, $arguments[0], 'one');
454
        } elseif (substr($methodName, 0, 7) === 'countBy' && strlen($methodName) > 8) {
455
            $propertyName = strtolower(substr(substr($methodName, 7), 0, 1)) . substr(substr($methodName, 7), 1);
456
            $result = $this->processMagicCall($propertyName, $arguments[0], 'count');
457
        } else {