Code Duplication    Length = 7-7 lines in 2 locations

src/Traits/ManagesIocTrait.php 1 location

@@ 153-159 (lines=7) @@
150
        $factory = $this->getIfExists($this->nameOfIocManifest . ".$alias");
151
152
        /* Manage not founds and fallback */
153
        if ($factory instanceof NoItemFoundMessage) {
154
            if ($fallback !== '_michaels_no_fallback') {
155
                return $fallback;
156
            } else {
157
                throw new ItemNotFoundException("$alias not found");
158
            }
159
        }
160
161
        /* Get any declared dependencies */
162
        $declared = $this->getIfExists($this->nameOfIocManifest . "._declarations.$alias");

src/Traits/ManagesItemsTrait.php 1 location

@@ 189-195 (lines=7) @@
186
        $item = $this->getIfExists($alias);
187
188
        // The item was not found
189
        if ($item instanceof NoItemFoundMessage) {
190
            if ($fallback !== '_michaels_no_fallback') {
191
                $item = $fallback;
192
            } else {
193
                throw new ItemNotFoundException("$alias not found");
194
            }
195
        }
196
197
        return $this->prepareReturnedValue($item);
198
    }