Code Duplication    Length = 5-5 lines in 2 locations

src/Webrouse/AssetMacro/AssetMacro.php 2 locations

@@ 77-81 (lines=5) @@
74
        if ($config['existCheck'] === TRUE) {
75
            $ds = DIRECTORY_SEPARATOR;
76
            $filePath = $isVersion ? ($wwwDir . $ds . $path) : ($wwwDir . $ds . Utils::normalizePath($revision));
77
            if (! file_exists($filePath)) {
78
                $msg = sprintf("Asset '%s' not found.", $filePath);
79
                Utils::throwError(new AssetNotFoundException($msg), $config['missingAsset'], $need);
80
                return '';
81
            }
82
        }
83
84
        // Format output
@@ 163-167 (lines=5) @@
160
161
        // Path to JSON manifest
162
        if (is_string($manifest)) {
163
            if ( ! file_exists($manifest)) {
164
                $msg = sprintf("Manifest file not found: '%s'.", $manifest);
165
                Utils::throwError(new ManifestNotFoundException($msg), $config['missingManifest'], $need);
166
                return NULL;
167
            }
168
            return Json::decode(file_get_contents($manifest), Json::FORCE_ARRAY);
169
        }
170