File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,17 +185,17 @@ public function apply(string $baseDir): Result
185185 $ this ->logger ->notice ('There must be at least one file to keep. ' , [
186186 'baseDir ' => $ baseDir ,
187187 ]);
188- return $ keepList ;
189- }
190-
191- if ($ this ->dryRun ) {
192- $ this ->logger ->debug ('No policy applied because of dry-run. ' );
193188 }
194189 else {
195- foreach ($ pruneList as $ fileInfo ) {
196- /** @var FileInfo $fileInfo */
197- if (!$ this ->pruneFile ($ fileInfo )) {
198- throw new RetentionException ("Pruning {$ fileInfo ->path } failed unexpectedly. " );
190+ if ($ this ->dryRun ) {
191+ $ this ->logger ->debug ('No policy applied because of dry-run. ' );
192+ }
193+ else {
194+ foreach ($ pruneList as $ fileInfo ) {
195+ /** @var FileInfo $fileInfo */
196+ if (!$ this ->pruneFile ($ fileInfo )) {
197+ throw new RetentionException ("Pruning {$ fileInfo ->path } failed unexpectedly. " );
198+ }
199199 }
200200 }
201201 }
You can’t perform that action at this time.
0 commit comments