@@ -85,9 +85,6 @@ class ResourceManager
85
85
/** @var string Full path to project cache root directory */
86
86
public static $ cacheRoot ;
87
87
88
- /** @var array Cached assets */
89
- protected $ cache = [];
90
-
91
88
/** @var array Collection of assets */
92
89
protected $ assets = [];
93
90
@@ -142,21 +139,19 @@ protected function processAsset($dependencies)
142
139
*/
143
140
public function manage (array $ paths )
144
141
{
145
- // Get assets list
146
- $ assets = $ this ->fileManager ->scan ($ paths , self ::TYPES , self ::$ excludeFolders );
147
-
148
142
// Iterate all assets for analyzing
149
- foreach ($ assets as $ asset ) {
143
+ foreach ($ this -> fileManager -> scan ( $ paths , self :: TYPES , self :: $ excludeFolders ) as $ asset ) {
150
144
// Build path to processed asset
151
145
$ cachedAsset = $ this ->getAssetProcessedPath ($ asset );
152
146
153
147
// If cached assets was modified or new
154
148
if (!$ this ->isValid ($ asset , $ cachedAsset )) {
155
149
// Recursively process asset and possible dependencies
156
150
$ this ->processAsset ([$ asset => []]);
157
- // Store processed asset
158
- $ this ->assets [pathinfo ($ cachedAsset , PATHINFO_EXTENSION )][] = $ cachedAsset ;
159
151
}
152
+
153
+ // Store processed asset
154
+ $ this ->assets [pathinfo ($ cachedAsset , PATHINFO_EXTENSION )][] = $ cachedAsset ;
160
155
}
161
156
162
157
return $ this ->assets ;
0 commit comments