Failed Conditions
Pull Request — master (#5903)
by
unknown
63:59
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   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
         do {
55 55
             $random = substr(str_shuffle(str_repeat("abcdefghijklmnopqrstuvwxyz", 5)), 0, 5);
56
-        } while (!in_array($random, $keywords));
56
+        } while ( ! in_array($random, $keywords));
57 57
 
58 58
         $data = array();
59 59
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     protected function assertQuoted($expected, $actual, $message = '')
81 81
     {
82
-        $this->assertEquals('"' . $expected . '"', $actual, $message);
82
+        $this->assertEquals('"'.$expected.'"', $actual, $message);
83 83
     }
84 84
 
85 85
     /**
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
             'columnName'    => $notQuoted,
162 162
         ));
163 163
 
164
-        $this->assertEquals(array('"' . $quoted . '"'), $this->strategy->getIdentifierColumnNames($cm1, $this->platform));
164
+        $this->assertEquals(array('"'.$quoted.'"'), $this->strategy->getIdentifierColumnNames($cm1, $this->platform));
165 165
         $this->assertEquals(array('id'), $this->strategy->getIdentifierColumnNames($cm2, $this->platform));
166 166
     }
167 167
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
             )),
191 191
         ));
192 192
 
193
-        $this->assertEquals(array('"' . $quoted . '"'), $this->strategy->getIdentifierColumnNames($cm1, $this->platform));
193
+        $this->assertEquals(array('"'.$quoted.'"'), $this->strategy->getIdentifierColumnNames($cm1, $this->platform));
194 194
 
195 195
         $cm2 = $this->createClassMetadata('Doctrine\Tests\Models\DDC117\DDC117ArticleDetails');
196 196
         $cm2->mapOneToOne(array(
Please login to merge, or discard this patch.