Code Duplication    Length = 7-7 lines in 2 locations

src/ClassEnsurance.php 2 locations

@@ 90-96 (lines=7) @@
87
     *
88
     * @return ClassEnsurance
89
     */
90
    public function implements (string $interface): ClassEnsurance
91
    {
92
        $this->enforce(array_key_exists($interface, class_implements($this->class)))
93
             ->orThrow('"%s" does not implements interface "%s"', $this->class, $interface);
94
95
        return $this;
96
    }
97
98
    /**
99
     * @param string $interface
@@ 103-109 (lines=7) @@
100
     *
101
     * @return ClassEnsurance
102
     */
103
    public function implementsNot(string $interface): ClassEnsurance
104
    {
105
        $this->enforce(!array_key_exists($interface, class_implements($this->class)))
106
             ->orThrow('"%s" does implements interface "%s"', $this->class, $interface);
107
108
        return $this;
109
    }
110
111
    /**
112
     * @param string $class