@@ -439,21 +439,11 @@ protected static function validateConfig(array $config)
439439 foreach ($ config as $ configName => $ configValue ) {
440440 switch ($ configName ) {
441441 case 'itemDetailedDate ' :
442- if (!is_bool ($ configValue )) {
443- throw new phpFastCacheInvalidConfigurationException ("{$ configName } must be a boolean " );
444- }
445- break ;
446442 case 'autoTmpFallback ' :
447- if (!is_bool ($ configValue )) {
448- throw new phpFastCacheInvalidConfigurationException ("{$ configName } must be a boolean " );
449- }
450- break ;
451443 case 'secureFileManipulation ' :
452- if (!is_bool ($ configValue )) {
453- throw new phpFastCacheInvalidConfigurationException ("{$ configName } must be a boolean " );
454- }
455- break ;
456444 case 'ignoreSymfonyNotice ' :
445+ case 'htaccess ' :
446+ case 'compress_data ' :
457447 if (!is_bool ($ configValue )) {
458448 throw new phpFastCacheInvalidConfigurationException ("{$ configName } must be a boolean " );
459449 }
@@ -469,40 +459,22 @@ protected static function validateConfig(array $config)
469459 }
470460 break ;
471461 case 'securityKey ' :
462+ case 'path ' :
472463 if (!is_string ($ configValue )) {
473464 throw new phpFastCacheInvalidConfigurationException ("{$ configName } must be a string " );
474465 }
475466 break ;
476- case 'htaccess ' :
477- if (!is_bool ($ configValue )) {
478- throw new phpFastCacheInvalidConfigurationException ("{$ configName } must be a boolean " );
479- }
480- break ;
481467 case 'default_chmod ' :
468+ case 'limited_memory_each_object ' :
482469 if (!is_int ($ configValue )) {
483470 throw new phpFastCacheInvalidConfigurationException ("{$ configName } must be an integer " );
484471 }
485472 break ;
486- case 'path ' :
487- if (!is_string ($ configValue )) {
488- throw new phpFastCacheInvalidConfigurationException ("{$ configName } must be a string " );
489- }
490- break ;
491473 case 'fallback ' :
492474 if (!is_bool ($ configValue ) && !is_string ($ configValue )) {
493475 throw new phpFastCacheInvalidConfigurationException ("{$ configName } must be a boolean or string " );
494476 }
495477 break ;
496- case 'limited_memory_each_object ' :
497- if (!is_int ($ configValue )) {
498- throw new phpFastCacheInvalidConfigurationException ("{$ configName } must be an integer " );
499- }
500- break ;
501- case 'compress_data ' :
502- if (!is_bool ($ configValue )) {
503- throw new phpFastCacheInvalidConfigurationException ("{$ configName } must be a boolean " );
504- }
505- break ;
506478 case 'cacheFileExtension ' :
507479 if (!is_string ($ configValue )) {
508480 throw new phpFastCacheInvalidConfigurationException ("{$ configName } must be a boolean " );
@@ -512,7 +484,7 @@ protected static function validateConfig(array $config)
512484 }
513485 if (!in_array ($ configValue , self ::$ safeFileExtensions )) {
514486 throw new phpFastCacheInvalidConfigurationException (
515- "{$ configName } is not a safe extension, currently allowed extension: " . implode (', ' , self ::$ safeFileExtensions )
487+ "{$ configName } is not a safe extension, currently allowed extension: " . implode (', ' , self ::$ safeFileExtensions )
516488 );
517489 }
518490 break ;
0 commit comments