@@ -103,14 +103,14 @@ discard block |
||
103 | 103 | static $items = []; |
104 | 104 | $cache = $this->prophesize(CacheItemPoolInterface::class); |
105 | 105 | $that = $this; |
106 | - $cache->getItem(Argument::type('string'))->will(function ($args) use (&$items, $that) { |
|
106 | + $cache->getItem(Argument::type('string'))->will(function($args) use (&$items, $that) { |
|
107 | 107 | $key = $args[0]; |
108 | 108 | if (!array_key_exists($key, $items)) { |
109 | 109 | $item = $that->prophesize(CacheItemInterface::class); |
110 | 110 | $item->getKey()->willReturn($key); |
111 | 111 | $item->isHit()->willReturn(false); |
112 | 112 | $item->get()->willReturn(null); |
113 | - $item->set(Argument::any())->will(function ($args) use ($item) { |
|
113 | + $item->set(Argument::any())->will(function($args) use ($item) { |
|
114 | 114 | $item->get()->willReturn($args[0]); |
115 | 115 | }); |
116 | 116 | $item->expiresAfter(Argument::type('int'))->willReturn($item); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | |
123 | 123 | return $items[$key]->reveal(); |
124 | 124 | }); |
125 | - $cache->save(Argument::type(CacheItemInterface::class))->will(function ($args) use (&$items) { |
|
125 | + $cache->save(Argument::type(CacheItemInterface::class))->will(function($args) use (&$items) { |
|
126 | 126 | $item = $args[0]; |
127 | 127 | $items[$item->getKey()]->isHit()->willReturn(true); |
128 | 128 | }); |
@@ -125,7 +125,7 @@ |
||
125 | 125 | $this->manager->getConfiguration() |
126 | 126 | ->getTypeRegistry() |
127 | 127 | ->get($targetMetadata->getTypeOfField($targetIdName)); |
128 | - $identifiers = [$targetIdName => $type->fromApiValue($value)]; |
|
128 | + $identifiers = [$targetIdName => $type->fromApiValue($value)]; |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | return $targetPersister->getToOneEntity($mapping, $entity, $identifiers); |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | { |
90 | 90 | $wakeupProxy = $classMetadata->getReflectionClass()->hasMethod('__wakeup'); |
91 | 91 | |
92 | - return function (Proxy $proxy) use ($classMetadata, $wakeupProxy, $persister) { |
|
92 | + return function(Proxy $proxy) use ($classMetadata, $wakeupProxy, $persister) { |
|
93 | 93 | $initializer = $proxy->__getInitializer(); |
94 | 94 | $cloner = $proxy->__getCloner(); |
95 | 95 | |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | */ |
131 | 131 | private function createCloner(ApiMetadata $classMetadata, ApiPersister $persister) |
132 | 132 | { |
133 | - return function (Proxy $proxy) use ($classMetadata, $persister) { |
|
133 | + return function(Proxy $proxy) use ($classMetadata, $persister) { |
|
134 | 134 | if ($proxy->__isInitialized()) { |
135 | 135 | return; |
136 | 136 | } |
@@ -258,7 +258,7 @@ |
||
258 | 258 | |
259 | 259 | self::assertCount(2, $references); |
260 | 260 | foreach ($references as $reference) { |
261 | - self::assertSame('test-payload-'.$reference->getId(), $reference->getReferencePayload()); |
|
261 | + self::assertSame('test-payload-' . $reference->getId(), $reference->getReferencePayload()); |
|
262 | 262 | } |
263 | 263 | } |
264 | 264 |
@@ -45,7 +45,7 @@ |
||
45 | 45 | return $this->provider->getMethod($method); |
46 | 46 | } |
47 | 47 | |
48 | - return $this->entityPath.$this->pathSeparator.$method; |
|
48 | + return $this->entityPath . $this->pathSeparator . $method; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | /** @var EntityMetadata $target */ |
111 | 111 | $target = $this->manager->getClassMetadata($mapping['target']); |
112 | 112 | |
113 | - $converter = function ($value) use ($target) { |
|
113 | + $converter = function($value) use ($target) { |
|
114 | 114 | if (!is_object($value)) { |
115 | 115 | return $value; |
116 | 116 | } |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | $targetMetadata = $this->manager->getClassMetadata($targetClass); |
275 | 275 | |
276 | 276 | if ($this->metadata->isIdentifierComposite) { |
277 | - throw new \BadMethodCallException(__METHOD__.' on composite reference is not supported'); |
|
277 | + throw new \BadMethodCallException(__METHOD__ . ' on composite reference is not supported'); |
|
278 | 278 | } |
279 | 279 | |
280 | 280 | $criteria = [ |
@@ -54,7 +54,7 @@ |
||
54 | 54 | throw MappingException::unknownAlias($namespaceAlias); |
55 | 55 | } |
56 | 56 | |
57 | - return $this->aliases[$namespaceAlias].$simpleClassName; |
|
57 | + return $this->aliases[$namespaceAlias] . $simpleClassName; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /** {@inheritdoc} */ |
@@ -65,12 +65,12 @@ discard block |
||
65 | 65 | |
66 | 66 | assert( |
67 | 67 | in_array(Searcher::class, class_implements($metadata->searcher), true), |
68 | - 'Searcher '.$metadata->searcher.' should implement '.Searcher::class |
|
68 | + 'Searcher ' . $metadata->searcher . ' should implement ' . Searcher::class |
|
69 | 69 | ); |
70 | 70 | |
71 | 71 | assert( |
72 | 72 | in_array(Finder::class, class_implements($metadata->finder), true), |
73 | - 'Finder '.$metadata->finder.' should implement '.Finder::class |
|
73 | + 'Finder ' . $metadata->finder . ' should implement ' . Finder::class |
|
74 | 74 | ); |
75 | 75 | |
76 | 76 | $methodProvider = null; |
@@ -80,8 +80,7 @@ discard block |
||
80 | 80 | if (array_key_exists('entityPath', $element['client'])) { |
81 | 81 | $pathSeparator = |
82 | 82 | array_key_exists('entityPathSeparator', $element['client']) ? |
83 | - $element['client']['entityPathSeparator'] : |
|
84 | - null; |
|
83 | + $element['client']['entityPathSeparator'] : null; |
|
85 | 84 | $methodProvider = |
86 | 85 | new EntityMethodProvider($element['client']['entityPath'], $pathSeparator, $methodProvider); |
87 | 86 | } |
@@ -155,9 +155,9 @@ |
||
155 | 155 | } |
156 | 156 | |
157 | 157 | if ($property->isProtected()) { |
158 | - return "\0*\0".$propertyName; |
|
158 | + return "\0*\0" . $propertyName; |
|
159 | 159 | } |
160 | 160 | |
161 | - return "\0".$property->getDeclaringClass()->getName()."\0".$propertyName; |
|
161 | + return "\0" . $property->getDeclaringClass()->getName() . "\0" . $propertyName; |
|
162 | 162 | } |
163 | 163 | } |