@@ -350,7 +350,8 @@ private function arguments($args = null)
350
350
self ::$ argv ->addFlag ('path-quarantine ' , array ('default ' => false , 'has_value ' => true ));
351
351
self ::$ argv ->addFlag ('path-logs ' , array ('default ' => false , 'has_value ' => true ));
352
352
self ::$ argv ->addFlag ('path-report ' , array ('default ' => false , 'has_value ' => true ));
353
- self ::$ argv ->addFlag ('disable-colors ' , array ('default ' => false ));
353
+ self ::$ argv ->addFlag ('disable-colors ' , array ('alias ' => array ('--no-colors ' , '--no-color ' ), 'default ' => false ));
354
+ self ::$ argv ->addFlag ('disable-cache ' , array ('alias ' => '--no-cache ' , 'default ' => false ));
354
355
self ::$ argv ->addArgument ('path ' , array ('var_args ' => true , 'default ' => '' ));
355
356
self ::$ argv ->parse ($ args );
356
357
@@ -411,6 +412,11 @@ private function arguments($args = null)
411
412
}
412
413
}
413
414
415
+ // Cache
416
+ if (isset (self ::$ argv ['disable-cache ' ]) && self ::$ argv ['disable-cache ' ]) {
417
+ self ::setCache (false );
418
+ }
419
+
414
420
// Max filesize
415
421
if (isset (self ::$ argv ['max-filesize ' ]) && is_numeric (self ::$ argv ['max-filesize ' ])) {
416
422
self ::setMaxFilesize (self ::$ argv ['max-filesize ' ]);
@@ -1435,6 +1441,24 @@ public static function isColorEnabled()
1435
1441
return isset (self ::$ settings ['colors ' ]) ? self ::$ settings ['colors ' ] : true ;
1436
1442
}
1437
1443
1444
+ /**
1445
+ * @return self
1446
+ */
1447
+ public static function setCache ($ mode = true )
1448
+ {
1449
+ self ::$ settings ['cache ' ] = $ mode ;
1450
+
1451
+ return new static ();
1452
+ }
1453
+
1454
+ /**
1455
+ * @return bool
1456
+ */
1457
+ public static function isCacheEnabled ()
1458
+ {
1459
+ return isset (self ::$ settings ['cache ' ]) ? self ::$ settings ['cache ' ] : true ;
1460
+ }
1461
+
1438
1462
/**
1439
1463
* @return self
1440
1464
*/
0 commit comments