Failed Conditions
Pull Request — master (#7242)
by Gabriel
08:46
created
tests/Doctrine/Tests/ORM/Proxy/ProxyFactoryTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
                     self::isInstanceOf(CompanyEmployee::class)
225 225
                 )
226 226
             )
227
-            ->willReturnCallback(function (array $id, CompanyEmployee $companyEmployee) {
227
+            ->willReturnCallback(function(array $id, CompanyEmployee $companyEmployee) {
228 228
                 $companyEmployee->setSalary(1000); // A property on the CompanyEmployee
229 229
                 $companyEmployee->setName('Bob'); // A property on the parent class, CompanyPerson
230 230
 
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
                     self::isInstanceOf(ComparableObject::class)
287 287
                 )
288 288
             )
289
-            ->willReturnCallback(function (array $id, ComparableObject $comparableObject) {
289
+            ->willReturnCallback(function(array $id, ComparableObject $comparableObject) {
290 290
                 $comparableObject->setComparedFieldValue(json_encode($id));
291 291
 
292 292
                 return $comparableObject;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Tools/SetupTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function tearDown() : void
37 37
     {
38
-        if (! $this->originalIncludePath) {
38
+        if ( ! $this->originalIncludePath) {
39 39
             return;
40 40
         }
41 41
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
     public function testDirectoryAutoload() : void
52 52
     {
53
-        Setup::registerAutoloadDirectory(__DIR__ . '/../../../../../vendor/doctrine/common/lib');
53
+        Setup::registerAutoloadDirectory(__DIR__.'/../../../../../vendor/doctrine/common/lib');
54 54
 
55 55
         self::assertCount($this->originalAutoloaderCount + 2, spl_autoload_functions());
56 56
     }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         $config = Setup::createConfiguration(false, __DIR__);
82 82
         $cache  = $config->getMetadataCacheImpl();
83 83
 
84
-        self::assertSame('dc2_' . md5(__DIR__) . '_', $cache->getNamespace());
84
+        self::assertSame('dc2_'.md5(__DIR__).'_', $cache->getNamespace());
85 85
     }
86 86
 
87 87
     /**
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         $config = Setup::createConfiguration(false, __DIR__, new ArrayCache());
93 93
         $cache  = $config->getMetadataCacheImpl();
94 94
 
95
-        self::assertSame('dc2_' . md5(__DIR__) . '_', $cache->getNamespace());
95
+        self::assertSame('dc2_'.md5(__DIR__).'_', $cache->getNamespace());
96 96
     }
97 97
 
98 98
     /**
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         $cache  = $config->getMetadataCacheImpl();
108 108
 
109 109
         self::assertSame($originalCache, $cache);
110
-        self::assertSame('foo:dc2_' . md5(__DIR__) . '_', $cache->getNamespace());
110
+        self::assertSame('foo:dc2_'.md5(__DIR__).'_', $cache->getNamespace());
111 111
     }
112 112
 
113 113
     /**
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Decorator/EntityManagerDecoratorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
             return [
55 55
                 $method->getName(),
56 56
                 [
57
-                    function () {
57
+                    function() {
58 58
                     },
59 59
                 ],
60 60
             ];
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Mapping/Symfony/AbstractDriverTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
             ]
27 27
         );
28 28
 
29
-        touch($filename = $this->dir . '/Foo' . $this->getFileExtension());
29
+        touch($filename = $this->dir.'/Foo'.$this->getFileExtension());
30 30
         self::assertEquals($filename, $driver->getLocator()->findMappingFile('MyNamespace\MySubnamespace\Entity\Foo'));
31 31
     }
32 32
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             ]
39 39
         );
40 40
 
41
-        touch($filename = $this->dir . '/Foo.Bar' . $this->getFileExtension());
41
+        touch($filename = $this->dir.'/Foo.Bar'.$this->getFileExtension());
42 42
         self::assertEquals($filename, $driver->getLocator()->findMappingFile('MyNamespace\MySubnamespace\Entity\Foo\Bar'));
43 43
     }
44 44
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     public function testFindMappingNamespaceNotFound() : void
60 60
     {
61 61
         $this->expectException(MappingException::class);
62
-        $this->expectExceptionMessage("No mapping file found named 'Foo" . $this->getFileExtension() . "' for class 'MyOtherNamespace\MySubnamespace\Entity\Foo'.");
62
+        $this->expectExceptionMessage("No mapping file found named 'Foo".$this->getFileExtension()."' for class 'MyOtherNamespace\MySubnamespace\Entity\Foo'.");
63 63
 
64 64
         $driver = $this->getDriver(
65 65
             [
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
     protected function setUp() : void
74 74
     {
75
-        $this->dir = sys_get_temp_dir() . '/abstract_driver_test';
75
+        $this->dir = sys_get_temp_dir().'/abstract_driver_test';
76 76
         @mkdir($this->dir, 0777, true);
77 77
     }
78 78
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 use function strtoupper;
37 37
 use function unserialize;
38 38
 
39
-require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php';
39
+require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php';
40 40
 
41 41
 class ClassMetadataTest extends OrmTestCase
42 42
 {
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
      */
180 180
     public function testMapAssociationInGlobalNamespace() : void
181 181
     {
182
-        require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php';
182
+        require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php';
183 183
 
184 184
         $cm = new ClassMetadata(DoctrineGlobalArticle::class, $this->metadataBuildingContext);
185 185
         $cm->setTable(new Mapping\TableMetadata('doctrine_global_article'));
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
      */
276 276
     public function testSetDiscriminatorMapInGlobalNamespace() : void
277 277
     {
278
-        require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php';
278
+        require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php';
279 279
 
280 280
         $cm = new ClassMetadata('DoctrineGlobalUser', $this->metadataBuildingContext);
281 281
         $cm->setTable(new Mapping\TableMetadata('doctrine_global_user'));
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
      */
292 292
     public function testSetSubClassesInGlobalNamespace() : void
293 293
     {
294
-        require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php';
294
+        require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php';
295 295
 
296 296
         $cm = new ClassMetadata('DoctrineGlobalUser', $this->metadataBuildingContext);
297 297
         $cm->setTable(new Mapping\TableMetadata('doctrine_global_user'));
@@ -806,7 +806,7 @@  discard block
 block discarded – undo
806 806
     public function testEmptyFieldNameThrowsException() : void
807 807
     {
808 808
         $this->expectException(MappingException::class);
809
-        $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '" . CMS\CmsUser::class . "'.");
809
+        $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '".CMS\CmsUser::class."'.");
810 810
 
811 811
         $cm = new ClassMetadata(CMS\CmsUser::class, $this->metadataBuildingContext);
812 812
         $cm->setTable(new Mapping\TableMetadata('cms_users'));
@@ -856,7 +856,7 @@  discard block
 block discarded – undo
856 856
         $cm->addLifecycleCallback('notfound', 'postLoad');
857 857
 
858 858
         $this->expectException(MappingException::class);
859
-        $this->expectExceptionMessage("Entity '" . CMS\CmsUser::class . "' has no method 'notfound' to be registered as lifecycle callback.");
859
+        $this->expectExceptionMessage("Entity '".CMS\CmsUser::class."' has no method 'notfound' to be registered as lifecycle callback.");
860 860
 
861 861
         $cm->validateLifecycleCallbacks(new RuntimeReflectionService());
862 862
     }
@@ -876,7 +876,7 @@  discard block
 block discarded – undo
876 876
         $cm->addProperty($association);
877 877
 
878 878
         $this->expectException(MappingException::class);
879
-        $this->expectExceptionMessage("The target-entity 'UnknownClass' cannot be found in '" . CMS\CmsUser::class . "#address'.");
879
+        $this->expectExceptionMessage("The target-entity 'UnknownClass' cannot be found in '".CMS\CmsUser::class."#address'.");
880 880
 
881 881
         $cm->validateAssociations();
882 882
     }
@@ -1122,6 +1122,6 @@  discard block
 block discarded – undo
1122 1122
      */
1123 1123
     public function propertyToColumnName($propertyName, $className = null)
1124 1124
     {
1125
-        return strtolower($this->classToTableName($className)) . '_' . $propertyName;
1125
+        return strtolower($this->classToTableName($className)).'_'.$propertyName;
1126 1126
     }
1127 1127
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Mapping/AnnotationDriverTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     protected function loadDriverForCMSModels()
121 121
     {
122 122
         $annotationDriver = $this->loadDriver();
123
-        $annotationDriver->addPaths([__DIR__ . '/../../Models/CMS/']);
123
+        $annotationDriver->addPaths([__DIR__.'/../../Models/CMS/']);
124 124
         return $annotationDriver;
125 125
     }
126 126
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     public function testJoinTablesWithMappedSuperclassForAnnotationDriver() : void
143 143
     {
144 144
         $annotationDriver = $this->loadDriver();
145
-        $annotationDriver->addPaths([__DIR__ . '/../../Models/DirectoryTree/']);
145
+        $annotationDriver->addPaths([__DIR__.'/../../Models/DirectoryTree/']);
146 146
 
147 147
         $em = $this->getTestEntityManager();
148 148
         $em->getConfiguration()->setMetadataDriverImpl($annotationDriver);
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 
173 173
         $this->expectException(MappingException::class);
174 174
         $this->expectExceptionMessage(
175
-            'It is illegal to put an inverse side one-to-many or many-to-many association on ' .
175
+            'It is illegal to put an inverse side one-to-many or many-to-many association on '.
176 176
             "mapped superclass 'Doctrine\Tests\ORM\Mapping\InvalidMappedSuperClass#users'"
177 177
         );
178 178
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Mapping/XmlMappingDriverTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 {
28 28
     protected function loadDriver()
29 29
     {
30
-        return new XmlDriver(__DIR__ . DIRECTORY_SEPARATOR . 'xml');
30
+        return new XmlDriver(__DIR__.DIRECTORY_SEPARATOR.'xml');
31 31
     }
32 32
 
33 33
     public function testClassTableInheritanceDiscriminatorMap() : void
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      */
171 171
     public function testValidateXmlSchema($xmlMappingFile) : void
172 172
     {
173
-        $xsdSchemaFile = __DIR__ . '/../../../../../doctrine-mapping.xsd';
173
+        $xsdSchemaFile = __DIR__.'/../../../../../doctrine-mapping.xsd';
174 174
         $dom           = new \DOMDocument('UTF-8');
175 175
 
176 176
         $dom->load($xmlMappingFile);
@@ -180,14 +180,14 @@  discard block
 block discarded – undo
180 180
 
181 181
     public static function dataValidSchema()
182 182
     {
183
-        $list    = glob(__DIR__ . '/xml/*.xml');
183
+        $list    = glob(__DIR__.'/xml/*.xml');
184 184
         $invalid = ['Doctrine.Tests.Models.DDC889.DDC889Class.dcm'];
185 185
 
186
-        $list = array_filter($list, function ($item) use ($invalid) {
186
+        $list = array_filter($list, function($item) use ($invalid) {
187 187
             return ! in_array(pathinfo($item, PATHINFO_FILENAME), $invalid, true);
188 188
         });
189 189
 
190
-        return array_map(function ($item) {
190
+        return array_map(function($item) {
191 191
             return [$item];
192 192
         }, $list);
193 193
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Utility/NormalizeIdentifierTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         self::assertSame(array_keys($expectedId), array_keys($id));
62 62
 
63 63
         foreach ($expectedId as $field => $value) {
64
-            if (! is_object($value)) {
64
+            if ( ! is_object($value)) {
65 65
                 self::assertSame($id[$field], $value);
66 66
 
67 67
                 continue;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Utility/StaticClassNameConverterTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         $className      = array_pop($namespaceParts);
46 46
         $namespace      = implode('\\', $namespaceParts);
47 47
 
48
-        eval('namespace ' . $namespace . ' { class ' . $className . ' {} }');
48
+        eval('namespace '.$namespace.' { class '.$className.' {} }');
49 49
 
50 50
         self::assertSame($expectedClassName, StaticClassNameConverter::getClass(new $givenClassName()));
51 51
     }
Please login to merge, or discard this patch.