Failed Conditions
Pull Request — master (#6593)
by Thomas
16:12
created
tests/Doctrine/Tests/ORM/Mapping/XmlMappingDriverTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 {
19 19
     protected function _loadDriver()
20 20
     {
21
-        return new XmlDriver(__DIR__ . DIRECTORY_SEPARATOR . 'xml');
21
+        return new XmlDriver(__DIR__.DIRECTORY_SEPARATOR.'xml');
22 22
     }
23 23
 
24 24
     public function testClassTableInheritanceDiscriminatorMap()
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      */
151 151
     public function testValidateXmlSchema($xmlMappingFile)
152 152
     {
153
-        $xsdSchemaFile  = __DIR__ . '/../../../../../doctrine-mapping.xsd';
153
+        $xsdSchemaFile  = __DIR__.'/../../../../../doctrine-mapping.xsd';
154 154
         $dom            = new \DOMDocument('UTF-8');
155 155
 
156 156
         $dom->load($xmlMappingFile);
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 
161 161
     static public function dataValidSchema()
162 162
     {
163
-        $list    = glob(__DIR__ . '/xml/*.xml');
163
+        $list    = glob(__DIR__.'/xml/*.xml');
164 164
         $invalid = [
165 165
             'Doctrine.Tests.Models.DDC889.DDC889Class.dcm'
166 166
         ];
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
             return ! in_array(pathinfo($item, PATHINFO_FILENAME), $invalid);
170 170
         });
171 171
 
172
-        return array_map(function($item){
172
+        return array_map(function($item) {
173 173
             return [$item];
174 174
         }, $list);
175 175
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Mapping/EntityListenerResolverTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     protected function setUp()
20 20
     {
21 21
         parent::setUp();
22
-        $this->resolver  = new DefaultEntityListenerResolver();
22
+        $this->resolver = new DefaultEntityListenerResolver();
23 23
     }
24 24
 
25 25
     public function testResolve()
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1078,7 +1078,7 @@
 block discarded – undo
1078 1078
         $this->expectExceptionMessage("You have specified invalid cascade options for " . CMS\CmsUser::class . "::\$address: 'invalid'; available options: 'remove', 'persist', 'refresh', 'merge', and 'detach'");
1079 1079
 
1080 1080
         $cm->mapManyToOne(['fieldName' => 'address', 'targetEntity' => 'UnknownClass', 'cascade' => ['invalid']]);
1081
-     }
1081
+        }
1082 1082
 
1083 1083
     /**
1084 1084
      * @group DDC-964
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 use Doctrine\Tests\OrmTestCase;
22 22
 use DoctrineGlobal_Article;
23 23
 
24
-require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php';
24
+require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php';
25 25
 
26 26
 class ClassMetadataTest extends OrmTestCase
27 27
 {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $this->assertEquals('phonenumbers', $oneOneMapping['fieldName']);
72 72
         $this->assertEquals(CMS\CmsAddress::class, $oneOneMapping['targetEntity']);
73 73
         $this->assertTrue($cm->isReadOnly);
74
-        $this->assertEquals(['dql' => ['name'=>'dql','query'=>'foo','dql'=>'foo']], $cm->namedQueries);
74
+        $this->assertEquals(['dql' => ['name'=>'dql', 'query'=>'foo', 'dql'=>'foo']], $cm->namedQueries);
75 75
     }
76 76
 
77 77
     public function testFieldIsNullable()
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
     {
205 205
         $cm = new ClassMetadata(CMS\CmsUser::class);
206 206
         $cm->initializeReflection(new RuntimeReflectionService());
207
-        $cm->isIdentifierComposite  = true;
207
+        $cm->isIdentifierComposite = true;
208 208
 
209 209
         $this->expectException(\Doctrine\ORM\Mapping\MappingException::class);
210 210
         $cm->getSingleIdentifierFieldName();
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 
397 397
         $this->assertEquals('CMS_ADDRESS_CMS_USER', $manyToManyMetadata->associationMappings['user']['joinTable']['name']);
398 398
 
399
-        $this->assertEquals(['CMS_ADDRESS_ID','CMS_USER_ID'], $manyToManyMetadata->associationMappings['user']['joinTableColumns']);
399
+        $this->assertEquals(['CMS_ADDRESS_ID', 'CMS_USER_ID'], $manyToManyMetadata->associationMappings['user']['joinTableColumns']);
400 400
         $this->assertEquals(['CMS_ADDRESS_ID'=>'ID'], $manyToManyMetadata->associationMappings['user']['relationToSourceKeyColumns']);
401 401
         $this->assertEquals(['CMS_USER_ID'=>'ID'], $manyToManyMetadata->associationMappings['user']['relationToTargetKeyColumns']);
402 402
 
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
         $cm->initializeReflection(new RuntimeReflectionService());
437 437
 
438 438
         $this->expectException(MappingException::class);
439
-        $this->expectExceptionMessage("No mapping found for field 'foo' on class '" . CMS\CmsUser::class . "'.");
439
+        $this->expectExceptionMessage("No mapping found for field 'foo' on class '".CMS\CmsUser::class."'.");
440 440
 
441 441
         $cm->getFieldMapping('foo');
442 442
     }
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
     public function testEmptyFieldNameThrowsException()
547 547
     {
548 548
         $this->expectException(MappingException::class);
549
-        $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '" . CMS\CmsUser::class . "'.");
549
+        $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '".CMS\CmsUser::class."'.");
550 550
 
551 551
         $cm = new ClassMetadata(CMS\CmsUser::class);
552 552
         $cm->initializeReflection(new RuntimeReflectionService());
@@ -701,12 +701,12 @@  discard block
 block discarded – undo
701 701
         $mapping = $cm->getSqlResultSetMapping('find-all');
702 702
 
703 703
         $this->assertEquals(CMS\CmsUser::class, $mapping['entities'][0]['entityClass']);
704
-        $this->assertEquals(['name'=>'id','column'=>'id'], $mapping['entities'][0]['fields'][0]);
705
-        $this->assertEquals(['name'=>'name','column'=>'name'], $mapping['entities'][0]['fields'][1]);
704
+        $this->assertEquals(['name'=>'id', 'column'=>'id'], $mapping['entities'][0]['fields'][0]);
705
+        $this->assertEquals(['name'=>'name', 'column'=>'name'], $mapping['entities'][0]['fields'][1]);
706 706
 
707 707
         $this->assertEquals(CMS\CmsEmail::class, $mapping['entities'][1]['entityClass']);
708
-        $this->assertEquals(['name'=>'id','column'=>'id'], $mapping['entities'][1]['fields'][0]);
709
-        $this->assertEquals(['name'=>'email','column'=>'email'], $mapping['entities'][1]['fields'][1]);
708
+        $this->assertEquals(['name'=>'id', 'column'=>'id'], $mapping['entities'][1]['fields'][0]);
709
+        $this->assertEquals(['name'=>'email', 'column'=>'email'], $mapping['entities'][1]['fields'][1]);
710 710
 
711 711
         $this->assertEquals('scalarColumn', $mapping['columns'][0]['name']);
712 712
     }
@@ -921,7 +921,7 @@  discard block
 block discarded – undo
921 921
         $cm->addLifecycleCallback('notfound', 'postLoad');
922 922
 
923 923
         $this->expectException(MappingException::class);
924
-        $this->expectExceptionMessage("Entity '" . CMS\CmsUser::class . "' has no method 'notfound' to be registered as lifecycle callback.");
924
+        $this->expectExceptionMessage("Entity '".CMS\CmsUser::class."' has no method 'notfound' to be registered as lifecycle callback.");
925 925
 
926 926
         $cm->validateLifecycleCallbacks(new RuntimeReflectionService());
927 927
     }
@@ -936,7 +936,7 @@  discard block
 block discarded – undo
936 936
         $cm->mapManyToOne(['fieldName' => 'address', 'targetEntity' => 'UnknownClass']);
937 937
 
938 938
         $this->expectException(MappingException::class);
939
-        $this->expectExceptionMessage("The target-entity Doctrine\\Tests\\Models\\CMS\\UnknownClass cannot be found in '" . CMS\CmsUser::class . "#address'.");
939
+        $this->expectExceptionMessage("The target-entity Doctrine\\Tests\\Models\\CMS\\UnknownClass cannot be found in '".CMS\CmsUser::class."#address'.");
940 940
 
941 941
         $cm->validateAssociations();
942 942
     }
@@ -1075,7 +1075,7 @@  discard block
 block discarded – undo
1075 1075
         $cm->initializeReflection(new RuntimeReflectionService());
1076 1076
 
1077 1077
         $this->expectException(MappingException::class);
1078
-        $this->expectExceptionMessage("You have specified invalid cascade options for " . CMS\CmsUser::class . "::\$address: 'invalid'; available options: 'remove', 'persist', 'refresh', 'merge', and 'detach'");
1078
+        $this->expectExceptionMessage("You have specified invalid cascade options for ".CMS\CmsUser::class."::\$address: 'invalid'; available options: 'remove', 'persist', 'refresh', 'merge', and 'detach'");
1079 1079
 
1080 1080
         $cm->mapManyToOne(['fieldName' => 'address', 'targetEntity' => 'UnknownClass', 'cascade' => ['invalid']]);
1081 1081
      }
@@ -1320,7 +1320,7 @@  discard block
 block discarded – undo
1320 1320
      */
1321 1321
     public function propertyToColumnName($propertyName, $className = null)
1322 1322
     {
1323
-        return strtolower($this->classToTableName($className)) . '_' . $propertyName;
1323
+        return strtolower($this->classToTableName($className)).'_'.$propertyName;
1324 1324
     }
1325 1325
 }
1326 1326
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/Forum/ForumUser.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,18 +24,18 @@
 block discarded – undo
24 24
     public $avatar;
25 25
 
26 26
     public function getId() {
27
-    	return $this->id;
27
+        return $this->id;
28 28
     }
29 29
 
30 30
     public function getUsername() {
31
-    	return $this->username;
31
+        return $this->username;
32 32
     }
33 33
 
34 34
     public function getAvatar() {
35
-    	return $this->avatar;
35
+        return $this->avatar;
36 36
     }
37 37
 
38 38
     public function setAvatar(ForumAvatar $avatar) {
39
-    	$this->avatar = $avatar;
39
+        $this->avatar = $avatar;
40 40
     }
41 41
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/DDC3579/DDC3579User.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -83,11 +83,11 @@  discard block
 block discarded – undo
83 83
     {
84 84
         $metadata->mapField(
85 85
             [
86
-           'id'         => true,
87
-           'fieldName'  => 'id',
88
-           'type'       => 'integer',
89
-           'columnName' => 'user_id',
90
-           'length'     => 150,
86
+            'id'         => true,
87
+            'fieldName'  => 'id',
88
+            'type'       => 'integer',
89
+            'columnName' => 'user_id',
90
+            'length'     => 150,
91 91
             ]
92 92
         );
93 93
 
@@ -104,8 +104,8 @@  discard block
 block discarded – undo
104 104
 
105 105
         $metadata->mapManyToMany(
106 106
             [
107
-           'fieldName'      => 'groups',
108
-           'targetEntity'   => 'DDC3579Group'
107
+            'fieldName'      => 'groups',
108
+            'targetEntity'   => 'DDC3579Group'
109 109
             ]
110 110
         );
111 111
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/Company/CompanyContract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
     static public function loadMetadata(\Doctrine\ORM\Mapping\ClassMetadataInfo $metadata)
134 134
     {
135 135
         $metadata->setInheritanceType(\Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_JOINED);
136
-        $metadata->setTableName( 'company_contracts');
136
+        $metadata->setTableName('company_contracts');
137 137
         $metadata->setDiscriminatorColumn(
138 138
             [
139 139
             'name' => 'discr',
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/Company/CompanyEvent.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @DiscriminatorMap({"auction"="CompanyAuction", "raffle"="CompanyRaffle"})
10 10
  */
11 11
 abstract class CompanyEvent {
12
-   /**
12
+    /**
13 13
      * @Id @Column(type="integer")
14 14
      * @GeneratedValue
15 15
      */
@@ -19,18 +19,18 @@  discard block
 block discarded – undo
19 19
      * @ManyToOne(targetEntity="CompanyOrganization", inversedBy="events", cascade={"persist"})
20 20
      * @JoinColumn(name="org_id", referencedColumnName="id")
21 21
      */
22
-     private $organization;
22
+        private $organization;
23 23
 
24
-     public function getId() {
25
-         return $this->id;
26
-     }
24
+        public function getId() {
25
+            return $this->id;
26
+        }
27 27
 
28
-     public function getOrganization() {
29
-         return $this->organization;
30
-     }
28
+        public function getOrganization() {
29
+            return $this->organization;
30
+        }
31 31
 
32
-     public function setOrganization(CompanyOrganization $org) {
33
-         $this->organization = $org;
34
-     }
32
+        public function setOrganization(CompanyOrganization $org) {
33
+            $this->organization = $org;
34
+        }
35 35
 
36 36
 }
37 37
\ No newline at end of file
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/Company/CompanyPerson.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 
123 123
         $metadata->setPrimaryTable(
124 124
             [
125
-           'name' => 'company_person',
125
+            'name' => 'company_person',
126 126
             ]
127 127
         );
128 128
 
@@ -149,14 +149,14 @@  discard block
 block discarded – undo
149 149
             'entities'  => [
150 150
                 [
151 151
                 'fields' => [
152
-                  [
152
+                    [
153 153
                     'name'      => 'id',
154 154
                     'column'    => 'id',
155
-                  ],
156
-                  [
155
+                    ],
156
+                    [
157 157
                     'name'      => 'name',
158 158
                     'column'    => 'name',
159
-                  ],
159
+                    ],
160 160
                 ],
161 161
                 'entityClass' => CompanyPerson::class,
162 162
                 'discriminatorColumn' => 'discriminator',
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/Company/CompanyOrganization.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@
 block discarded – undo
4 4
 
5 5
 /** @Entity @Table(name="company_organizations") */
6 6
 class CompanyOrganization {
7
-   /**
8
-    * @Id @Column(type="integer")
9
-    * @GeneratedValue(strategy="AUTO")
10
-    */
11
-   private $id;
7
+    /**
8
+     * @Id @Column(type="integer")
9
+     * @GeneratedValue(strategy="AUTO")
10
+     */
11
+    private $id;
12 12
 
13 13
     /**
14 14
      * @OneToMany(targetEntity="CompanyEvent", mappedBy="organization", cascade={"persist"}, fetch="EXTRA_LAZY")
Please login to merge, or discard this patch.