Code Duplication    Length = 8-8 lines in 2 locations

src/Reference/LazyModelReference.php 1 location

@@ 128-135 (lines=8) @@
125
    /**
126
     * @throws \LogicException
127
     */
128
    private function jsonSerializableOrException()
129
    {
130
        if (!$this->model instanceof \JsonSerializable) {
131
            throw new \LogicException(
132
                sprintf('Model %s does not implement %s', get_class($this->model), \JsonSerializable::class)
133
            );
134
        }
135
    }
136
}
137

src/Reference/ModelReference.php 1 location

@@ 75-82 (lines=8) @@
72
    /**
73
     * @throws \LogicException
74
     */
75
    private function jsonSerializableOrException()
76
    {
77
        if (!$this->model instanceof \JsonSerializable) {
78
            throw new \LogicException(
79
                sprintf('Model %s does not implement %s', get_class($this->model), \JsonSerializable::class)
80
            );
81
        }
82
    }
83
}
84