Completed
Push — master ( 8f3732...4f9d6e )
by David
18s queued 14s
created
tests/Performance/ManyToOneBench.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -73,18 +73,18 @@  discard block
 block discarded – undo
73 73
             $connection->exec($sqlStmt);
74 74
         }
75 75
 
76
-        for ($i = 1; $i<200; $i++) {
76
+        for ($i = 1; $i < 200; $i++) {
77 77
             TDBMAbstractServiceTest::insert($connection, 'countries', [
78 78
                 'id' => $i,
79 79
                 'label' => 'Country '.$i,
80 80
             ]);
81 81
         }
82 82
 
83
-        for ($i = 1; $i<1000; $i++) {
83
+        for ($i = 1; $i < 1000; $i++) {
84 84
             TDBMAbstractServiceTest::insert($connection, 'users', [
85 85
                 'id' => $i,
86 86
                 'name' => 'User '.$i,
87
-                'country_id' => ($i%199) +1,
87
+                'country_id' => ($i % 199) + 1,
88 88
             ]);
89 89
         }
90 90
     }
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
         $schemaLockFileDumper = new SchemaLockFileDumper($connection, new ArrayCache(), Configuration::getDefaultLockFilePath());
97 97
         $tdbmSchemaAnalyzer = new TDBMSchemaAnalyzer($connection, new ArrayCache(), $schemaAnalyzer, $schemaLockFileDumper);
98 98
         $tdbmDaoGenerator = new TDBMDaoGenerator(self::createConfiguration(), $tdbmSchemaAnalyzer);
99
-        $rootPath = __DIR__ . '/../';
100
-        self::recursiveDelete(__DIR__. '/../../src/Test/Dao/');
99
+        $rootPath = __DIR__.'/../';
100
+        self::recursiveDelete(__DIR__.'/../../src/Test/Dao/');
101 101
 
102 102
         $tdbmDaoGenerator->generateAllDaosAndBeans();
103 103
     }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         if (is_file($str)) {
114 114
             return @unlink($str);
115 115
         } elseif (is_dir($str)) {
116
-            $scan = glob(rtrim($str, '/') . '/*');
116
+            $scan = glob(rtrim($str, '/').'/*');
117 117
             foreach ($scan as $index => $path) {
118 118
                 self::recursiveDelete($path);
119 119
             }
Please login to merge, or discard this patch.
tests/WeakrefObjectStorageTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         $objectStorage = new WeakrefObjectStorage();
31 31
         $dbRow = $this->createMock(DbRow::class);
32 32
 
33
-        for ($i=0; $i<10001; $i++) {
33
+        for ($i = 0; $i < 10001; $i++) {
34 34
             $objectStorage->set('foo', $i, clone $dbRow);
35 35
         }
36 36
         $this->assertNull($objectStorage->get('foo', 42));
Please login to merge, or discard this patch.
tests/AbstractTDBMObjectTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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.");
Please login to merge, or discard this patch.
tests/Utils/DbalUtilsTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/MapIteratorTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/TDBMServiceTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
     {
449 449
         $beans = $this->tdbmService->findObjects('person', null, [], 'person.id ASC', [], null, TDBMObject::class);
450 450
 
451
-        $results = $beans->map(function ($item) {
451
+        $results = $beans->map(function($item) {
452 452
             return $item->getProperty('id', 'person');
453 453
         })->toArray();
454 454
 
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
         // Same test with page
458 458
         $page = $beans->take(0, 2);
459 459
 
460
-        $results = $page->map(function ($item) {
460
+        $results = $page->map(function($item) {
461 461
             return $item->getProperty('id', 'person');
462 462
         })->toArray();
463 463
 
@@ -818,7 +818,7 @@  discard block
 block discarded – undo
818 818
     public function testFindObjectsMethodWithoutResultIteratorClass(): void
819 819
     {
820 820
         $this->expectException(TDBMInvalidArgumentException::class);
821
-        $this->expectExceptionMessageMatches('/^\$resultIteratorClass should be a `' . preg_quote(ResultIterator::class, '/') . '`. `(.*)` provided\.$/');
821
+        $this->expectExceptionMessageMatches('/^\$resultIteratorClass should be a `'.preg_quote(ResultIterator::class, '/').'`. `(.*)` provided\.$/');
822 822
         $tdbmService = new TDBMService(new Configuration('TheCodingMachine\\TDBM\\Test\\Dao\\Bean', 'TheCodingMachine\\TDBM\\Test\\Dao', self::getConnection(), $this->getNamingStrategy(), null, null, new NullLogger()));
823 823
 
824 824
         $tdbmService->findObjects('', null, [], null, [], null, null, self::class);
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
     public function testFindObjectsFromSqlMethodWithoutResultIteratorClass(): void
828 828
     {
829 829
         $this->expectException(TDBMInvalidArgumentException::class);
830
-        $this->expectExceptionMessageMatches('/^\$resultIteratorClass should be a `' . preg_quote(ResultIterator::class, '/') . '`. `(.*)` provided\.$/');
830
+        $this->expectExceptionMessageMatches('/^\$resultIteratorClass should be a `'.preg_quote(ResultIterator::class, '/').'`. `(.*)` provided\.$/');
831 831
         $tdbmService = new TDBMService(new Configuration('TheCodingMachine\\TDBM\\Test\\Dao\\Bean', 'TheCodingMachine\\TDBM\\Test\\Dao', self::getConnection(), $this->getNamingStrategy(), null, null, new NullLogger()));
832 832
 
833 833
         $tdbmService->findObjectsFromSql('', '', null, [], null, null, null, self::class);
@@ -836,7 +836,7 @@  discard block
 block discarded – undo
836 836
     public function testFindObjectsFromRawSqlMethodWithoutResultIteratorClass(): void
837 837
     {
838 838
         $this->expectException(TDBMInvalidArgumentException::class);
839
-        $this->expectExceptionMessageMatches('/^\$resultIteratorClass should be a `' . preg_quote(ResultIterator::class, '/') . '`. `(.*)` provided\.$/');
839
+        $this->expectExceptionMessageMatches('/^\$resultIteratorClass should be a `'.preg_quote(ResultIterator::class, '/').'`. `(.*)` provided\.$/');
840 840
         $tdbmService = new TDBMService(new Configuration('TheCodingMachine\\TDBM\\Test\\Dao\\Bean', 'TheCodingMachine\\TDBM\\Test\\Dao', self::getConnection(), $this->getNamingStrategy(), null, null, new NullLogger()));
841 841
 
842 842
         $tdbmService->findObjectsFromRawSql('', '', [], null, null, null, self::class);
Please login to merge, or discard this patch.
tests/AlterableResultIteratorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/NativeWeakrefObjectStorageTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         $objectStorage = new NativeWeakrefObjectStorage();
31 31
         $dbRow = $this->createMock(DbRow::class);
32 32
 
33
-        for ($i=0; $i<10001; $i++) {
33
+        for ($i = 0; $i < 10001; $i++) {
34 34
             $objectStorage->set('foo', $i, clone $dbRow);
35 35
         }
36 36
         $this->assertNull($objectStorage->get('foo', 42));
Please login to merge, or discard this patch.
src/Schema/ForeignKey.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.