Code Duplication    Length = 5-5 lines in 2 locations

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);

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

@@ 57-61 (lines=5) @@
54
        if ($class instanceof InterfaceData) {
55
            return $entries;
56
        }
57
        if ($class->properties !== null) {
58
            foreach ($class->properties->all($spec) as $property) {
59
                $entries[$property->name] = $this->createEntryForProperty($property);
60
            }
61
        }
62
        ksort($entries);
63
        return $entries;
64
    }