Code Duplication    Length = 9-9 lines in 2 locations

src/delivery/cli/fields/ObjectField.php 1 location

@@ 92-100 (lines=9) @@
89
        return '(press enter)';
90
    }
91
92
    private function getProperties(Parameter $parameter, $object = null) {
93
        $reader = new PropertyReader($this->types, $this->getClass($parameter));
94
95
        foreach ($reader->readInterface($object) as $property) {
96
            if ($property->canSet()) {
97
                yield $property;
98
            }
99
        }
100
    }
101
}

src/delivery/web/fields/ObjectField.php 1 location

@@ 141-149 (lines=9) @@
138
        return new Parameter($parameter->getName() . '[' . $property->name() . ']', $property->type(), $property->isRequired());
139
    }
140
141
    private function getProperties(Parameter $parameter, $object = null) {
142
        $reader = new PropertyReader($this->types, $this->getClass($parameter));
143
144
        foreach ($reader->readInterface($object) as $property) {
145
            if ($property->canSet()) {
146
                yield $property;
147
            }
148
        }
149
    }
150
}