Completed
Push — develop ( 9b69c7...41bf30 )
by Stuart
02:05
created
utils/typeinspector_run_dataset.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
12 12
     $varDump = ob_get_clean();
13 13
 
14 14
     $output = '```php' . PHP_EOL
15
-         . $code . PHP_EOL . PHP_EOL
16
-         . "// outputs" . PHP_EOL
17
-         . "//" . PHP_EOL;
15
+            . $code . PHP_EOL . PHP_EOL
16
+            . "// outputs" . PHP_EOL
17
+            . "//" . PHP_EOL;
18 18
 
19 19
     foreach (explode("\n", trim($varDump)) as $line) {
20 20
         $output .= "// {$line}" . PHP_EOL;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     $retval = eval($code);
34 34
 
35 35
     // all done
36
-    return [ $retval, $output ];
36
+    return [$retval, $output];
37 37
 }
38 38
 
39 39
 function typeinspector_run_dataset($inspectorName, $failureTypes)
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@
 block discarded – undo
42 42
 
43 43
     $successList = $failureList = [];
44 44
 
45
-    foreach ($dataSet as $dataItem)
46
-    {
45
+    foreach ($dataSet as $dataItem) {
47 46
         $failed = false;
48 47
         list($retval, $output) = typeinspector_run_dataitem($inspectorName, $dataItem);
49 48
         foreach ($failureTypes as $failureType) {
Please login to merge, or discard this patch.
src/TypeInspectors/GetDuckTypes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         }
99 99
 
100 100
         // if we get here, then we just return the PHP scalar type
101
-        return [ $type => $type ];
101
+        return [$type => $type];
102 102
     }
103 103
 
104 104
     /**
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         $retval = array_merge(
116 116
             array_slice(GetArrayTypes::from($item), 0, -1),
117 117
             self::$arrayExtras,
118
-            [ 'array' => 'array' ]
118
+            ['array' => 'array']
119 119
         );
120 120
 
121 121
         // all done
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         $retval = array_merge(
138 138
             GetObjectTypes::from($item),
139 139
             self::getObjectSpecialTypes($item),
140
-            [ 'object' => 'object' ]
140
+            ['object' => 'object']
141 141
         );
142 142
 
143 143
         return $retval;
Please login to merge, or discard this patch.
src/TypeInspectors/GetStringTypes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,14 +118,14 @@
 block discarded – undo
118 118
         }
119 119
 
120 120
         // if we get here, then $item will coerce to a PHP numeric type :)
121
-        return [ $retval => $retval ];
121
+        return [$retval => $retval];
122 122
     }
123 123
 
124 124
     private static function fromObject($item)
125 125
     {
126 126
         // does this object support being converted to a string?
127 127
         if (method_exists($item, '__toString')) {
128
-            return [ 'string' => 'string' ];
128
+            return ['string' => 'string'];
129 129
         }
130 130
 
131 131
         // no, it does not
Please login to merge, or discard this patch.
src/TypeInspectors/GetStrictTypes.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
 class GetStrictTypes
50 50
 {
51 51
     private static $dispatchMap = [
52
-        'array' => [ GetArrayTypes::class, 'from' ],
53
-        'object' => [ GetObjectTypes::class, 'from' ],
54
-        'string' => [ GetStringTypes::class, 'from' ],
52
+        'array' => [GetArrayTypes::class, 'from'],
53
+        'object' => [GetObjectTypes::class, 'from'],
54
+        'string' => [GetStringTypes::class, 'from'],
55 55
     ];
56 56
 
57 57
     /**
@@ -84,6 +84,6 @@  discard block
 block discarded – undo
84 84
         }
85 85
 
86 86
         // if we get here, then we just return the PHP scalar type
87
-        return [ $type => $type ];
87
+        return [$type => $type];
88 88
     }
89 89
 }
Please login to merge, or discard this patch.