Passed
Pull Request — master (#24)
by Timon
06:19
created
src/Serializer/QueryNormalizer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace TBolier\RethinkQL\Serializer;
5 5
 
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         }
22 22
 
23 23
         if (!$object instanceof \JsonSerializable && !$object instanceof \stdClass) {
24
-            throw new InvalidArgumentException(sprintf('The ' . get_class($object) . ' must implement "%s".', \JsonSerializable::class));
24
+            throw new InvalidArgumentException(sprintf('The '.get_class($object).' must implement "%s".', \JsonSerializable::class));
25 25
         }
26 26
 
27 27
         if (!$this->serializer instanceof NormalizerInterface) {
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
         }
30 30
 
31 31
         if ($object instanceof \stdClass) {
32
-            return (array)$object;
32
+            return (array) $object;
33 33
         }
34 34
 
35 35
         if ($object instanceof OptionsInterface) {
36
-            return (object)$object->jsonSerialize();
36
+            return (object) $object->jsonSerialize();
37 37
         }
38 38
 
39 39
         return $this->serializer->normalize($object->jsonSerialize(), $format, $context);
Please login to merge, or discard this patch.
src/RethinkInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace TBolier\RethinkQL;
5 5
 
Please login to merge, or discard this patch.
test/Bootstrap.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 mb_internal_encoding('UTF-8');
5 5
 
6
-require_once __DIR__ . '/../vendor/autoload.php';
6
+require_once __DIR__.'/../vendor/autoload.php';
7 7
 
8
-$configFile =  '/config.php';
8
+$configFile = '/config.php';
9 9
 if (getenv('integration_test_file')) {
10
-    $configFile =  '/config_scrutinizer.php';
10
+    $configFile = '/config_scrutinizer.php';
11 11
 }
12 12
 
13
-require_once __DIR__ . $configFile;
13
+require_once __DIR__.$configFile;
Please login to merge, or discard this patch.
test/unit/BaseUnitTestCase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace TBolier\RethinkQL\UnitTest;
5 5
 
Please login to merge, or discard this patch.
test/unit/Query/MessageTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace TBolier\RethinkQL\UnitTest\Query;
5 5
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $expectedResults = [
49 49
             1,
50 50
             $query,
51
-            (object)$options,
51
+            (object) $options,
52 52
         ];
53 53
 
54 54
         $this->assertEquals($expectedResults, $message->toArray());
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $expectedResults = [
70 70
             1,
71 71
             $query,
72
-            (object)$options,
72
+            (object) $options,
73 73
         ];
74 74
 
75 75
         $this->assertEquals($expectedResults, $message->jsonSerialize());
Please login to merge, or discard this patch.
test/unit/Connection/ConnectionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace TBolier\RethinkQL\UnitTest\Connection;
5 5
 
Please login to merge, or discard this patch.
test/unit/Connection/OptionsTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace TBolier\RethinkQL\UnitTest\Connection;
5 5
 
Please login to merge, or discard this patch.
test/unit/Connection/Socket/HandshakeTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace TBolier\RethinkQL\UnitTest\Connection\Socket;
5 5
 
Please login to merge, or discard this patch.
test/unit/Connection/BaseConnectionTestCase.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace TBolier\RethinkQL\UnitTest\Connection;
5 5
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         parent::setUp();
50 50
 
51 51
         $this->stream = Mockery::mock(StreamInterface::class);
52
-        $this->streamWrapper = function () {
52
+        $this->streamWrapper = function() {
53 53
             return $this->stream;
54 54
         };
55 55
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      */
106 106
     protected function catchStreamWrite(\stdClass $buffer)
107 107
     {
108
-        $this->stream->shouldReceive('write')->andReturnUsing(function ($string) use ($buffer) {
108
+        $this->stream->shouldReceive('write')->andReturnUsing(function($string) use ($buffer) {
109 109
             $buffer->data = $string;
110 110
 
111 111
             return 20;
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
     protected function catchStreamRead(int $bytes, \stdClass $buffer): void
118 118
     {
119
-        $this->stream->shouldReceive('read')->once()->with($bytes)->andReturnUsing(function ($bytes) use (&$buffer) {
119
+        $this->stream->shouldReceive('read')->once()->with($bytes)->andReturnUsing(function($bytes) use (&$buffer) {
120 120
             $data = '';
121 121
             if (isset($buffer->data)) {
122 122
                 $data = substr($buffer->data, 0, $bytes);
Please login to merge, or discard this patch.