Code Duplication    Length = 7-7 lines in 2 locations

source/Spiral/ORM/Entities/Loader.php 2 locations

@@ 359-365 (lines=7) @@
356
            return $nested->loader(substr($relation, $position + 1), $options);
357
        }
358
359
        if (!isset($this->schema[ORM::M_RELATIONS][$relation])) {
360
            $container = $this->container ?: $this->schema[ORM::M_ROLE_NAME];
361
362
            throw new LoaderException(
363
                "Undefined relation '{$relation}' under '{$container}'."
364
            );
365
        }
366
367
        if (isset($this->loaders[$relation])) {
368
            $nested = $this->loaders[$relation];
@@ 442-448 (lines=7) @@
439
            return $nested->joiner(substr($relation, $position + 1), $options);
440
        }
441
442
        if (!isset($this->schema[ORM::M_RELATIONS][$relation])) {
443
            $container = $this->container ?: $this->schema[ORM::M_ROLE_NAME];
444
445
            throw new LoaderException(
446
                "Undefined relation '{$relation}' under '{$container}'."
447
            );
448
        }
449
450
        if (isset($this->joiners[$relation])) {
451
            //Updating existed joiner options