@@ -167,7 +167,7 @@ discard block |
||
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 |
||
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 | [ |
@@ -36,7 +36,7 @@ |
||
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 | [ |
@@ -36,7 +36,7 @@ |
||
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 | [ |
@@ -94,7 +94,7 @@ |
||
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} */ |
@@ -14,7 +14,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | [ |
@@ -172,7 +172,7 @@ discard block |
||
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 |
||
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 | * |
@@ -116,7 +116,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -50,7 +50,7 @@ |
||
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 | */ |
@@ -6,6 +6,6 @@ |
||
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 | } |