Code Duplication    Length = 8-8 lines in 2 locations

src/Server.php 1 location

@@ 65-72 (lines=8) @@
62
    /**
63
     * @inheritdoc
64
     */
65
    public function init()
66
    {
67
        if (!$this->eventCollection instanceof EventCollectionInterface) {
68
            $this->eventCollection = Yii::createObject([
69
                'class' => $this->eventCollectionClass,
70
            ]);
71
        }
72
    }
73
74
    /**
75
     * Prepares for sending the response.

src/widgets/LongPoll.php 1 location

@@ 60-67 (lines=8) @@
57
    /**
58
     * @inheritdoc
59
     */
60
    public function init()
61
    {
62
        if (!$this->eventCollection instanceof EventCollectionInterface) {
63
            $this->eventCollection = Yii::createObject([
64
                'class' => $this->eventCollectionClass,
65
            ]);
66
        }
67
    }
68
69
    /**
70
     * @inheritdoc