Code Duplication    Length = 12-12 lines in 2 locations

src/Promise/Declaration/Structure.php 2 locations

@@ 62-73 (lines=12) @@
59
    /**
60
     * @return string[]
61
     */
62
    public function toBeUnsetProperties(): array
63
    {
64
        $names = [];
65
        /** @var \ReflectionProperty $property */
66
        foreach ($this->properties as $property) {
67
            if ($this->properties[$property] === true && $property->isPublic()) {
68
                $names[] = $property->getName();
69
            }
70
        }
71
72
        return $names;
73
    }
74
75
    /**
76
     * @return string[]
@@ 78-89 (lines=12) @@
75
    /**
76
     * @return string[]
77
     */
78
    public function publicProperties(): array
79
    {
80
        $names = [];
81
        /** @var \ReflectionProperty $property */
82
        foreach ($this->properties as $property) {
83
            if ($property->isPublic()) {
84
                $names[] = $property->getName();
85
            }
86
        }
87
88
        return $names;
89
    }
90
91
    /**
92
     * @return string[]