@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $this->assertEquals(null, $a->first()); |
26 | 26 | $this->assertEquals(null, isset($a[0])); //an empty resultIterator must implement arrayAccess |
27 | 27 | $this->assertEquals([], $a->toArray()); |
28 | - foreach ($a->map(function ($foo) { |
|
28 | + foreach ($a->map(function($foo) { |
|
29 | 29 | }) as $empty) { |
30 | 30 | throw new \LogicException("Not supposed to iterate on an empty iterator."); |
31 | 31 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $this->assertEquals(0, $b->count()); |
52 | 52 | $this->assertEquals([], $b->toArray()); |
53 | 53 | $this->assertEquals(0, $b->totalCount()); |
54 | - $c = $b->map(function ($foo) { |
|
54 | + $c = $b->map(function($foo) { |
|
55 | 55 | }); |
56 | 56 | foreach ($c as $empty) { |
57 | 57 | throw new \LogicException("Not supposed to iterate on an empty iterator."); |
@@ -12,8 +12,8 @@ |
||
12 | 12 | { |
13 | 13 | $params = [ |
14 | 14 | 'key1' => 'foo', |
15 | - 'key2' => [1,2,3], |
|
16 | - 'key3' => [1,2,'baz'], |
|
15 | + 'key2' => [1, 2, 3], |
|
16 | + 'key3' => [1, 2, 'baz'], |
|
17 | 17 | 'key4' => 1, |
18 | 18 | ]; |
19 | 19 |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | { |
39 | 39 | return new ArrayIterator($this); |
40 | 40 | } |
41 | - }, function ($item) { |
|
41 | + }, function($item) { |
|
42 | 42 | return $item; |
43 | 43 | }); |
44 | 44 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | public function testConstructorException1(): void |
49 | 49 | { |
50 | 50 | $this->expectException('TheCodingMachine\TDBM\TDBMException'); |
51 | - $mapIterator = new MapIterator(new \DateTime(), function ($item) { |
|
51 | + $mapIterator = new MapIterator(new \DateTime(), function($item) { |
|
52 | 52 | return $item; |
53 | 53 | }); |
54 | 54 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | public function testConstructorException2(): void |
57 | 57 | { |
58 | 58 | $this->expectException('TheCodingMachine\TDBM\TDBMException'); |
59 | - $mapIterator = new MapIterator(array(1, 2, 3), function () { |
|
59 | + $mapIterator = new MapIterator(array(1, 2, 3), function() { |
|
60 | 60 | return $item; |
61 | 61 | }); |
62 | 62 | } |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | public function testJsonSerialize(): void |
65 | 65 | { |
66 | 66 | $value = array(1, 2, 3); |
67 | - $mapIterator = new MapIterator($value, function ($item) { |
|
67 | + $mapIterator = new MapIterator($value, function($item) { |
|
68 | 68 | return $item; |
69 | 69 | }); |
70 | 70 |
@@ -128,7 +128,7 @@ |
||
128 | 128 | |
129 | 129 | $alterableResultIterator = new AlterableResultIterator($iterator); |
130 | 130 | |
131 | - $map = $alterableResultIterator->map(function ($item) { |
|
131 | + $map = $alterableResultIterator->map(function($item) { |
|
132 | 132 | return $item->foo; |
133 | 133 | }); |
134 | 134 |
@@ -63,7 +63,7 @@ |
||
63 | 63 | public function getCacheKey(): string |
64 | 64 | { |
65 | 65 | if ($this->cacheKey === null) { |
66 | - $this->cacheKey = 'from__' . implode(',', $this->getUnquotedLocalColumns()) . '__to__table__' . $this->getForeignTableName() . '__columns__' . implode(',', $this->getUnquotedForeignColumns()); |
|
66 | + $this->cacheKey = 'from__'.implode(',', $this->getUnquotedLocalColumns()).'__to__table__'.$this->getForeignTableName().'__columns__'.implode(',', $this->getUnquotedForeignColumns()); |
|
67 | 67 | } |
68 | 68 | return $this->cacheKey; |
69 | 69 | } |
@@ -39,7 +39,7 @@ |
||
39 | 39 | */ |
40 | 40 | public function findAnnotations(string $annotationType): array |
41 | 41 | { |
42 | - return array_values(array_filter($this->annotations, function ($annotation) use ($annotationType) { |
|
42 | + return array_values(array_filter($this->annotations, function($annotation) use ($annotationType) { |
|
43 | 43 | return is_a($annotation, $annotationType); |
44 | 44 | })); |
45 | 45 | } |
@@ -71,7 +71,7 @@ |
||
71 | 71 | |
72 | 72 | // Let's add * in front of the line (otherwise, parsing is failing) |
73 | 73 | $lines = explode("\n", $comment); |
74 | - $lines = array_map(function (string $line) { |
|
74 | + $lines = array_map(function(string $line) { |
|
75 | 75 | return '* '.$line; |
76 | 76 | }, $lines); |
77 | 77 | $comment = implode("\n", $lines); |
@@ -51,11 +51,11 @@ |
||
51 | 51 | $this->registry[$table->getName()] = new BeanDescriptor( |
52 | 52 | $table, |
53 | 53 | $this->configuration->getBeanNamespace(), |
54 | - $this->configuration->getBeanNamespace() . '\\Generated', |
|
54 | + $this->configuration->getBeanNamespace().'\\Generated', |
|
55 | 55 | $this->configuration->getDaoNamespace(), |
56 | - $this->configuration->getDaoNamespace() . '\\Generated', |
|
56 | + $this->configuration->getDaoNamespace().'\\Generated', |
|
57 | 57 | $this->configuration->getResultIteratorNamespace(), |
58 | - $this->configuration->getResultIteratorNamespace() . '\\Generated', |
|
58 | + $this->configuration->getResultIteratorNamespace().'\\Generated', |
|
59 | 59 | $this->configuration->getSchemaAnalyzer(), |
60 | 60 | $this->schema, |
61 | 61 | $this->tdbmSchemaAnalyzer, |
@@ -76,7 +76,7 @@ |
||
76 | 76 | if ($index->isUnique()) { |
77 | 77 | return 'findOneBy'.implode('And', $methodNameComponent); |
78 | 78 | } else { |
79 | - return 'findBy' . implode('And', $methodNameComponent); |
|
79 | + return 'findBy'.implode('And', $methodNameComponent); |
|
80 | 80 | } |
81 | 81 | } |
82 | 82 | } |