Code Duplication    Length = 8-8 lines in 4 locations

source/Spiral/ORM/Entities/Schemas/RelationSchema.php 3 locations

@@ 267-274 (lines=8) @@
264
     *
265
     * @return string
266
     */
267
    public function getMorphKey()
268
    {
269
        if (isset($this->definition[RecordEntity::MORPH_KEY])) {
270
            return $this->definition[RecordEntity::MORPH_KEY];
271
        }
272
273
        return null;
274
    }
275
276
    /**
277
     * Indication that relation allowed to create indexes in outer or inner tables.
@@ 344-351 (lines=8) @@
341
     *
342
     * @return null|string
343
     */
344
    public function getInnerKey()
345
    {
346
        if (isset($this->definition[RecordEntity::INNER_KEY])) {
347
            return $this->definition[RecordEntity::INNER_KEY];
348
        }
349
350
        return null;
351
    }
352
353
    /**
354
     * Declared outer key. Must return null if no key defined or required.
@@ 358-365 (lines=8) @@
355
     *
356
     * @return null|string
357
     */
358
    public function getOuterKey()
359
    {
360
        if (isset($this->definition[RecordEntity::OUTER_KEY])) {
361
            return $this->definition[RecordEntity::OUTER_KEY];
362
        }
363
364
        return null;
365
    }
366
367
    /**
368
     * Calculates abstract type of inner key. Must return null if no key defined or required.

source/Spiral/ORM/Entities/Loader.php 1 location

@@ 890-897 (lines=8) @@
887
     * @param array $data
888
     * @return mixed
889
     */
890
    protected function fetchCriteria(array $data)
891
    {
892
        if (!isset($data[$this->definition[RecordEntity::OUTER_KEY]])) {
893
            return null;
894
        }
895
896
        return $data[$this->definition[RecordEntity::OUTER_KEY]];
897
    }
898
899
    /**
900
     * Parse single result row to generate data tree. Must pass parsing to every nested loader.