GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 15-17 lines in 2 locations

src/Spi/Memory/MemoryWorkflowStore.php 2 locations

@@ 82-98 (lines=17) @@
79
     * @throws \OldTown\PropertySet\Exception\RuntimeException
80
     * @throws \OldTown\Workflow\Exception\ArgumentNotNumericException
81
     */
82
    public function getPropertySet($entryId)
83
    {
84
        if (array_key_exists($entryId, static::$propertySetCache)) {
85
            return static::$propertySetCache[$entryId];
86
        }
87
88
        if (!is_numeric($entryId)) {
89
            $errMsg = sprintf('Аргумент должен быть числом. Актуальное значение %s', $entryId);
90
            throw new ArgumentNotNumericException($errMsg);
91
        }
92
        $entryId = (integer)$entryId;
93
94
        $ps = $this->createPropertySet();
95
        static::$propertySetCache[$entryId] = $ps;
96
97
        return static::$propertySetCache[$entryId];
98
    }
99
100
    /**
101
     * Создаем экземпляр PropertySet
@@ 217-231 (lines=15) @@
214
     * @return SimpleStep[]|SplObjectStorage
215
     * @throws ArgumentNotNumericException
216
     */
217
    public function findCurrentSteps($entryId)
218
    {
219
        if (!is_numeric($entryId)) {
220
            $errMsg = sprintf('Аргумент должен быть числом. Актуальное значение %s', $entryId);
221
            throw new ArgumentNotNumericException($errMsg);
222
        }
223
        $entryId = (integer)$entryId;
224
225
        if (!array_key_exists($entryId, static::$currentStepsCache)) {
226
            $currentSteps = new SplObjectStorage();
227
            static::$currentStepsCache[$entryId] = $currentSteps;
228
        }
229
230
        return static::$currentStepsCache[$entryId];
231
    }
232
233
    /**
234
     * Пометить текущий шаг как выполненный