Completed
Pull Request — master (#14)
by Pavel
05:32 queued 02:29
created
Tests/ProxyTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
                     'sub-payload' => 'sub-payload',
168 168
                 ]
169 169
             ),
170
-            function (RpcRequestInterface $request) {
170
+            function(RpcRequestInterface $request) {
171 171
                 self::assertEquals('test-entity/find', $request->getMethod());
172 172
                 self::assertEquals(['id' => 1], $request->getParameters());
173 173
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
                     ],
192 192
                 ]
193 193
             ),
194
-            function (RpcRequestInterface $request) {
194
+            function(RpcRequestInterface $request) {
195 195
                 self::assertEquals('test-reference/search', $request->getMethod());
196 196
                 self::assertEquals(
197 197
                     [
Please login to merge, or discard this patch.
Tests/CountingTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
                     ],
37 37
                 ]
38 38
             ),
39
-            function (RpcRequestInterface $request) {
39
+            function(RpcRequestInterface $request) {
40 40
                 self::assertEquals('test-entity/search', $request->getMethod());
41 41
                 self::assertEquals(
42 42
                     [
Please login to merge, or discard this patch.
Tests/CustomRepositoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
                     ],
37 37
                 ]
38 38
             ),
39
-            function (RpcRequestInterface $request) {
39
+            function(RpcRequestInterface $request) {
40 40
                 self::assertEquals('test-entity/search', $request->getMethod());
41 41
                 self::assertEquals(
42 42
                     [
Please login to merge, or discard this patch.
EntityManager.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
     public function remove($object)
95 95
     {
96 96
         $this->getUnitOfWork()->getEntityPersister(get_class($object))
97
-             ->delete($object);
97
+                ->delete($object);
98 98
     }
99 99
 
100 100
     /** {@inheritdoc} */
Please login to merge, or discard this patch.
Tests/CommitTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
         $this->getClient('test-reference-client')->push(
16 16
             $this->getResponseMock(true, 241),
17
-            function (RpcRequestInterface $request) {
17
+            function(RpcRequestInterface $request) {
18 18
                 self::assertEquals('test-reference/create', $request->getMethod());
19 19
                 self::assertEquals(
20 20
                     [
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
         $this->getClient()->push(
45 45
             $this->getResponseMock(true, 42),
46
-            function (RpcRequestInterface $request) {
46
+            function(RpcRequestInterface $request) {
47 47
                 self::assertEquals('test-entity/create', $request->getMethod());
48 48
                 self::assertEquals(
49 49
                     [
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
         $this->getClient('test-reference-client')->push(
61 61
             $this->getResponseMock(true, 241),
62
-            function (RpcRequestInterface $request) {
62
+            function(RpcRequestInterface $request) {
63 63
                 self::assertEquals('test-reference/create', $request->getMethod());
64 64
                 self::assertEquals(
65 65
                     [
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $newParent = new TestEntity();
97 97
         $this->getClient()->push(
98 98
             $this->getResponseMock(true, 17),
99
-            function (RpcRequestInterface $request) {
99
+            function(RpcRequestInterface $request) {
100 100
                 self::assertEquals('test-entity/create', $request->getMethod());
101 101
                 self::assertEquals(
102 102
                     [
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         );
112 112
         $this->getClient('test-reference-client')->push(
113 113
             $this->getResponseMock(true, null),
114
-            function (RpcRequestInterface $request) {
114
+            function(RpcRequestInterface $request) {
115 115
                 self::assertEquals('test-reference/patch', $request->getMethod());
116 116
                 self::assertEquals(
117 117
                     [
Please login to merge, or discard this patch.
UnitOfWork.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     }
173 173
 
174 174
     /**
175
-     * @param             $className
175
+     * @param             string $className
176 176
      * @param \stdClass   $data
177 177
      *
178 178
      * @return ObjectManagerAware|object
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
      * INTERNAL:
231 231
      * Registers an entity as managed.
232 232
      *
233
-     * @param object         $entity The entity.
233
+     * @param Proxy         $entity The entity.
234 234
      * @param array          $id     The identifier values.
235 235
      * @param \stdClass|null $data   The original entity data.
236 236
      *
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     private static function objToStr($obj)
118 118
     {
119
-        return method_exists($obj, '__toString') ? (string)$obj : get_class($obj).'@'.spl_object_hash($obj);
119
+        return method_exists($obj, '__toString') ? (string)$obj : get_class($obj) . '@' . spl_object_hash($obj);
120 120
     }
121 121
 
122 122
     /**
@@ -1088,7 +1088,7 @@  discard block
 block discarded – undo
1088 1088
     public function getCollectionPersister($association)
1089 1089
     {
1090 1090
         $role = isset($association['cache'])
1091
-            ? $association['sourceEntity'].'::'.$association['fieldName']
1091
+            ? $association['sourceEntity'] . '::' . $association['fieldName']
1092 1092
             : $association['type'];
1093 1093
         if (array_key_exists($role, $this->collectionPersisters)) {
1094 1094
             return $this->collectionPersisters[$role];
@@ -1345,7 +1345,7 @@  discard block
 block discarded – undo
1345 1345
                 // Can actually not happen right now since we assume STATE_NEW.
1346 1346
                 throw new \InvalidArgumentException('Detached entity cannot be persisted');
1347 1347
             default:
1348
-                throw new \UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity));
1348
+                throw new \UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity));
1349 1349
         }
1350 1350
         $this->cascadePersist($entity, $visited);
1351 1351
     }
@@ -1506,7 +1506,7 @@  discard block
 block discarded – undo
1506 1506
         $state = $this->getEntityState($entity);
1507 1507
         if ($state !== self::STATE_MANAGED && $state !== self::STATE_REMOVED) {
1508 1508
             throw new \InvalidArgumentException(
1509
-                "Entity has to be managed or scheduled for removal for single computation ".self::objToStr($entity)
1509
+                "Entity has to be managed or scheduled for removal for single computation " . self::objToStr($entity)
1510 1510
             );
1511 1511
         }
1512 1512
         $class = $this->manager->getClassMetadata(get_class($entity));
@@ -1690,7 +1690,7 @@  discard block
 block discarded – undo
1690 1690
         $class               = $this->manager->getClassMetadata(get_class($entity));
1691 1691
         $associationMappings = array_filter(
1692 1692
             $class->getAssociationMappings(),
1693
-            function ($assoc) {
1693
+            function($assoc) {
1694 1694
                 return $assoc['isCascadeRefresh'];
1695 1695
             }
1696 1696
         );
@@ -1729,7 +1729,7 @@  discard block
 block discarded – undo
1729 1729
         $class               = $this->manager->getClassMetadata(get_class($entity));
1730 1730
         $associationMappings = array_filter(
1731 1731
             $class->getAssociationMappings(),
1732
-            function ($assoc) {
1732
+            function($assoc) {
1733 1733
                 return $assoc['isCascadeDetach'];
1734 1734
             }
1735 1735
         );
@@ -1769,7 +1769,7 @@  discard block
 block discarded – undo
1769 1769
         $class               = $this->manager->getClassMetadata(get_class($entity));
1770 1770
         $associationMappings = array_filter(
1771 1771
             $class->getAssociationMappings(),
1772
-            function ($assoc) {
1772
+            function($assoc) {
1773 1773
                 return $assoc['isCascadeMerge'];
1774 1774
             }
1775 1775
         );
@@ -1807,11 +1807,11 @@  discard block
 block discarded – undo
1807 1807
         $class               = $this->manager->getClassMetadata(get_class($entity));
1808 1808
         $associationMappings = array_filter(
1809 1809
             $class->getAssociationMappings(),
1810
-            function ($assoc) {
1810
+            function($assoc) {
1811 1811
                 return $assoc['isCascadeRemove'];
1812 1812
             }
1813 1813
         );
1814
-        $entitiesToCascade   = [];
1814
+        $entitiesToCascade = [];
1815 1815
         foreach ($associationMappings as $assoc) {
1816 1816
             if ($entity instanceof Proxy && !$entity->__isInitialized__) {
1817 1817
                 $entity->__load();
@@ -1993,7 +1993,7 @@  discard block
 block discarded – undo
1993 1993
             case self::STATE_DETACHED:
1994 1994
                 throw new \InvalidArgumentException('Detached entity cannot be removed');
1995 1995
             default:
1996
-                throw new \UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity));
1996
+                throw new \UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity));
1997 1997
         }
1998 1998
     }
1999 1999
 
Please login to merge, or discard this patch.
Utility/ReflectionPropertiesGetter.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
     }
51 51
 
52 52
     /**
53
-     * @param $className
53
+     * @param string $className
54 54
      *
55 55
      * @return \ReflectionProperty[] indexed by property internal name
56 56
      */
Please login to merge, or discard this patch.
Exception/ApiFactoryRegistryException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,6 +6,6 @@
 block discarded – undo
6 6
 {
7 7
     public static function unknown($alias)
8 8
     {
9
-        return new static(sprintf('Unknown API alias to create: '.$alias));
9
+        return new static(sprintf('Unknown API alias to create: ' . $alias));
10 10
     }
11 11
 }
Please login to merge, or discard this patch.