Code Duplication    Length = 8-8 lines in 4 locations

src/Api/Discovery/BindingDescriptor.php 4 locations

@@ 244-251 (lines=8) @@
241
     *
242
     * @see BindingState::ENABLED
243
     */
244
    public function isEnabled()
245
    {
246
        if (null === $this->state) {
247
            throw new NotLoadedException('The binding descriptor is not loaded.');
248
        }
249
250
        return BindingState::ENABLED === $this->state;
251
    }
252
253
    /**
254
     * Returns whether the type of the binding does not exist.
@@ 265-272 (lines=8) @@
262
     *
263
     * @see BindingState::TYPE_NOT_FOUND
264
     */
265
    public function isTypeNotFound()
266
    {
267
        if (null === $this->state) {
268
            throw new NotLoadedException('The binding descriptor is not loaded.');
269
        }
270
271
        return BindingState::TYPE_NOT_FOUND === $this->state;
272
    }
273
274
    /**
275
     * Returns whether the type of the binding is not enabled.
@@ 286-293 (lines=8) @@
283
     *
284
     * @see BindingState::TYPE_NOT_ENABLED
285
     */
286
    public function isTypeNotEnabled()
287
    {
288
        if (null === $this->state) {
289
            throw new NotLoadedException('The binding descriptor is not loaded.');
290
        }
291
292
        return BindingState::TYPE_NOT_ENABLED === $this->state;
293
    }
294
295
    /**
296
     * Returns whether the binding is invalid.
@@ 307-314 (lines=8) @@
304
     *
305
     * @see BindingState::INVALID
306
     */
307
    public function isInvalid()
308
    {
309
        if (null === $this->state) {
310
            throw new NotLoadedException('The binding descriptor is not loaded.');
311
        }
312
313
        return BindingState::INVALID === $this->state;
314
    }
315
316
    private function refreshState()
317
    {