Passed
Push — master ( e80252...a999dd )
by Nikolay
32:05 queued 14:50
created
library/vendor/zendframework/zend-diactoros/src/Response/TextResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
             return $text;
64 64
         }
65 65
 
66
-        if (! is_string($text)) {
66
+        if (!is_string($text)) {
67 67
             throw new Exception\InvalidArgumentException(sprintf(
68 68
                 'Invalid content (%s) provided to %s',
69 69
                 (is_object($text) ? get_class($text) : gettype($text)),
Please login to merge, or discard this patch.
www/back-end/library/vendor/zendframework/zend-diactoros/src/Uri.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -165,11 +165,11 @@  discard block
 block discarded – undo
165 165
 
166 166
         $authority = $this->host;
167 167
         if ('' !== $this->userInfo) {
168
-            $authority = $this->userInfo . '@' . $authority;
168
+            $authority = $this->userInfo.'@'.$authority;
169 169
         }
170 170
 
171 171
         if ($this->isNonStandardPort($this->scheme, $this->host, $this->port)) {
172
-            $authority .= ':' . $this->port;
172
+            $authority .= ':'.$this->port;
173 173
         }
174 174
 
175 175
         return $authority;
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      */
235 235
     public function withScheme($scheme) : UriInterface
236 236
     {
237
-        if (! is_string($scheme)) {
237
+        if (!is_string($scheme)) {
238 238
             throw new Exception\InvalidArgumentException(sprintf(
239 239
                 '%s expects a string argument; received %s',
240 240
                 __METHOD__,
@@ -265,14 +265,14 @@  discard block
 block discarded – undo
265 265
      */
266 266
     public function withUserInfo($user, $password = null) : UriInterface
267 267
     {
268
-        if (! is_string($user)) {
268
+        if (!is_string($user)) {
269 269
             throw new Exception\InvalidArgumentException(sprintf(
270 270
                 '%s expects a string user argument; received %s',
271 271
                 __METHOD__,
272 272
                 is_object($user) ? get_class($user) : gettype($user)
273 273
             ));
274 274
         }
275
-        if (null !== $password && ! is_string($password)) {
275
+        if (null !== $password && !is_string($password)) {
276 276
             throw new Exception\InvalidArgumentException(sprintf(
277 277
                 '%s expects a string or null password argument; received %s',
278 278
                 __METHOD__,
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 
283 283
         $info = $this->filterUserInfoPart($user);
284 284
         if (null !== $password) {
285
-            $info .= ':' . $this->filterUserInfoPart($password);
285
+            $info .= ':'.$this->filterUserInfoPart($password);
286 286
         }
287 287
 
288 288
         if ($info === $this->userInfo) {
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
      */
302 302
     public function withHost($host) : UriInterface
303 303
     {
304
-        if (! is_string($host)) {
304
+        if (!is_string($host)) {
305 305
             throw new Exception\InvalidArgumentException(sprintf(
306 306
                 '%s expects a string argument; received %s',
307 307
                 __METHOD__,
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
     public function withPort($port) : UriInterface
327 327
     {
328 328
         if ($port !== null) {
329
-            if (! is_numeric($port) || is_float($port)) {
329
+            if (!is_numeric($port) || is_float($port)) {
330 330
                 throw new Exception\InvalidArgumentException(sprintf(
331 331
                     'Invalid port "%s" specified; must be an integer, an integer string, or null',
332 332
                     is_object($port) ? get_class($port) : gettype($port)
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
      */
360 360
     public function withPath($path) : UriInterface
361 361
     {
362
-        if (! is_string($path)) {
362
+        if (!is_string($path)) {
363 363
             throw new Exception\InvalidArgumentException(
364 364
                 'Invalid path provided; must be a string'
365 365
             );
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
      */
396 396
     public function withQuery($query) : UriInterface
397 397
     {
398
-        if (! is_string($query)) {
398
+        if (!is_string($query)) {
399 399
             throw new Exception\InvalidArgumentException(
400 400
                 'Query string must be a string'
401 401
             );
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
      */
426 426
     public function withFragment($fragment) : UriInterface
427 427
     {
428
-        if (! is_string($fragment)) {
428
+        if (!is_string($fragment)) {
429 429
             throw new Exception\InvalidArgumentException(sprintf(
430 430
                 '%s expects a string argument; received %s',
431 431
                 __METHOD__,
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
         $this->fragment  = isset($parts['fragment']) ? $this->filterFragment($parts['fragment']) : '';
469 469
 
470 470
         if (isset($parts['pass'])) {
471
-            $this->userInfo .= ':' . $parts['pass'];
471
+            $this->userInfo .= ':'.$parts['pass'];
472 472
         }
473 473
     }
474 474
 
@@ -489,11 +489,11 @@  discard block
 block discarded – undo
489 489
         }
490 490
 
491 491
         if ('' !== $authority) {
492
-            $uri .= '//' . $authority;
492
+            $uri .= '//'.$authority;
493 493
         }
494 494
 
495 495
         if ('' !== $path && '/' !== substr($path, 0, 1)) {
496
-            $path = '/' . $path;
496
+            $path = '/'.$path;
497 497
         }
498 498
 
499 499
         $uri .= $path;
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
             return false;
524 524
         }
525 525
 
526
-        return ! isset($this->allowedSchemes[$scheme]) || $port !== $this->allowedSchemes[$scheme];
526
+        return !isset($this->allowedSchemes[$scheme]) || $port !== $this->allowedSchemes[$scheme];
527 527
     }
528 528
 
529 529
     /**
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
             return '';
542 542
         }
543 543
 
544
-        if (! isset($this->allowedSchemes[$scheme])) {
544
+        if (!isset($this->allowedSchemes[$scheme])) {
545 545
             throw new Exception\InvalidArgumentException(sprintf(
546 546
                 'Unsupported scheme "%s"; must be any empty string or in the set (%s)',
547 547
                 $scheme,
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
         // Note the addition of `%` to initial charset; this allows `|` portion
564 564
         // to match and thus prevent double-encoding.
565 565
         return preg_replace_callback(
566
-            '/(?:[^%' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . ']+|%(?![A-Fa-f0-9]{2}))/u',
566
+            '/(?:[^%'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.']+|%(?![A-Fa-f0-9]{2}))/u',
567 567
             [$this, 'urlEncodeChar'],
568 568
             $part
569 569
         );
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
     private function filterPath(string $path) : string
576 576
     {
577 577
         $path = preg_replace_callback(
578
-            '/(?:[^' . self::CHAR_UNRESERVED . ')(:@&=\+\$,\/;%]+|%(?![A-Fa-f0-9]{2}))/u',
578
+            '/(?:[^'.self::CHAR_UNRESERVED.')(:@&=\+\$,\/;%]+|%(?![A-Fa-f0-9]{2}))/u',
579 579
             [$this, 'urlEncodeChar'],
580 580
             $path
581 581
         );
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
         }
592 592
 
593 593
         // Ensure only one leading slash, to prevent XSS attempts.
594
-        return '/' . ltrim($path, '/');
594
+        return '/'.ltrim($path, '/');
595 595
     }
596 596
 
597 597
     /**
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
     private function splitQueryValue(string $value) : array
632 632
     {
633 633
         $data = explode('=', $value, 2);
634
-        if (! isset($data[1])) {
634
+        if (!isset($data[1])) {
635 635
             $data[] = null;
636 636
         }
637 637
         return $data;
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
     private function filterFragment(string $fragment) : string
644 644
     {
645 645
         if ('' !== $fragment && strpos($fragment, '#') === 0) {
646
-            $fragment = '%23' . substr($fragment, 1);
646
+            $fragment = '%23'.substr($fragment, 1);
647 647
         }
648 648
 
649 649
         return $this->filterQueryOrFragment($fragment);
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
     private function filterQueryOrFragment(string $value) : string
656 656
     {
657 657
         return preg_replace_callback(
658
-            '/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/\?]+|%(?![A-Fa-f0-9]{2}))/u',
658
+            '/(?:[^'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.'%:@\/\?]+|%(?![A-Fa-f0-9]{2}))/u',
659 659
             [$this, 'urlEncodeChar'],
660 660
             $value
661 661
         );
Please login to merge, or discard this patch.
back-end/library/vendor/ralouphie/getallheaders/tests/GetAllHeadersTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
             array(
101 101
                 'Authorization (PHP_AUTH_USER + PHP_AUTH_PW)',
102 102
                 array(
103
-                    'Authorization' => 'Basic ' . base64_encode('foo:bar')
103
+                    'Authorization' => 'Basic '.base64_encode('foo:bar')
104 104
                 ),
105 105
                 array(
106 106
                     'PHP_AUTH_USER' => 'foo',
Please login to merge, or discard this patch.
www/back-end/library/vendor/ralouphie/getallheaders/src/getallheaders.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
                 $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
35 35
             } elseif (isset($_SERVER['PHP_AUTH_USER'])) {
36 36
                 $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : '';
37
-                $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass);
37
+                $headers['Authorization'] = 'Basic '.base64_encode($_SERVER['PHP_AUTH_USER'].':'.$basic_pass);
38 38
             } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) {
39 39
                 $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST'];
40 40
             }
Please login to merge, or discard this patch.
library/vendor/ocramius/package-versions/src/PackageVersions/Versions.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -17,29 +17,29 @@
 block discarded – undo
17 17
 {
18 18
     public const ROOT_PACKAGE_NAME = '__root__';
19 19
     public const VERSIONS          = array (
20
-  'clue/stream-filter' => 'v1.4.0@d80fdee9b3a7e0d16fc330a22f41f3ad0eeb09d0',
21
-  'guzzlehttp/psr7' => '1.5.2@9f83dded91781a01c63574e387eaa769be769115',
22
-  'jean85/pretty-package-versions' => '1.2@75c7effcf3f77501d0e0caa75111aff4daa0dd48',
23
-  'ocramius/package-versions' => '1.4.0@a4d4b60d0e60da2487bd21a2c6ac089f85570dbb',
24
-  'paragonie/random_compat' => 'v9.99.99@84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95',
25
-  'php-http/client-common' => '2.0.0@2b8aa3c4910afc21146a9c8f96adb266e869517a',
26
-  'php-http/curl-client' => '2.0.0@e7a2a5ebcce1ff7d75eaf02b7c85634a6fac00da',
27
-  'php-http/discovery' => '1.6.1@684855f2c2e9d0a61868b8f8d6bd0295c8a4b651',
28
-  'php-http/httplug' => 'v2.0.0@b3842537338c949f2469557ef4ad4bdc47b58603',
29
-  'php-http/message' => '1.7.2@b159ffe570dffd335e22ef0b91a946eacb182fa1',
30
-  'php-http/message-factory' => 'v1.0.2@a478cb11f66a6ac48d8954216cfed9aa06a501a1',
31
-  'php-http/promise' => 'v1.0.0@dc494cdc9d7160b9a09bd5573272195242ce7980',
32
-  'psr/http-client' => '1.0.0@496a823ef742b632934724bf769560c2a5c7c44e',
33
-  'psr/http-factory' => '1.0.0@378bfe27931ecc54ff824a20d6f6bfc303bbd04c',
34
-  'psr/http-message' => '1.0.1@f6561bf28d520154e4b0ec72be95418abe6d9363',
35
-  'ralouphie/getallheaders' => '2.0.5@5601c8a83fbba7ef674a7369456d12f1e0d0eafa',
36
-  'ramsey/uuid' => '3.8.0@d09ea80159c1929d75b3f9c60504d613aeb4a1e3',
37
-  'sentry/sdk' => '2.0.2@3ea263b7fad78365ae3e4a6e1891babaee026305',
38
-  'sentry/sentry' => '2.0.1@99ab0ea727d4a226eb76b11484b62004f50aefb2',
39
-  'symfony/options-resolver' => 'v4.2.5@3896e5a7d06fd15fa4947694c8dcdd371ff147d1',
40
-  'symfony/polyfill-ctype' => 'v1.11.0@82ebae02209c21113908c229e9883c419720738a',
41
-  'zendframework/zend-diactoros' => '2.1.1@c3c330192bc9cc51b7e9ce968ff721dc32ffa986',
42
-  '__root__' => 'dev-master@e3039c6f547f86faab74b4c6220648fc42c56f9a',
20
+    'clue/stream-filter' => 'v1.4.0@d80fdee9b3a7e0d16fc330a22f41f3ad0eeb09d0',
21
+    'guzzlehttp/psr7' => '1.5.2@9f83dded91781a01c63574e387eaa769be769115',
22
+    'jean85/pretty-package-versions' => '1.2@75c7effcf3f77501d0e0caa75111aff4daa0dd48',
23
+    'ocramius/package-versions' => '1.4.0@a4d4b60d0e60da2487bd21a2c6ac089f85570dbb',
24
+    'paragonie/random_compat' => 'v9.99.99@84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95',
25
+    'php-http/client-common' => '2.0.0@2b8aa3c4910afc21146a9c8f96adb266e869517a',
26
+    'php-http/curl-client' => '2.0.0@e7a2a5ebcce1ff7d75eaf02b7c85634a6fac00da',
27
+    'php-http/discovery' => '1.6.1@684855f2c2e9d0a61868b8f8d6bd0295c8a4b651',
28
+    'php-http/httplug' => 'v2.0.0@b3842537338c949f2469557ef4ad4bdc47b58603',
29
+    'php-http/message' => '1.7.2@b159ffe570dffd335e22ef0b91a946eacb182fa1',
30
+    'php-http/message-factory' => 'v1.0.2@a478cb11f66a6ac48d8954216cfed9aa06a501a1',
31
+    'php-http/promise' => 'v1.0.0@dc494cdc9d7160b9a09bd5573272195242ce7980',
32
+    'psr/http-client' => '1.0.0@496a823ef742b632934724bf769560c2a5c7c44e',
33
+    'psr/http-factory' => '1.0.0@378bfe27931ecc54ff824a20d6f6bfc303bbd04c',
34
+    'psr/http-message' => '1.0.1@f6561bf28d520154e4b0ec72be95418abe6d9363',
35
+    'ralouphie/getallheaders' => '2.0.5@5601c8a83fbba7ef674a7369456d12f1e0d0eafa',
36
+    'ramsey/uuid' => '3.8.0@d09ea80159c1929d75b3f9c60504d613aeb4a1e3',
37
+    'sentry/sdk' => '2.0.2@3ea263b7fad78365ae3e4a6e1891babaee026305',
38
+    'sentry/sentry' => '2.0.1@99ab0ea727d4a226eb76b11484b62004f50aefb2',
39
+    'symfony/options-resolver' => 'v4.2.5@3896e5a7d06fd15fa4947694c8dcdd371ff147d1',
40
+    'symfony/polyfill-ctype' => 'v1.11.0@82ebae02209c21113908c229e9883c419720738a',
41
+    'zendframework/zend-diactoros' => '2.1.1@c3c330192bc9cc51b7e9ce968ff721dc32ffa986',
42
+    '__root__' => 'dev-master@e3039c6f547f86faab74b4c6220648fc42c56f9a',
43 43
 );
44 44
 
45 45
     private function __construct()
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 final class Versions
17 17
 {
18 18
     public const ROOT_PACKAGE_NAME = '__root__';
19
-    public const VERSIONS          = array (
19
+    public const VERSIONS          = array(
20 20
   'clue/stream-filter' => 'v1.4.0@d80fdee9b3a7e0d16fc330a22f41f3ad0eeb09d0',
21 21
   'guzzlehttp/psr7' => '1.5.2@9f83dded91781a01c63574e387eaa769be769115',
22 22
   'jean85/pretty-package-versions' => '1.2@75c7effcf3f77501d0e0caa75111aff4daa0dd48',
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         }
57 57
 
58 58
         throw new OutOfBoundsException(
59
-            'Required package "' . $packageName . '" is not installed: cannot detect its version'
59
+            'Required package "'.$packageName.'" is not installed: cannot detect its version'
60 60
         );
61 61
     }
62 62
 }
Please login to merge, or discard this patch.
www/back-end/library/vendor/clue/stream-filter/tests/FunZlibTest.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
     {
9 9
         $deflate = StreamFilter\fun('zlib.deflate');
10 10
 
11
-        $data = $deflate('hello') . $deflate(' ') . $deflate('world') . $deflate();
11
+        $data = $deflate('hello').$deflate(' ').$deflate('world').$deflate();
12 12
 
13 13
         $this->assertEquals(gzdeflate('hello world'), $data);
14 14
     }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $inflate = StreamFilter\fun('zlib.inflate');
47 47
 
48
-        $data = $inflate(gzdeflate('hello world')) . $inflate();
48
+        $data = $inflate(gzdeflate('hello world')).$inflate();
49 49
 
50 50
         $this->assertEquals('hello world', $data);
51 51
     }
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     {
55 55
         $inflate = StreamFilter\fun('zlib.inflate');
56 56
 
57
-        $data = $inflate("\x03\x00") . $inflate();
57
+        $data = $inflate("\x03\x00").$inflate();
58 58
 
59 59
         $this->assertEquals('', $data);
60 60
     }
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,9 @@  discard block
 block discarded – undo
15 15
 
16 16
     public function testFunZlibDeflateEmpty()
17 17
     {
18
-        if (PHP_VERSION >= 7) $this->markTestSkipped('Not supported on PHP7 (empty string does not invoke filter)');
18
+        if (PHP_VERSION >= 7) {
19
+            $this->markTestSkipped('Not supported on PHP7 (empty string does not invoke filter)');
20
+        }
19 21
 
20 22
         $deflate = StreamFilter\fun('zlib.deflate');
21 23
 
@@ -61,7 +63,9 @@  discard block
 block discarded – undo
61 63
 
62 64
     public function testFunZlibInflateBig()
63 65
     {
64
-        if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (final chunk will not be emitted)');
66
+        if (defined('HHVM_VERSION')) {
67
+            $this->markTestSkipped('Not supported on HHVM (final chunk will not be emitted)');
68
+        }
65 69
 
66 70
         $inflate = StreamFilter\fun('zlib.inflate');
67 71
 
Please login to merge, or discard this patch.
www/back-end/library/vendor/clue/stream-filter/tests/FilterTest.php 2 patches
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
     {
9 9
         $stream = $this->createStream();
10 10
 
11
-        StreamFilter\append($stream, function ($chunk) {
11
+        StreamFilter\append($stream, function($chunk) {
12 12
             return strtoupper($chunk);
13 13
         });
14 14
 
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
     {
41 41
         $stream = $this->createStream();
42 42
 
43
-        StreamFilter\append($stream, function ($chunk) {
44
-            return str_replace(array('a','e','i','o','u'), '', $chunk);
43
+        StreamFilter\append($stream, function($chunk) {
44
+            return str_replace(array('a', 'e', 'i', 'o', 'u'), '', $chunk);
45 45
         });
46 46
 
47 47
         fwrite($stream, 'hello');
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     {
58 58
         $stream = $this->createStream();
59 59
 
60
-        StreamFilter\append($stream, function ($chunk) {
60
+        StreamFilter\append($stream, function($chunk) {
61 61
             return '';
62 62
         });
63 63
 
@@ -76,16 +76,16 @@  discard block
 block discarded – undo
76 76
 
77 77
         $stream = $this->createStream();
78 78
 
79
-        StreamFilter\append($stream, function ($chunk = null) {
79
+        StreamFilter\append($stream, function($chunk = null) {
80 80
             if ($chunk === null) {
81 81
                 // this signals the end event
82 82
                 return '!';
83 83
             }
84
-            return $chunk . ' ';
84
+            return $chunk.' ';
85 85
         }, STREAM_FILTER_WRITE);
86 86
 
87 87
         $buffered = '';
88
-        StreamFilter\append($stream, function ($chunk) use (&$buffered) {
88
+        StreamFilter\append($stream, function($chunk) use (&$buffered) {
89 89
             $buffered .= $chunk;
90 90
             return '';
91 91
         });
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         $stream = $this->createStream();
104 104
 
105 105
         $ended = false;
106
-        $filter = StreamFilter\append($stream, function ($chunk = null) use (&$ended) {
106
+        $filter = StreamFilter\append($stream, function($chunk = null) use (&$ended) {
107 107
             if ($chunk === null) {
108 108
                 $ended = true;
109 109
             }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $stream = $this->createStream();
121 121
 
122 122
         $ended = false;
123
-        StreamFilter\append($stream, function ($chunk = null) use (&$ended) {
123
+        StreamFilter\append($stream, function($chunk = null) use (&$ended) {
124 124
             if ($chunk === null) {
125 125
                 $ended = true;
126 126
             }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
         $invoked = 0;
140 140
 
141
-        StreamFilter\append($stream, function ($chunk) use (&$invoked) {
141
+        StreamFilter\append($stream, function($chunk) use (&$invoked) {
142 142
             ++$invoked;
143 143
 
144 144
             return $chunk;
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
162 162
         $invoked = 0;
163 163
 
164
-        StreamFilter\append($stream, function ($chunk) use (&$invoked) {
164
+        StreamFilter\append($stream, function($chunk) use (&$invoked) {
165 165
             ++$invoked;
166 166
 
167 167
             return $chunk;
@@ -183,12 +183,12 @@  discard block
 block discarded – undo
183 183
     {
184 184
         $stream = $this->createStream();
185 185
 
186
-        StreamFilter\append($stream, function ($chunk) {
187
-            return '[' . $chunk . ']';
186
+        StreamFilter\append($stream, function($chunk) {
187
+            return '['.$chunk.']';
188 188
         }, STREAM_FILTER_WRITE);
189 189
 
190
-        StreamFilter\prepend($stream, function ($chunk) {
191
-            return '(' . $chunk . ')';
190
+        StreamFilter\prepend($stream, function($chunk) {
191
+            return '('.$chunk.')';
192 192
         }, STREAM_FILTER_WRITE);
193 193
 
194 194
         fwrite($stream, 'hello');
@@ -203,12 +203,12 @@  discard block
 block discarded – undo
203 203
     {
204 204
         $stream = $this->createStream();
205 205
 
206
-        $first = StreamFilter\append($stream, function ($chunk) {
207
-            return $chunk . '?';
206
+        $first = StreamFilter\append($stream, function($chunk) {
207
+            return $chunk.'?';
208 208
         }, STREAM_FILTER_WRITE);
209 209
 
210
-        StreamFilter\append($stream, function ($chunk) {
211
-            return $chunk . '!';
210
+        StreamFilter\append($stream, function($chunk) {
211
+            return $chunk.'!';
212 212
         }, STREAM_FILTER_WRITE);
213 213
 
214 214
         StreamFilter\remove($first);
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
         $stream = $this->createStream();
247 247
         $this->createErrorHandler($errors);
248 248
 
249
-        StreamFilter\append($stream, function ($chunk) {
249
+        StreamFilter\append($stream, function($chunk) {
250 250
             throw new DomainException($chunk);
251 251
         });
252 252
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         $stream = $this->createStream();
263 263
         $this->createErrorHandler($errors);
264 264
 
265
-        StreamFilter\append($stream, function ($chunk = null) {
265
+        StreamFilter\append($stream, function($chunk = null) {
266 266
             if ($chunk === null) {
267 267
                 throw new DomainException('end');
268 268
             }
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
         $this->createErrorHandler($errors);
292 292
 
293 293
         $ended = false;
294
-        StreamFilter\append($stream, function ($chunk = null) use (&$ended) {
294
+        StreamFilter\append($stream, function($chunk = null) use (&$ended) {
295 295
             if ($chunk === null) {
296 296
                 $ended = true;
297 297
                 return '';
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
         $stream = $this->createStream();
315 315
         $this->createErrorHandler($errors);
316 316
 
317
-        StreamFilter\append($stream, function ($chunk = null) {
317
+        StreamFilter\append($stream, function($chunk = null) {
318 318
             if ($chunk === null) {
319 319
                 $chunk = 'end';
320 320
                 //return '';
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
     public function testAppendInvalidStreamIsRuntimeError()
336 336
     {
337 337
         if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (does not reject invalid stream)');
338
-        StreamFilter\append(false, function () { });
338
+        StreamFilter\append(false, function() { });
339 339
     }
340 340
 
341 341
     /**
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
     public function testPrependInvalidStreamIsRuntimeError()
345 345
     {
346 346
         if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (does not reject invalid stream)');
347
-        StreamFilter\prepend(false, function () { });
347
+        StreamFilter\prepend(false, function() { });
348 348
     }
349 349
 
350 350
     /**
@@ -374,8 +374,8 @@  discard block
 block discarded – undo
374 374
     private function createErrorHandler(&$errors)
375 375
     {
376 376
         $errors = array();
377
-        set_error_handler(function ($_, $message) use (&$errors) {
378
-            $errors []= $message;
377
+        set_error_handler(function($_, $message) use (&$errors) {
378
+            $errors [] = $message;
379 379
         });
380 380
     }
381 381
 
Please login to merge, or discard this patch.
Braces   +57 added lines, -25 removed lines patch added patch discarded remove patch
@@ -8,7 +8,8 @@  discard block
 block discarded – undo
8 8
     {
9 9
         $stream = $this->createStream();
10 10
 
11
-        StreamFilter\append($stream, function ($chunk) {
11
+        StreamFilter\append($stream, function ($chunk)
12
+        {
12 13
             return strtoupper($chunk);
13 14
         });
14 15
 
@@ -40,7 +41,8 @@  discard block
 block discarded – undo
40 41
     {
41 42
         $stream = $this->createStream();
42 43
 
43
-        StreamFilter\append($stream, function ($chunk) {
44
+        StreamFilter\append($stream, function ($chunk)
45
+        {
44 46
             return str_replace(array('a','e','i','o','u'), '', $chunk);
45 47
         });
46 48
 
@@ -57,7 +59,8 @@  discard block
 block discarded – undo
57 59
     {
58 60
         $stream = $this->createStream();
59 61
 
60
-        StreamFilter\append($stream, function ($chunk) {
62
+        StreamFilter\append($stream, function ($chunk)
63
+        {
61 64
             return '';
62 65
         });
63 66
 
@@ -72,11 +75,14 @@  discard block
 block discarded – undo
72 75
 
73 76
     public function testAppendEndEventCanBeBufferedOnClose()
74 77
     {
75
-        if (PHP_VERSION < 5.4) $this->markTestSkipped('Not supported on legacy PHP');
78
+        if (PHP_VERSION < 5.4) {
79
+            $this->markTestSkipped('Not supported on legacy PHP');
80
+        }
76 81
 
77 82
         $stream = $this->createStream();
78 83
 
79
-        StreamFilter\append($stream, function ($chunk = null) {
84
+        StreamFilter\append($stream, function ($chunk = null)
85
+        {
80 86
             if ($chunk === null) {
81 87
                 // this signals the end event
82 88
                 return '!';
@@ -85,7 +91,8 @@  discard block
 block discarded – undo
85 91
         }, STREAM_FILTER_WRITE);
86 92
 
87 93
         $buffered = '';
88
-        StreamFilter\append($stream, function ($chunk) use (&$buffered) {
94
+        StreamFilter\append($stream, function ($chunk) use (&$buffered)
95
+        {
89 96
             $buffered .= $chunk;
90 97
             return '';
91 98
         });
@@ -103,7 +110,8 @@  discard block
 block discarded – undo
103 110
         $stream = $this->createStream();
104 111
 
105 112
         $ended = false;
106
-        $filter = StreamFilter\append($stream, function ($chunk = null) use (&$ended) {
113
+        $filter = StreamFilter\append($stream, function ($chunk = null) use (&$ended)
114
+        {
107 115
             if ($chunk === null) {
108 116
                 $ended = true;
109 117
             }
@@ -120,7 +128,8 @@  discard block
 block discarded – undo
120 128
         $stream = $this->createStream();
121 129
 
122 130
         $ended = false;
123
-        StreamFilter\append($stream, function ($chunk = null) use (&$ended) {
131
+        StreamFilter\append($stream, function ($chunk = null) use (&$ended)
132
+        {
124 133
             if ($chunk === null) {
125 134
                 $ended = true;
126 135
             }
@@ -138,7 +147,8 @@  discard block
 block discarded – undo
138 147
 
139 148
         $invoked = 0;
140 149
 
141
-        StreamFilter\append($stream, function ($chunk) use (&$invoked) {
150
+        StreamFilter\append($stream, function ($chunk) use (&$invoked)
151
+        {
142 152
             ++$invoked;
143 153
 
144 154
             return $chunk;
@@ -161,7 +171,8 @@  discard block
 block discarded – undo
161 171
 
162 172
         $invoked = 0;
163 173
 
164
-        StreamFilter\append($stream, function ($chunk) use (&$invoked) {
174
+        StreamFilter\append($stream, function ($chunk) use (&$invoked)
175
+        {
165 176
             ++$invoked;
166 177
 
167 178
             return $chunk;
@@ -183,11 +194,13 @@  discard block
 block discarded – undo
183 194
     {
184 195
         $stream = $this->createStream();
185 196
 
186
-        StreamFilter\append($stream, function ($chunk) {
197
+        StreamFilter\append($stream, function ($chunk)
198
+        {
187 199
             return '[' . $chunk . ']';
188 200
         }, STREAM_FILTER_WRITE);
189 201
 
190
-        StreamFilter\prepend($stream, function ($chunk) {
202
+        StreamFilter\prepend($stream, function ($chunk)
203
+        {
191 204
             return '(' . $chunk . ')';
192 205
         }, STREAM_FILTER_WRITE);
193 206
 
@@ -203,11 +216,13 @@  discard block
 block discarded – undo
203 216
     {
204 217
         $stream = $this->createStream();
205 218
 
206
-        $first = StreamFilter\append($stream, function ($chunk) {
219
+        $first = StreamFilter\append($stream, function ($chunk)
220
+        {
207 221
             return $chunk . '?';
208 222
         }, STREAM_FILTER_WRITE);
209 223
 
210
-        StreamFilter\append($stream, function ($chunk) {
224
+        StreamFilter\append($stream, function ($chunk)
225
+        {
211 226
             return $chunk . '!';
212 227
         }, STREAM_FILTER_WRITE);
213 228
 
@@ -223,7 +238,9 @@  discard block
 block discarded – undo
223 238
 
224 239
     public function testAppendFunDechunk()
225 240
     {
226
-        if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (dechunk filter does not exist)');
241
+        if (defined('HHVM_VERSION')) {
242
+            $this->markTestSkipped('Not supported on HHVM (dechunk filter does not exist)');
243
+        }
227 244
 
228 245
         $stream = $this->createStream();
229 246
 
@@ -246,7 +263,8 @@  discard block
 block discarded – undo
246 263
         $stream = $this->createStream();
247 264
         $this->createErrorHandler($errors);
248 265
 
249
-        StreamFilter\append($stream, function ($chunk) {
266
+        StreamFilter\append($stream, function ($chunk)
267
+        {
250 268
             throw new DomainException($chunk);
251 269
         });
252 270
 
@@ -262,7 +280,8 @@  discard block
 block discarded – undo
262 280
         $stream = $this->createStream();
263 281
         $this->createErrorHandler($errors);
264 282
 
265
-        StreamFilter\append($stream, function ($chunk = null) {
283
+        StreamFilter\append($stream, function ($chunk = null)
284
+        {
266 285
             if ($chunk === null) {
267 286
                 throw new DomainException('end');
268 287
             }
@@ -291,7 +310,8 @@  discard block
 block discarded – undo
291 310
         $this->createErrorHandler($errors);
292 311
 
293 312
         $ended = false;
294
-        StreamFilter\append($stream, function ($chunk = null) use (&$ended) {
313
+        StreamFilter\append($stream, function ($chunk = null) use (&$ended)
314
+        {
295 315
             if ($chunk === null) {
296 316
                 $ended = true;
297 317
                 return '';
@@ -314,7 +334,8 @@  discard block
 block discarded – undo
314 334
         $stream = $this->createStream();
315 335
         $this->createErrorHandler($errors);
316 336
 
317
-        StreamFilter\append($stream, function ($chunk = null) {
337
+        StreamFilter\append($stream, function ($chunk = null)
338
+        {
318 339
             if ($chunk === null) {
319 340
                 $chunk = 'end';
320 341
                 //return '';
@@ -334,8 +355,12 @@  discard block
 block discarded – undo
334 355
      */
335 356
     public function testAppendInvalidStreamIsRuntimeError()
336 357
     {
337
-        if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (does not reject invalid stream)');
338
-        StreamFilter\append(false, function () { });
358
+        if (defined('HHVM_VERSION')) {
359
+            $this->markTestSkipped('Not supported on HHVM (does not reject invalid stream)');
360
+        }
361
+        StreamFilter\append(false, function ()
362
+        {
363
+});
339 364
     }
340 365
 
341 366
     /**
@@ -343,8 +368,12 @@  discard block
 block discarded – undo
343 368
      */
344 369
     public function testPrependInvalidStreamIsRuntimeError()
345 370
     {
346
-        if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (does not reject invalid stream)');
347
-        StreamFilter\prepend(false, function () { });
371
+        if (defined('HHVM_VERSION')) {
372
+            $this->markTestSkipped('Not supported on HHVM (does not reject invalid stream)');
373
+        }
374
+        StreamFilter\prepend(false, function ()
375
+        {
376
+});
348 377
     }
349 378
 
350 379
     /**
@@ -352,7 +381,9 @@  discard block
 block discarded – undo
352 381
      */
353 382
     public function testRemoveInvalidFilterIsRuntimeError()
354 383
     {
355
-        if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (does not reject invalid filters)');
384
+        if (defined('HHVM_VERSION')) {
385
+            $this->markTestSkipped('Not supported on HHVM (does not reject invalid filters)');
386
+        }
356 387
         StreamFilter\remove(false);
357 388
     }
358 389
 
@@ -374,7 +405,8 @@  discard block
 block discarded – undo
374 405
     private function createErrorHandler(&$errors)
375 406
     {
376 407
         $errors = array();
377
-        set_error_handler(function ($_, $message) use (&$errors) {
408
+        set_error_handler(function ($_, $message) use (&$errors)
409
+        {
378 410
             $errors []= $message;
379 411
         });
380 412
     }
Please login to merge, or discard this patch.
www/back-end/library/vendor/clue/stream-filter/src/functions.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
     if ($ret === false) {
22 22
         $error = error_get_last() + array('message' => '');
23
-        throw new RuntimeException('Unable to append filter: ' . $error['message']);
23
+        throw new RuntimeException('Unable to append filter: '.$error['message']);
24 24
     }
25 25
 
26 26
     return $ret;
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
     if ($ret === false) {
44 44
         $error = error_get_last() + array('message' => '');
45
-        throw new RuntimeException('Unable to prepend filter: ' . $error['message']);
45
+        throw new RuntimeException('Unable to prepend filter: '.$error['message']);
46 46
     }
47 47
 
48 48
     return $ret;
@@ -79,12 +79,12 @@  discard block
 block discarded – undo
79 79
     if ($filter === false) {
80 80
         fclose($fp);
81 81
         $error = error_get_last() + array('message' => '');
82
-        throw new RuntimeException('Unable to access built-in filter: ' . $error['message']);
82
+        throw new RuntimeException('Unable to access built-in filter: '.$error['message']);
83 83
     }
84 84
 
85 85
     // append filter function which buffers internally
86 86
     $buffer = '';
87
-    append($fp, function ($chunk) use (&$buffer) {
87
+    append($fp, function($chunk) use (&$buffer) {
88 88
         $buffer .= $chunk;
89 89
 
90 90
         // always return empty string in order to skip actually writing to stream resource
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
     $closed = false;
95 95
 
96
-    return function ($chunk = null) use ($fp, $filter, &$buffer, &$closed) {
96
+    return function($chunk = null) use ($fp, $filter, &$buffer, &$closed) {
97 97
         if ($closed) {
98 98
             throw new RuntimeException('Unable to perform operation on closed stream');
99 99
         }
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     static $registered = null;
141 141
     if ($registered === null) {
142 142
         $registered = 'stream-callback';
143
-        stream_filter_register($registered, __NAMESPACE__ . '\CallbackFilter');
143
+        stream_filter_register($registered, __NAMESPACE__.'\CallbackFilter');
144 144
     }
145 145
     return $registered;
146 146
 }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,7 +84,8 @@  discard block
 block discarded – undo
84 84
 
85 85
     // append filter function which buffers internally
86 86
     $buffer = '';
87
-    append($fp, function ($chunk) use (&$buffer) {
87
+    append($fp, function ($chunk) use (&$buffer)
88
+    {
88 89
         $buffer .= $chunk;
89 90
 
90 91
         // always return empty string in order to skip actually writing to stream resource
@@ -93,7 +94,8 @@  discard block
 block discarded – undo
93 94
 
94 95
     $closed = false;
95 96
 
96
-    return function ($chunk = null) use ($fp, $filter, &$buffer, &$closed) {
97
+    return function ($chunk = null) use ($fp, $filter, &$buffer, &$closed)
98
+    {
97 99
         if ($closed) {
98 100
             throw new RuntimeException('Unable to perform operation on closed stream');
99 101
         }
Please login to merge, or discard this patch.
www/back-end/library/vendor/clue/stream-filter/src/CallbackFilter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             } catch (Exception $e) {
78 78
                 // exception should mark filter as closed
79 79
                 $this->onClose();
80
-                trigger_error('Error invoking filter: ' . $e->getMessage(), E_USER_WARNING);
80
+                trigger_error('Error invoking filter: '.$e->getMessage(), E_USER_WARNING);
81 81
 
82 82
                 return PSFS_ERR_FATAL;
83 83
             }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                 try {
96 96
                     $data .= call_user_func($this->callback);
97 97
                 } catch (Exception $e) {
98
-                    trigger_error('Error ending filter: ' . $e->getMessage(), E_USER_WARNING);
98
+                    trigger_error('Error ending filter: '.$e->getMessage(), E_USER_WARNING);
99 99
 
100 100
                     return PSFS_ERR_FATAL;
101 101
                 }
Please login to merge, or discard this patch.