Code Duplication    Length = 8-8 lines in 2 locations

src/Charcoal/Config/AbstractConfig.php 1 location

@@ 154-161 (lines=8) @@
151
            return false;
152
        }
153
154
        if (is_callable([ $this, $key ])) {
155
            $value = $this->{$key}();
156
        } else {
157
            if (!isset($this->{$key})) {
158
                return $this->hasInDelegates($key);
159
            }
160
            $value = $this->{$key};
161
        }
162
163
        return ($value !== null);
164
    }

src/Charcoal/Config/AbstractEntity.php 1 location

@@ 158-165 (lines=8) @@
155
        if (is_callable([ $this, $getter])) {
156
            $value = $this->{$getter}();
157
        }
158
        else if (is_callable([ $this, $key ])) {
159
            $value = $this->{$key}();
160
        } else {
161
            if (!isset($this->{$key})) {
162
                return false;
163
            }
164
            $value = $this->{$key};
165
        }
166
167
        return ($value !== null);
168
    }