Code Duplication    Length = 5-5 lines in 2 locations

src/Padawan/Domain/Completer/ObjectCompleter.php 1 location

@@ 49-53 (lines=5) @@
46
        if ($class instanceof InterfaceData) {
47
            return $entries;
48
        }
49
        if ($class->properties !== null) {
50
            foreach ($class->properties->all($spec) as $property) {
51
                $entries[$property->name] = $this->createEntryForProperty($property);
52
            }
53
        }
54
        ksort($entries);
55
        return $entries;
56
    }

src/Padawan/Domain/Completer/StaticCompleter.php 1 location

@@ 49-53 (lines=5) @@
46
        if ($class instanceof InterfaceData) {
47
            return $entries;
48
        }
49
        if ($class->properties !== null) {
50
            foreach ($class->properties->all($spec) as $property) {
51
                $entries[$property->name] = $this->createEntryForProperty($property);
52
            }
53
        }
54
        if ($class->constants !== null) {
55
            foreach ($class->constants->all() as $const) {
56
                $entries[$const] = $this->createEntryForConst($const);