Code Duplication    Length = 12-12 lines in 2 locations

src/Majora/Framework/Loader/Bridge/Doctrine/DoctrineLoaderTrait.php 2 locations

@@ 88-99 (lines=12) @@
85
                break;
86
        }
87
88
        if (is_callable(array($this, 'onLoad'))) {
89
            @trigger_error(
90
                sprintf('%s::onLoad() call is deprecated and will be removed in 2.0. Make "%s" invokable instead if you require to custom every "%s" loaded by ORM.',
91
                    static::class,
92
                    static::class,
93
                    $this->entityClass
94
                ),
95
                E_USER_DEPRECATED
96
            );
97
98
            return $this->onLoad($collection);
99
        }
100
101
        return $collection;
102
    }
@@ 177-188 (lines=12) @@
174
            ->getOneOrNullResult()
175
        ;
176
177
        if (is_callable(array($this, 'onLoad'))) {
178
            @trigger_error(
179
                sprintf('%s::onLoad() call is deprecated and will be removed in 2.0. Make "%s" invokable instead if you require to custom every "%s" loaded by ORM.',
180
                    static::class,
181
                    static::class,
182
                    $this->entityClass
183
                ),
184
                E_USER_DEPRECATED
185
            );
186
187
            return $this->onLoad($entity);
188
        }
189
190
        return $entity;
191
    }