Code Duplication    Length = 8-8 lines in 2 locations

src/Collection/LazyModelCollection.php 1 location

@@ 216-223 (lines=8) @@
213
    /**
214
     * @throws \LogicException
215
     */
216
    private function jsonSerializableOrException()
217
    {
218
        if (!in_array(\JsonSerializable::class, class_implements($this->modelClass), true)) {
219
            throw new \LogicException(
220
                sprintf('Model %s does not implement %s', $this->modelClass, \JsonSerializable::class)
221
            );
222
        }
223
    }
224
225
    /**
226
     * @return string

src/Collection/ModelCollection.php 1 location

@@ 164-171 (lines=8) @@
161
    /**
162
     * @throws \LogicException
163
     */
164
    private function jsonSerializableOrException()
165
    {
166
        if (!in_array(\JsonSerializable::class, class_implements($this->modelClass), true)) {
167
            throw new \LogicException(
168
                sprintf('Model %s does not implement %s', $this->modelClass, \JsonSerializable::class)
169
            );
170
        }
171
    }
172
173
    /**
174
     * @return string