Completed
Push — V3 ( 7804e3...ad2c3a )
by Georges
01:47
created
src/Command/PhpfastcacheSetCommand.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -54,35 +54,35 @@  discard block
 block discarded – undo
54 54
     protected function configure()
55 55
     {
56 56
         $this
57
-          ->setName('phpfastcache:set')
58
-          ->setDescription('Set phpfastcache cache value')
59
-          ->addArgument(
57
+            ->setName('phpfastcache:set')
58
+            ->setDescription('Set phpfastcache cache value')
59
+            ->addArgument(
60 60
             'driver',
61 61
             InputArgument::REQUIRED,
62 62
             'Cache name to clear'
63
-          )
64
-          ->addArgument(
63
+            )
64
+            ->addArgument(
65 65
             'key',
66 66
             InputArgument::REQUIRED,
67 67
             'Cache key'
68
-          )
69
-          ->addArgument(
68
+            )
69
+            ->addArgument(
70 70
             'value',
71 71
             InputArgument::REQUIRED,
72 72
             'Cache value'
73
-          )
74
-          ->addArgument(
73
+            )
74
+            ->addArgument(
75 75
             'ttl',
76 76
             InputArgument::OPTIONAL,
77 77
             'Cache ttl (in second)'
78
-          )
79
-          ->addOption(
78
+            )
79
+            ->addOption(
80 80
             'auto-type-cast',
81 81
             'a',
82 82
             InputOption::VALUE_OPTIONAL,
83 83
             'Allows to automatically type-cast the value of the cache item.',
84 84
             1
85
-          )
85
+            )
86 86
         ;
87 87
     }
88 88
 
@@ -121,18 +121,18 @@  discard block
 block discarded – undo
121 121
 
122 122
             if(!$autoTypeCast || $castedCacheValue === $cacheValue) {
123 123
                 $io->success(\sprintf(
124
-                  'Cache item "%s" set to "%s" for %d seconds',
125
-                  $cacheKey,
126
-                  $cacheValue,
127
-                  $cacheItem->getTtl()
124
+                    'Cache item "%s" set to "%s" for %d seconds',
125
+                    $cacheKey,
126
+                    $cacheValue,
127
+                    $cacheItem->getTtl()
128 128
                 ));
129 129
             } else {
130 130
                 $io->success(\sprintf(
131
-                  'Cache item "%s" set to "%s" for %d seconds (automatically type-casted to %s)',
132
-                  $cacheKey,
133
-                  $cacheValue,
134
-                  $cacheItem->getTtl(),
135
-                  \gettype($castedCacheValue)
131
+                    'Cache item "%s" set to "%s" for %d seconds (automatically type-casted to %s)',
132
+                    $cacheKey,
133
+                    $cacheValue,
134
+                    $cacheItem->getTtl(),
135
+                    \gettype($castedCacheValue)
136 136
                 ));
137 137
             }
138 138
 
Please login to merge, or discard this patch.