@@ -7,8 +7,8 @@ |
||
7 | 7 | // This sucks, but we have to try to find the composer autoloader |
8 | 8 | |
9 | 9 | $paths = [ |
10 | - __DIR__ . '/../vendor/autoload.php', // In case PhpSpreadsheet is cloned directly |
|
11 | - __DIR__ . '/../../../autoload.php', // In case PhpSpreadsheet is a composer dependency. |
|
10 | + __DIR__.'/../vendor/autoload.php', // In case PhpSpreadsheet is cloned directly |
|
11 | + __DIR__.'/../../../autoload.php', // In case PhpSpreadsheet is a composer dependency. |
|
12 | 12 | ]; |
13 | 13 | |
14 | 14 | foreach ($paths as $path) { |
@@ -398,7 +398,7 @@ |
||
398 | 398 | $map = static::$controlCharsMap; |
399 | 399 | $startCchr = $this->colors ? "\033[m\033[{$this->styles['default']}m" : ''; |
400 | 400 | $endCchr = $this->colors ? "\033[m\033[{$style}m" : ''; |
401 | - $value = preg_replace_callback(static::$controlCharsRx, function ($c) use ($map, $startCchr, $endCchr) { |
|
401 | + $value = preg_replace_callback(static::$controlCharsRx, function($c) use ($map, $startCchr, $endCchr) { |
|
402 | 402 | $s = $startCchr; |
403 | 403 | $c = $c[$i = 0]; |
404 | 404 | do { |
@@ -482,7 +482,7 @@ |
||
482 | 482 | $v = sprintf('<span class=sf-dump-ellipsis>%s</span>%s', substr($v, 0, -strlen($label)), $label); |
483 | 483 | } |
484 | 484 | |
485 | - $v = "<span class=sf-dump-{$style}>".preg_replace_callback(static::$controlCharsRx, function ($c) use ($map) { |
|
485 | + $v = "<span class=sf-dump-{$style}>".preg_replace_callback(static::$controlCharsRx, function($c) use ($map) { |
|
486 | 486 | $s = '<span class=sf-dump-default>'; |
487 | 487 | $c = $c[$i = 0]; |
488 | 488 | do { |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $dumper->setColors(false); |
34 | 34 | $cloner = new VarCloner(); |
35 | 35 | $cloner->addCasters(array( |
36 | - ':stream' => function ($res, $a) { |
|
36 | + ':stream' => function($res, $a) { |
|
37 | 37 | unset($a['uri'], $a['wrapper_data']); |
38 | 38 | |
39 | 39 | return $a; |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | $dumper->setColors(false); |
273 | 273 | $cloner = new VarCloner(); |
274 | 274 | $cloner->addCasters(array( |
275 | - ':stream' => function ($res, $a) { |
|
275 | + ':stream' => function($res, $a) { |
|
276 | 276 | unset($a['wrapper_data']); |
277 | 277 | |
278 | 278 | return $a; |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | unset($var[0]); |
407 | 407 | $out = ''; |
408 | 408 | |
409 | - $dumper = new CliDumper(function ($line, $depth) use (&$out) { |
|
409 | + $dumper = new CliDumper(function($line, $depth) use (&$out) { |
|
410 | 410 | if ($depth >= 0) { |
411 | 411 | $out .= str_repeat(' ', $depth).$line."\n"; |
412 | 412 | } |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | |
458 | 458 | $data = $cloner->cloneVar($var)->withMaxDepth(3); |
459 | 459 | $out = ''; |
460 | - $dumper->dump($data, function ($line, $depth) use (&$out) { |
|
460 | + $dumper->dump($data, function($line, $depth) use (&$out) { |
|
461 | 461 | if ($depth >= 0) { |
462 | 462 | $out .= str_repeat(' ', $depth).$line."\n"; |
463 | 463 | } |
@@ -239,10 +239,10 @@ |
||
239 | 239 | public function testCaster() |
240 | 240 | { |
241 | 241 | $cloner = new VarCloner(array( |
242 | - '*' => function ($obj, $array) { |
|
242 | + '*' => function($obj, $array) { |
|
243 | 243 | return array('foo' => 123); |
244 | 244 | }, |
245 | - __CLASS__ => function ($obj, $array) { |
|
245 | + __CLASS__ => function($obj, $array) { |
|
246 | 246 | ++$array['foo']; |
247 | 247 | |
248 | 248 | return $array; |
@@ -29,7 +29,7 @@ |
||
29 | 29 | $dumper->setDumpBoundaries('<bar>', '</bar>'); |
30 | 30 | $cloner = new VarCloner(); |
31 | 31 | $cloner->addCasters(array( |
32 | - ':stream' => function ($res, $a) { |
|
32 | + ':stream' => function($res, $a) { |
|
33 | 33 | unset($a['uri'], $a['wrapper_data']); |
34 | 34 | |
35 | 35 | return $a; |
@@ -21,8 +21,8 @@ |
||
21 | 21 | '[]' => array(), |
22 | 22 | 'res' => $g, |
23 | 23 | 'obj' => $foo, |
24 | - 'closure' => function ($a, \PDO &$b = null) {}, |
|
25 | - 'line' => __LINE__ - 1, |
|
24 | + 'closure' => function($a, \PDO &$b = null) {}, |
|
25 | + 'line' => __LINE__ -1, |
|
26 | 26 | 'nobj' => array((object) array()), |
27 | 27 | ); |
28 | 28 |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | public function testClosureCaster() |
65 | 65 | { |
66 | 66 | $a = $b = 123; |
67 | - $var = function ($x) use ($a, &$b) {}; |
|
67 | + $var = function($x) use ($a, &$b) {}; |
|
68 | 68 | |
69 | 69 | $this->assertDumpMatchesFormat( |
70 | 70 | <<<EOTXT |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | public function testReturnType() |
128 | 128 | { |
129 | 129 | $f = eval('return function ():int {};'); |
130 | - $line = __LINE__ - 1; |
|
130 | + $line = __LINE__ -1; |
|
131 | 131 | |
132 | 132 | $this->assertDumpMatchesFormat( |
133 | 133 | <<<EOTXT |
@@ -30,7 +30,7 @@ |
||
30 | 30 | if (null === self::$handler) { |
31 | 31 | $cloner = new VarCloner(); |
32 | 32 | $dumper = 'cli' === PHP_SAPI ? new CliDumper() : new HtmlDumper(); |
33 | - self::$handler = function ($var) use ($cloner, $dumper) { |
|
33 | + self::$handler = function($var) use ($cloner, $dumper) { |
|
34 | 34 | $dumper->dump($cloner->cloneVar($var)); |
35 | 35 | }; |
36 | 36 | } |