Completed
Pull Request — 2.6 (#8015)
by
unknown
06:46
created
tests/Doctrine/Tests/ORM/Id/SequenceGeneratorTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,13 +45,13 @@
 block discarded – undo
45 45
 
46 46
         for ($i = 0; $i < 42; ++$i) {
47 47
             if ($i % 10 == 0) {
48
-                $this->connection->setQueryResult(new StatementArrayMock([[(int)($i / 10) * 10]]));
48
+                $this->connection->setQueryResult(new StatementArrayMock([[(int) ($i / 10) * 10]]));
49 49
             }
50 50
 
51 51
             $id = $this->sequenceGenerator->generate($this->entityManager, null);
52 52
 
53 53
             self::assertSame($i, $id);
54
-            self::assertSame((int)($i / 10) * 10 + 10, $this->sequenceGenerator->getCurrentMaxValue());
54
+            self::assertSame((int) ($i / 10) * 10 + 10, $this->sequenceGenerator->getCurrentMaxValue());
55 55
             self::assertSame($i + 1, $this->sequenceGenerator->getNextValue());
56 56
         }
57 57
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/QueryException.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public static function syntaxError($message, $previous = null)
53 53
     {
54
-        return new self('[Syntax Error] ' . $message, 0, $previous);
54
+        return new self('[Syntax Error] '.$message, 0, $previous);
55 55
     }
56 56
 
57 57
     /**
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      */
63 63
     public static function semanticalError($message, $previous = null)
64 64
     {
65
-        return new self('[Semantical Error] ' . $message, 0, $previous);
65
+        return new self('[Semantical Error] '.$message, 0, $previous);
66 66
     }
67 67
 
68 68
     /**
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public static function invalidParameterType($expected, $received)
83 83
     {
84
-        return new self('Invalid parameter type, ' . $received . ' given, but ' . $expected . ' expected.');
84
+        return new self('Invalid parameter type, '.$received.' given, but '.$expected.' expected.');
85 85
     }
86 86
 
87 87
     /**
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public static function invalidParameterPosition($pos)
93 93
     {
94
-        return new self('Invalid parameter position: ' . $pos);
94
+        return new self('Invalid parameter position: '.$pos);
95 95
     }
96 96
 
97 97
     /**
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public static function tooManyParameters($expected, $received)
104 104
     {
105
-        return new self('Too many parameters: the query defines ' . $expected . ' parameters and you bound ' . $received);
105
+        return new self('Too many parameters: the query defines '.$expected.' parameters and you bound '.$received);
106 106
     }
107 107
 
108 108
     /**
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public static function tooFewParameters($expected, $received)
115 115
     {
116
-        return new self('Too few parameters: the query defines ' . $expected . ' parameters but you only bound ' . $received);
116
+        return new self('Too few parameters: the query defines '.$expected.' parameters but you only bound '.$received);
117 117
     }
118 118
 
119 119
     /**
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     public static function invalidPathExpression($pathExpr)
153 153
     {
154 154
         return new self(
155
-            "Invalid PathExpression '" . $pathExpr->identificationVariable . "." . $pathExpr->field . "'."
155
+            "Invalid PathExpression '".$pathExpr->identificationVariable.".".$pathExpr->field."'."
156 156
         );
157 157
     }
158 158
 
@@ -185,8 +185,8 @@  discard block
 block discarded – undo
185 185
     public static function partialObjectsAreDangerous()
186 186
     {
187 187
         return new self(
188
-            "Loading partial objects is dangerous. Fetch full objects or consider " .
189
-            "using a different fetch mode. If you really want partial objects, " .
188
+            "Loading partial objects is dangerous. Fetch full objects or consider ".
189
+            "using a different fetch mode. If you really want partial objects, ".
190 190
             "set the doctrine.forcePartialLoad query hint to TRUE."
191 191
         );
192 192
     }
@@ -213,8 +213,8 @@  discard block
 block discarded – undo
213 213
     public static function associationPathInverseSideNotSupported(PathExpression $pathExpr)
214 214
     {
215 215
         return new self(
216
-            'A single-valued association path expression to an inverse side is not supported in DQL queries. ' .
217
-            'Instead of "' . $pathExpr->identificationVariable . '.' . $pathExpr->field . '" use an explicit join.'
216
+            'A single-valued association path expression to an inverse side is not supported in DQL queries. '.
217
+            'Instead of "'.$pathExpr->identificationVariable.'.'.$pathExpr->field.'" use an explicit join.'
218 218
         );
219 219
     }
220 220
 
@@ -226,8 +226,8 @@  discard block
 block discarded – undo
226 226
     public static function iterateWithFetchJoinNotAllowed($assoc)
227 227
     {
228 228
         return new self(
229
-            "Iterate with fetch join in class " . $assoc['sourceEntity'] .
230
-            " using association " . $assoc['fieldName'] . " not allowed."
229
+            "Iterate with fetch join in class ".$assoc['sourceEntity'].
230
+            " using association ".$assoc['fieldName']." not allowed."
231 231
         );
232 232
     }
233 233
 
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
      */
252 252
     public static function instanceOfUnrelatedClass($className, $rootClass)
253 253
     {
254
-        return new self("Cannot check if a child of '" . $rootClass . "' is instanceof '" . $className . "', " .
254
+        return new self("Cannot check if a child of '".$rootClass."' is instanceof '".$className."', ".
255 255
             "inheritance hierarchy does not exists between these two classes.");
256 256
     }
257 257
 
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
     public static function invalidQueryComponent($dqlAlias)
264 264
     {
265 265
         return new self(
266
-            "Invalid query component given for DQL alias '" . $dqlAlias . "', ".
266
+            "Invalid query component given for DQL alias '".$dqlAlias."', ".
267 267
             "requires 'metadata', 'parent', 'relation', 'map', 'nestingLevel' and 'token' keys."
268 268
         );
269 269
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Expr/OrderBy.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     public function add($sort, $order = null)
79 79
     {
80 80
         $order = ! $order ? 'ASC' : $order;
81
-        $this->parts[] = $sort . ' '. $order;
81
+        $this->parts[] = $sort.' '.$order;
82 82
     }
83 83
 
84 84
     /**
@@ -102,6 +102,6 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function __toString()
104 104
     {
105
-        return $this->preSeparator . implode($this->separator, $this->parts) . $this->postSeparator;
105
+        return $this->preSeparator.implode($this->separator, $this->parts).$this->postSeparator;
106 106
     }
107 107
 }
Please login to merge, or discard this patch.
Hydration/MixedQueryFetchJoinPartialObjectHydrationPerformanceBench.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
                 'u__status'      => 'developer',
67 67
                 'u__username'    => 'jwage',
68 68
                 'u__name'        => 'Jonathan',
69
-                'sclr0'          => 'JWAGE' . $i,
69
+                'sclr0'          => 'JWAGE'.$i,
70 70
                 'p__phonenumber' => '91'
71 71
             ];
72 72
         }
Please login to merge, or discard this patch.
Hydration/MixedQueryFetchJoinFullObjectHydrationPerformanceBench.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
                 'u__status'      => 'developer',
52 52
                 'u__username'    => 'jwage',
53 53
                 'u__name'        => 'Jonathan',
54
-                'sclr0'          => 'JWAGE' . $i,
54
+                'sclr0'          => 'JWAGE'.$i,
55 55
                 'p__phonenumber' => '91',
56 56
                 'a__id'          => $i
57 57
             ];
Please login to merge, or discard this patch.
tests/Doctrine/Performance/Hydration/SimpleHydrationBench.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
             $user = new CMS\CmsUser();
40 40
 
41 41
             $user->status   = 'developer';
42
-            $user->username = 'jwage' . $i;
42
+            $user->username = 'jwage'.$i;
43 43
             $user->name     = 'Jonathan';
44 44
 
45 45
             $this->entityManager->persist($user);
Please login to merge, or discard this patch.
tests/Doctrine/Performance/ChangeSet/UnitOfWorkComputeChangesBench.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@
 block discarded – undo
32 32
             $user           = new CmsUser;
33 33
             $user->id       = $i;
34 34
             $user->status   = 'user';
35
-            $user->username = 'user' . $i;
36
-            $user->name     = 'Mr.Smith-' . $i;
35
+            $user->username = 'user'.$i;
36
+            $user->name     = 'Mr.Smith-'.$i;
37 37
             $this->users[]  = $user;
38 38
 
39 39
             $this->unitOfWork->registerManaged(
Please login to merge, or discard this patch.
Performance/Hydration/MixedQueryFetchJoinArrayHydrationPerformanceBench.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
                 'u__status'      => 'developer',
67 67
                 'u__username'    => 'jwage',
68 68
                 'u__name'        => 'Jonathan',
69
-                'sclr0'          => 'JWAGE' . $i,
69
+                'sclr0'          => 'JWAGE'.$i,
70 70
                 'p__phonenumber' => '91'
71 71
             ];
72 72
         }
Please login to merge, or discard this patch.
Tests/ORM/Tools/Export/php/Doctrine.Tests.ORM.Tools.Export.User.php 1 patch
Indentation   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
 $metadata->setInheritanceType(ClassMetadataInfo::INHERITANCE_TYPE_NONE);
11 11
 $metadata->setPrimaryTable(
12 12
     [
13
-   'name' => 'cms_users',
14
-   'options' => ['engine' => 'MyISAM', 'foo' => ['bar' => 'baz']],
13
+    'name' => 'cms_users',
14
+    'options' => ['engine' => 'MyISAM', 'foo' => ['bar' => 'baz']],
15 15
     ]
16 16
 );
17 17
 $metadata->setChangeTrackingPolicy(ClassMetadataInfo::CHANGETRACKING_DEFERRED_IMPLICIT);
@@ -20,35 +20,35 @@  discard block
 block discarded – undo
20 20
 $metadata->addLifecycleCallback('doStuffOnPostPersist', Events::postPersist);
21 21
 $metadata->mapField(
22 22
     [
23
-   'id' => true,
24
-   'fieldName' => 'id',
25
-   'type' => 'integer',
26
-   'columnName' => 'id',
23
+    'id' => true,
24
+    'fieldName' => 'id',
25
+    'type' => 'integer',
26
+    'columnName' => 'id',
27 27
     ]
28 28
 );
29 29
 $metadata->mapField(
30 30
     [
31
-   'fieldName' => 'name',
32
-   'type' => 'string',
33
-   'length' => 50,
34
-   'unique' => true,
35
-   'nullable' => true,
36
-   'columnName' => 'name',
31
+    'fieldName' => 'name',
32
+    'type' => 'string',
33
+    'length' => 50,
34
+    'unique' => true,
35
+    'nullable' => true,
36
+    'columnName' => 'name',
37 37
     ]
38 38
 );
39 39
 $metadata->mapField(
40 40
     [
41
-   'fieldName' => 'email',
42
-   'type' => 'string',
43
-   'columnName' => 'user_email',
44
-   'columnDefinition' => 'CHAR(32) NOT NULL',
41
+    'fieldName' => 'email',
42
+    'type' => 'string',
43
+    'columnName' => 'user_email',
44
+    'columnDefinition' => 'CHAR(32) NOT NULL',
45 45
     ]
46 46
 );
47 47
 $metadata->mapField(
48 48
     [
49
-   'fieldName' => 'age',
50
-   'type' => 'integer',
51
-   'options' => ["unsigned"=>true],
49
+    'fieldName' => 'age',
50
+    'type' => 'integer',
51
+    'options' => ["unsigned"=>true],
52 52
     ]
53 53
 );
54 54
 $metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_AUTO);
@@ -60,25 +60,25 @@  discard block
 block discarded – undo
60 60
 );
61 61
 $metadata->mapOneToOne(
62 62
     [
63
-   'fieldName' => 'address',
64
-   'targetEntity' => Export\Address::class,
65
-   'inversedBy' => 'user',
66
-   'cascade' =>
67
-   [
68
-   0 => 'persist',
69
-   ],
70
-   'mappedBy' => NULL,
71
-   'joinColumns' =>
72
-   [
73
-   0 =>
74
-   [
63
+    'fieldName' => 'address',
64
+    'targetEntity' => Export\Address::class,
65
+    'inversedBy' => 'user',
66
+    'cascade' =>
67
+    [
68
+    0 => 'persist',
69
+    ],
70
+    'mappedBy' => NULL,
71
+    'joinColumns' =>
72
+    [
73
+    0 =>
74
+    [
75 75
     'name' => 'address_id',
76 76
     'referencedColumnName' => 'id',
77 77
     'onDelete' => 'CASCADE',
78
-   ],
79
-   ],
80
-   'orphanRemoval' => true,
81
-   'fetch' => ClassMetadataInfo::FETCH_EAGER,
78
+    ],
79
+    ],
80
+    'orphanRemoval' => true,
81
+    'fetch' => ClassMetadataInfo::FETCH_EAGER,
82 82
     ]
83 83
 );
84 84
 $metadata->mapOneToOne(
@@ -97,41 +97,41 @@  discard block
 block discarded – undo
97 97
 );
98 98
 $metadata->mapOneToMany(
99 99
     [
100
-   'fieldName' => 'phonenumbers',
101
-   'targetEntity' => Export\Phonenumber::class,
102
-   'cascade' =>
103
-   [
104
-   1 => 'persist',
105
-   2 => 'merge',
106
-   ],
107
-   'mappedBy' => 'user',
108
-   'orphanRemoval' => true,
109
-   'fetch' => ClassMetadataInfo::FETCH_LAZY,
110
-   'orderBy' =>
111
-   [
112
-   'number' => 'ASC',
113
-   ],
100
+    'fieldName' => 'phonenumbers',
101
+    'targetEntity' => Export\Phonenumber::class,
102
+    'cascade' =>
103
+    [
104
+    1 => 'persist',
105
+    2 => 'merge',
106
+    ],
107
+    'mappedBy' => 'user',
108
+    'orphanRemoval' => true,
109
+    'fetch' => ClassMetadataInfo::FETCH_LAZY,
110
+    'orderBy' =>
111
+    [
112
+    'number' => 'ASC',
113
+    ],
114 114
     ]
115 115
 );
116 116
 $metadata->mapManyToMany(
117 117
     [
118
-   'fieldName' => 'groups',
119
-   'targetEntity' => Export\Group::class,
120
-   'fetch' => ClassMetadataInfo::FETCH_EXTRA_LAZY,
121
-   'cascade' =>
122
-   [
123
-   0 => 'remove',
124
-   1 => 'persist',
125
-   2 => 'refresh',
126
-   3 => 'merge',
127
-   4 => 'detach',
128
-   ],
129
-   'mappedBy' => NULL,
130
-   'joinTable' =>
131
-   [
132
-   'name' => 'cms_users_groups',
133
-   'joinColumns' =>
134
-   [
118
+    'fieldName' => 'groups',
119
+    'targetEntity' => Export\Group::class,
120
+    'fetch' => ClassMetadataInfo::FETCH_EXTRA_LAZY,
121
+    'cascade' =>
122
+    [
123
+    0 => 'remove',
124
+    1 => 'persist',
125
+    2 => 'refresh',
126
+    3 => 'merge',
127
+    4 => 'detach',
128
+    ],
129
+    'mappedBy' => NULL,
130
+    'joinTable' =>
131
+    [
132
+    'name' => 'cms_users_groups',
133
+    'joinColumns' =>
134
+    [
135 135
     0 =>
136 136
     [
137 137
     'name' => 'user_id',
@@ -139,18 +139,18 @@  discard block
 block discarded – undo
139 139
     'unique' => false,
140 140
     'nullable' => false,
141 141
     ],
142
-   ],
143
-   'inverseJoinColumns' =>
144
-   [
142
+    ],
143
+    'inverseJoinColumns' =>
144
+    [
145 145
     0 =>
146 146
     [
147 147
     'name' => 'group_id',
148 148
     'referencedColumnName' => 'id',
149 149
     'columnDefinition' => 'INT NULL',
150 150
     ],
151
-   ],
152
-   ],
153
-   'orderBy' => NULL,
151
+    ],
152
+    ],
153
+    'orderBy' => NULL,
154 154
     ]
155 155
 );
156 156
 $metadata->addEntityListener(Events::prePersist, UserListener::class, 'customPrePersist');
Please login to merge, or discard this patch.