Code Duplication    Length = 10-10 lines in 2 locations

src/Generation/Provider/AnnotationProvider.php 2 locations

@@ 456-465 (lines=10) @@
453
     * @return null|string
454
     * @throws RetrofitException
455
     */
456
    public function getCallback()
457
    {
458
        $callback = $this->getCallbackParameter();
459
460
        if (null === $callback) {
461
            return null;
462
        }
463
464
        return '$' . $callback->getName();
465
    }
466
467
    /**
468
     * Returns if the callback is optional
@@ 474-483 (lines=10) @@
471
     * @throws LogicException
472
     * @throws RetrofitException
473
     */
474
    public function isCallbackOptional()
475
    {
476
        $callback = $this->getCallbackParameter();
477
478
        if (null === $callback) {
479
            throw new LogicException('Callback does not exist');
480
        }
481
482
        return $callback->isOptional();
483
    }
484
485
    /**
486
     * Get the request annotation