@@ -8,83 +8,83 @@ |
||
8 | 8 | * @param null|string $msg |
9 | 9 | * @return mixed |
10 | 10 | */ |
11 | - public function invalidArgument($msg=null); |
|
11 | + public function invalidArgument($msg = null); |
|
12 | 12 | |
13 | 13 | /** |
14 | 14 | * @param null|string $msg |
15 | 15 | * @return mixed |
16 | 16 | */ |
17 | - public function badFunctionCall($msg=null); |
|
17 | + public function badFunctionCall($msg = null); |
|
18 | 18 | |
19 | 19 | /** |
20 | 20 | * @param null|string $msg |
21 | 21 | * @return mixed |
22 | 22 | */ |
23 | - public function badMethodCall($msg=null); |
|
23 | + public function badMethodCall($msg = null); |
|
24 | 24 | |
25 | 25 | /** |
26 | 26 | * @param null|string $msg |
27 | 27 | * @return mixed |
28 | 28 | */ |
29 | - public function domain($msg=null); |
|
29 | + public function domain($msg = null); |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * @param null|string $msg |
33 | 33 | * @return mixed |
34 | 34 | */ |
35 | - public function length($msg=null); |
|
35 | + public function length($msg = null); |
|
36 | 36 | |
37 | 37 | /** |
38 | 38 | * @param null|string $msg |
39 | 39 | * @return mixed |
40 | 40 | */ |
41 | - public function logic($msg=null); |
|
41 | + public function logic($msg = null); |
|
42 | 42 | |
43 | 43 | /** |
44 | 44 | * @param null|string $msg |
45 | 45 | * @return mixed |
46 | 46 | */ |
47 | - public function notFoundException($msg=null); |
|
47 | + public function notFoundException($msg = null); |
|
48 | 48 | |
49 | 49 | /** |
50 | 50 | * @param null|string $msg |
51 | 51 | * @return mixed |
52 | 52 | */ |
53 | - public function fileNotFoundException($msg=null); |
|
53 | + public function fileNotFoundException($msg = null); |
|
54 | 54 | |
55 | 55 | /** |
56 | 56 | * @param null|string $msg |
57 | 57 | * @return mixed |
58 | 58 | */ |
59 | - public function outOfRange($msg=null); |
|
59 | + public function outOfRange($msg = null); |
|
60 | 60 | |
61 | 61 | /** |
62 | 62 | * @param null|string $msg |
63 | 63 | * @return mixed |
64 | 64 | */ |
65 | - public function overflow($msg=null); |
|
65 | + public function overflow($msg = null); |
|
66 | 66 | |
67 | 67 | /** |
68 | 68 | * @param null|string $msg |
69 | 69 | * @return mixed |
70 | 70 | */ |
71 | - public function range($msg=null); |
|
71 | + public function range($msg = null); |
|
72 | 72 | |
73 | 73 | /** |
74 | 74 | * @param null|string $msg |
75 | 75 | * @return mixed |
76 | 76 | */ |
77 | - public function runtime($msg=null); |
|
77 | + public function runtime($msg = null); |
|
78 | 78 | |
79 | 79 | /** |
80 | 80 | * @param null|string $msg |
81 | 81 | * @return mixed |
82 | 82 | */ |
83 | - public function underflow($msg=null); |
|
83 | + public function underflow($msg = null); |
|
84 | 84 | |
85 | 85 | /** |
86 | 86 | * @param null|string $msg |
87 | 87 | * @return mixed |
88 | 88 | */ |
89 | - public function unexpectedValue($msg=null); |
|
89 | + public function unexpectedValue($msg = null); |
|
90 | 90 | } |
91 | 91 | \ No newline at end of file |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * |
27 | 27 | * @param null|string $msg |
28 | 28 | */ |
29 | - public function invalidArgument($msg=null) |
|
29 | + public function invalidArgument($msg = null) |
|
30 | 30 | { |
31 | 31 | throw new InvalidArgumentException($msg); |
32 | 32 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * |
37 | 37 | * @param null|string $msg |
38 | 38 | */ |
39 | - public function badFunctionCall($msg=null) |
|
39 | + public function badFunctionCall($msg = null) |
|
40 | 40 | { |
41 | 41 | throw new BadFunctionCallException($msg); |
42 | 42 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * |
47 | 47 | * @param null|string $msg |
48 | 48 | */ |
49 | - public function badMethodCall($msg=null) |
|
49 | + public function badMethodCall($msg = null) |
|
50 | 50 | { |
51 | 51 | throw new BadMethodCallException($msg); |
52 | 52 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | * |
57 | 57 | * @param null|string $msg |
58 | 58 | */ |
59 | - public function domain($msg=null) |
|
59 | + public function domain($msg = null) |
|
60 | 60 | { |
61 | 61 | throw new DomainException($msg); |
62 | 62 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | * |
67 | 67 | * @param null|string $msg |
68 | 68 | */ |
69 | - public function length($msg=null) |
|
69 | + public function length($msg = null) |
|
70 | 70 | { |
71 | 71 | throw new LengthException($msg); |
72 | 72 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | * |
77 | 77 | * @param null|string $msg |
78 | 78 | */ |
79 | - public function logic($msg=null) |
|
79 | + public function logic($msg = null) |
|
80 | 80 | { |
81 | 81 | throw new LogicException($msg); |
82 | 82 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | * @return mixed|void |
89 | 89 | * |
90 | 90 | */ |
91 | - public function notFoundException($msg=null) |
|
91 | + public function notFoundException($msg = null) |
|
92 | 92 | { |
93 | 93 | return $this->notFound($msg); |
94 | 94 | } |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | * @return mixed|void |
101 | 101 | * |
102 | 102 | */ |
103 | - public function fileNotFoundException($msg=null) |
|
103 | + public function fileNotFoundException($msg = null) |
|
104 | 104 | { |
105 | 105 | return $this->fileNotFound($msg); |
106 | 106 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | * |
111 | 111 | * @param null|string $msg |
112 | 112 | */ |
113 | - public function outOfRange($msg=null) |
|
113 | + public function outOfRange($msg = null) |
|
114 | 114 | { |
115 | 115 | throw new OutOfRangeException($msg); |
116 | 116 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | * |
121 | 121 | * @param null|string $msg |
122 | 122 | */ |
123 | - public function overflow($msg=null) |
|
123 | + public function overflow($msg = null) |
|
124 | 124 | { |
125 | 125 | throw new OverflowException($msg); |
126 | 126 | } |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | * |
131 | 131 | * @param null|string $msg |
132 | 132 | */ |
133 | - public function range($msg=null) |
|
133 | + public function range($msg = null) |
|
134 | 134 | { |
135 | 135 | throw new RangeException($msg); |
136 | 136 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | * |
141 | 141 | * @param null|string $msg |
142 | 142 | */ |
143 | - public function runtime($msg=null) |
|
143 | + public function runtime($msg = null) |
|
144 | 144 | { |
145 | 145 | throw new RuntimeException($msg); |
146 | 146 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | * |
151 | 151 | * @param null|string $msg |
152 | 152 | */ |
153 | - public function underflow($msg=null) |
|
153 | + public function underflow($msg = null) |
|
154 | 154 | { |
155 | 155 | throw new UnderflowException($msg); |
156 | 156 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | * |
161 | 161 | * @param null|string $msg |
162 | 162 | */ |
163 | - public function unexpectedValue($msg=null) |
|
163 | + public function unexpectedValue($msg = null) |
|
164 | 164 | { |
165 | 165 | throw new UnexpectedValueException($msg); |
166 | 166 | } |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $path = realpath($path) ?: $path; |
131 | 131 | $tempPath = tempnam(dirname($path), basename($path)); |
132 | 132 | // Fix permissions of tempPath because `tempnam()` creates it with permissions set to 0600... |
133 | - chmod($tempPath, 0777 - umask()); |
|
133 | + chmod($tempPath, 0777-umask()); |
|
134 | 134 | file_put_contents($tempPath, $content); |
135 | 135 | rename($tempPath, $path); |
136 | 136 | } |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | $success = true; |
190 | 190 | foreach ($paths as $path) { |
191 | 191 | try { |
192 | - if (! @unlink($path)) { |
|
192 | + if (!@unlink($path)) { |
|
193 | 193 | $success = false; |
194 | 194 | } |
195 | 195 | } catch (ErrorException $e) { |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | */ |
233 | 233 | public function link($target, $link) |
234 | 234 | { |
235 | - if (! windows_os()) { |
|
235 | + if (!windows_os()) { |
|
236 | 236 | return symlink($target, $link); |
237 | 237 | } |
238 | 238 | $mode = $this->isDirectory($target) ? 'J' : 'H'; |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | public function files($directory, $hidden = false) |
394 | 394 | { |
395 | 395 | return iterator_to_array( |
396 | - Finder::create()->files()->ignoreDotFiles(! $hidden)->in($directory)->depth(0)->sortByName(), |
|
396 | + Finder::create()->files()->ignoreDotFiles(!$hidden)->in($directory)->depth(0)->sortByName(), |
|
397 | 397 | false |
398 | 398 | ); |
399 | 399 | } |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | public function allFiles($directory, $hidden = false) |
409 | 409 | { |
410 | 410 | return iterator_to_array( |
411 | - Finder::create()->files()->ignoreDotFiles(! $hidden)->in($directory)->sortByName(), |
|
411 | + Finder::create()->files()->ignoreDotFiles(!$hidden)->in($directory)->sortByName(), |
|
412 | 412 | false |
413 | 413 | ); |
414 | 414 | } |
@@ -455,10 +455,10 @@ discard block |
||
455 | 455 | */ |
456 | 456 | public function moveDirectory($from, $to, $overwrite = false) |
457 | 457 | { |
458 | - if ($overwrite && $this->isDirectory($to) && ! $this->deleteDirectory($to)) { |
|
458 | + if ($overwrite && $this->isDirectory($to) && !$this->deleteDirectory($to)) { |
|
459 | 459 | return false; |
460 | 460 | } |
461 | - return @rename($from, $to) === true; |
|
461 | + return @rename($from, $to)===true; |
|
462 | 462 | } |
463 | 463 | |
464 | 464 | /** |
@@ -471,14 +471,14 @@ discard block |
||
471 | 471 | */ |
472 | 472 | public function copyDirectory($directory, $destination, $options = null) |
473 | 473 | { |
474 | - if (! $this->isDirectory($directory)) { |
|
474 | + if (!$this->isDirectory($directory)) { |
|
475 | 475 | return false; |
476 | 476 | } |
477 | 477 | $options = $options ?: FilesystemIterator::SKIP_DOTS; |
478 | 478 | // If the destination directory does not actually exist, we will go ahead and |
479 | 479 | // create it recursively, which just gets the destination prepared to copy |
480 | 480 | // the files over. Once we make the directory we'll proceed the copying. |
481 | - if (! $this->isDirectory($destination)) { |
|
481 | + if (!$this->isDirectory($destination)) { |
|
482 | 482 | $this->makeDirectory($destination, 0777, true); |
483 | 483 | } |
484 | 484 | $items = new FilesystemIterator($directory, $options); |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | $target = $destination.'/'.$item->getBasename(); |
490 | 490 | if ($item->isDir()) { |
491 | 491 | $path = $item->getPathname(); |
492 | - if (! $this->copyDirectory($path, $target, $options)) { |
|
492 | + if (!$this->copyDirectory($path, $target, $options)) { |
|
493 | 493 | return false; |
494 | 494 | } |
495 | 495 | } |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | // location and keep looping. If for some reason the copy fails we'll bail out |
498 | 498 | // and return false, so the developer is aware that the copy process failed. |
499 | 499 | else { |
500 | - if (! $this->copy($item->getPathname(), $target)) { |
|
500 | + if (!$this->copy($item->getPathname(), $target)) { |
|
501 | 501 | return false; |
502 | 502 | } |
503 | 503 | } |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | */ |
517 | 517 | public function deleteDirectory($directory, $preserve = false) |
518 | 518 | { |
519 | - if (! $this->isDirectory($directory)) { |
|
519 | + if (!$this->isDirectory($directory)) { |
|
520 | 520 | return false; |
521 | 521 | } |
522 | 522 | $items = new FilesystemIterator($directory); |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | // If the item is a directory, we can just recurse into the function and |
525 | 525 | // delete that sub-directory otherwise we'll just delete the file and |
526 | 526 | // keep iterating through each file until the directory is cleaned. |
527 | - if ($item->isDir() && ! $item->isLink()) { |
|
527 | + if ($item->isDir() && !$item->isLink()) { |
|
528 | 528 | $this->deleteDirectory($item->getPathname()); |
529 | 529 | } |
530 | 530 | // If the item is just a file, we can go ahead and delete it since we're |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | $this->delete($item->getPathname()); |
535 | 535 | } |
536 | 536 | } |
537 | - if (! $preserve) { |
|
537 | + if (!$preserve) { |
|
538 | 538 | @rmdir($directory); |
539 | 539 | } |
540 | 540 | return true; |
@@ -549,7 +549,7 @@ discard block |
||
549 | 549 | public function deleteDirectories($directory) |
550 | 550 | { |
551 | 551 | $allDirectories = $this->directories($directory); |
552 | - if (! empty($allDirectories)) { |
|
552 | + if (!empty($allDirectories)) { |
|
553 | 553 | foreach ($allDirectories as $directoryName) { |
554 | 554 | $this->deleteDirectory($directoryName); |
555 | 555 | } |