Failed Conditions
Pull Request — master (#5903)
by
unknown
18:34
created
lib/Doctrine/ORM/Mapping/ReservedWordQuoteStrategy.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
  */
30 30
 class ReservedWordQuoteStrategy implements QuoteStrategy
31 31
 {
32
-   /**
32
+    /**
33 33
      * @param AbstractPlatform $platform
34 34
      * @param string $name
35 35
      * @param bool $force
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -72,10 +72,10 @@  discard block
 block discarded – undo
72 72
         $tableName = $class->table['name'];
73 73
 
74 74
         if ( ! empty($class->table['schema'])) {
75
-            $tableName = $class->table['schema'] . '.' . $class->table['name'];
75
+            $tableName = $class->table['schema'].'.'.$class->table['name'];
76 76
 
77 77
             if ( ! $platform->supportsSchemas() && $platform->canEmulateSchemas()) {
78
-                $tableName = $class->table['schema'] . '__' . $class->table['name'];
78
+                $tableName = $class->table['schema'].'__'.$class->table['name'];
79 79
             }
80 80
         }
81 81
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         $schema = '';
131 131
 
132 132
         if (isset($association['joinTable']['schema'])) {
133
-            $schema = $association['joinTable']['schema'] . '.';
133
+            $schema = $association['joinTable']['schema'].'.';
134 134
         }
135 135
 
136 136
         $tableName = $association['joinTable']['name'];
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
             isset($association['joinTable']['quoted'])
142 142
         );
143 143
 
144
-        return $schema . $tableName;
144
+        return $schema.$tableName;
145 145
     }
146 146
 
147 147
     /**
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
             $self                   = $this;
163 163
             $joinColumns            = $class->associationMappings[$fieldName]['joinColumns'];
164 164
             $assocQuotedColumnNames = array_map(
165
-                function ($joinColumn) use ($platform, $self)
165
+                function($joinColumn) use ($platform, $self)
166 166
                 {
167 167
                     return $self->getQuotedName(
168 168
                         $platform,
@@ -189,10 +189,10 @@  discard block
 block discarded – undo
189 189
         //     If the alias is to long, characters are cut off from the beginning.
190 190
         // 3 ) Strip non alphanumeric characters
191 191
         // 4 ) Prefix with "_" if the result its numeric
192
-        $columnName = $columnName . '_' . $counter;
192
+        $columnName = $columnName.'_'.$counter;
193 193
         $columnName = substr($columnName, -$platform->getMaxIdentifierLength());
194 194
         $columnName = preg_replace('/[^A-Za-z0-9_]/', '', $columnName);
195
-        $columnName = is_numeric($columnName) ? '_' . $columnName : $columnName;
195
+        $columnName = is_numeric($columnName) ? '_'.$columnName : $columnName;
196 196
 
197 197
         return $platform->getSQLResultCasing($columnName);
198 198
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Mapping/ReservedWordQuoteStrategyTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     protected function assertQuoted($expected, $actual, $message = '')
104 104
     {
105
-        $this->assertEquals('"' . $expected . '"', $actual, $message);
105
+        $this->assertEquals('"'.$expected.'"', $actual, $message);
106 106
     }
107 107
 
108 108
     /**
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
             'columnName'    => $notQuoted,
185 185
         ));
186 186
 
187
-        $this->assertEquals(array('"' . $quoted . '"'), $this->strategy->getIdentifierColumnNames($cm1, $this->platform));
187
+        $this->assertEquals(array('"'.$quoted.'"'), $this->strategy->getIdentifierColumnNames($cm1, $this->platform));
188 188
         $this->assertEquals(array($notQuoted), $this->strategy->getIdentifierColumnNames($cm2, $this->platform));
189 189
     }
190 190
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
             )),
214 214
         ));
215 215
 
216
-        $this->assertEquals(array('"' . $quoted . '"'), $this->strategy->getIdentifierColumnNames($cm1, $this->platform));
216
+        $this->assertEquals(array('"'.$quoted.'"'), $this->strategy->getIdentifierColumnNames($cm1, $this->platform));
217 217
 
218 218
         $cm2 = $this->createClassMetadata('Doctrine\Tests\Models\DDC117\DDC117ArticleDetails');
219 219
         $cm2->mapOneToOne(array(
Please login to merge, or discard this patch.