Completed
Push — master ( da1891...eebb53 )
by Anton
03:32
created
source/Spiral/ORM/Entities/RecordSelector.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
     {
153 153
         $offset = count($this->dataColumns);
154 154
         foreach ($columns as $column) {
155
-            $columnAlias = 'c' . (++$this->countColumns);
156
-            $this->dataColumns[] = $table . '.' . $column . ' AS ' . $columnAlias;
155
+            $columnAlias = 'c'.(++$this->countColumns);
156
+            $this->dataColumns[] = $table.'.'.$column.' AS '.$columnAlias;
157 157
         }
158 158
 
159 159
         return $offset;
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
     public function count($column = self::DEFAULT_COUNTING_FIELD)
530 530
     {
531 531
         if ($column == self::DEFAULT_COUNTING_FIELD && !empty($this->loader->getPrimaryKey())) {
532
-            $column = 'DISTINCT(' . $this->loader->getPrimaryKey().')';
532
+            $column = 'DISTINCT('.$this->loader->getPrimaryKey().')';
533 533
         }
534 534
 
535 535
         return parent::count($column);
Please login to merge, or discard this patch.
source/Spiral/ORM/Entities/Schemas/RelationSchema.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -498,7 +498,7 @@
 block discarded – undo
498 498
         foreach ($proposed as $property => $alias) {
499 499
             if (isset($this->definition[$property])) {
500 500
                 //Let's create some default options based on user specified values
501
-                $options['definition:' . $alias] = $this->definition[$property];
501
+                $options['definition:'.$alias] = $this->definition[$property];
502 502
             }
503 503
         }
504 504
 
Please login to merge, or discard this patch.
source/Spiral/ORM/Entities/Schemas/Relations/ManyToManySchema.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
         $names = [$this->record->getRole(), $this->outerRecord()->getRole()];
142 142
         asort($names);
143 143
 
144
-        return join('_', $names) . static::PIVOT_POSTFIX;
144
+        return join('_', $names).static::PIVOT_POSTFIX;
145 145
     }
146 146
 
147 147
     /**
Please login to merge, or discard this patch.
source/Spiral/ORM/Entities/Schemas/Relations/BelongsToSchema.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
             || !isset($this->definition[RecordEntity::INVERSE][1])
77 77
         ) {
78 78
             throw new RelationSchemaException(
79
-                "Unable to revert BELONG_TO relation '{$this->record}'.'{$this}', " .
79
+                "Unable to revert BELONG_TO relation '{$this->record}'.'{$this}', ".
80 80
                 "backward relation type is missing or invalid."
81 81
             );
82 82
         }
Please login to merge, or discard this patch.
source/Spiral/ORM/Entities/Schemas/Relations/BelongsToMorphedSchema.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
             || !isset($this->definition[RecordEntity::INVERSE][1])
82 82
         ) {
83 83
             throw new RelationSchemaException(
84
-                "Unable to revert BELONG_TO_MORPHED relation '{$this->record}'.'{$this}', " .
84
+                "Unable to revert BELONG_TO_MORPHED relation '{$this->record}'.'{$this}', ".
85 85
                 "backward relation type is missing or invalid."
86 86
             );
87 87
         }
Please login to merge, or discard this patch.
source/Spiral/ORM/Entities/Schemas/RecordSchema.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
      */
181 181
     public function getTableID()
182 182
     {
183
-        return $this->getDatabase() . '.' . $this->getTable();
183
+        return $this->getDatabase().'.'.$this->getTable();
184 184
     }
185 185
 
186 186
     /**
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
             if (!empty($filter = $this->builder->getMutators($column->abstractType()))) {
425 425
                 //Mutator associated with type directly
426 426
                 $resolved += $filter;
427
-            } elseif (!empty($filter = $this->builder->getMutators('php:' . $column->phpType()))) {
427
+            } elseif (!empty($filter = $this->builder->getMutators('php:'.$column->phpType()))) {
428 428
                 //Mutator associated with php type
429 429
                 $resolved += $filter;
430 430
             }
Please login to merge, or discard this patch.
source/Spiral/ORM/RecordEntity.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -137,8 +137,8 @@  discard block
 block discarded – undo
137 137
      *
138 138
      * @see Record::$indexes
139 139
      */
140
-    const INDEX  = 1000;            //Default index type
141
-    const UNIQUE = 2000;            //Unique index definition
140
+    const INDEX  = 1000; //Default index type
141
+    const UNIQUE = 2000; //Unique index definition
142 142
 
143 143
     /**
144 144
      * Errors in relations and acessors.
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
     public function setField($name, $value, $filter = true)
460 460
     {
461 461
         if (!array_key_exists($name, $this->fields)) {
462
-            throw new FieldException("Undefined field '{$name}' in '" . static::class . "'.");
462
+            throw new FieldException("Undefined field '{$name}' in '".static::class."'.");
463 463
         }
464 464
 
465 465
         $original = isset($this->fields[$name]) ? $this->fields[$name] : null;
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
     public function getField($name, $default = null, $filter = true)
486 486
     {
487 487
         if (!array_key_exists($name, $this->fields)) {
488
-            throw new FieldException("Undefined field '{$name}' in '" . static::class . "'.");
488
+            throw new FieldException("Undefined field '{$name}' in '".static::class."'.");
489 489
         }
490 490
 
491 491
         $value = $this->fields[$name];
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
         //Constructing relation
530 530
         if (!isset($this->ormSchema[ORM::M_RELATIONS][$name])) {
531 531
             throw new RecordException(
532
-                "Undefined relation {$name} in record " . static::class . "."
532
+                "Undefined relation {$name} in record ".static::class."."
533 533
             );
534 534
         }
535 535
 
@@ -683,7 +683,7 @@  discard block
 block discarded – undo
683 683
     public function __debugInfo()
684 684
     {
685 685
         $info = [
686
-            'table'     => $this->ormSchema[ORM::M_DB] . '/' . $this->ormSchema[ORM::M_TABLE],
686
+            'table'     => $this->ormSchema[ORM::M_DB].'/'.$this->ormSchema[ORM::M_TABLE],
687 687
             'pivotData' => $this->pivotData,
688 688
             'fields'    => $this->getFields(),
689 689
             'errors'    => $this->getErrors()
Please login to merge, or discard this patch.
source/Spiral/ORM/EntityCache.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             throw new CacheException("Entity cache size exceeded.");
98 98
         }
99 99
 
100
-        return $this->cache[get_class($entity) . '.' . $entity->primaryKey()] = $entity;
100
+        return $this->cache[get_class($entity).'.'.$entity->primaryKey()] = $entity;
101 101
     }
102 102
 
103 103
     /**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             return;
112 112
         }
113 113
 
114
-        unset($this->cache[get_class($entity) . '.' . $entity->primaryKey()]);
114
+        unset($this->cache[get_class($entity).'.'.$entity->primaryKey()]);
115 115
     }
116 116
 
117 117
     /**
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      */
124 124
     public function has($class, $primaryKey)
125 125
     {
126
-        return isset($this->cache[$class . '.' . $primaryKey]);
126
+        return isset($this->cache[$class.'.'.$primaryKey]);
127 127
     }
128 128
 
129 129
     /**
@@ -135,11 +135,11 @@  discard block
 block discarded – undo
135 135
      */
136 136
     public function get($class, $primaryKey)
137 137
     {
138
-        if (empty($this->cache[$class . '.' . $primaryKey])) {
138
+        if (empty($this->cache[$class.'.'.$primaryKey])) {
139 139
             return null;
140 140
         }
141 141
 
142
-        return $this->cache[$class . '.' . $primaryKey];
142
+        return $this->cache[$class.'.'.$primaryKey];
143 143
     }
144 144
 
145 145
     /**
Please login to merge, or discard this patch.
source/Spiral/Cache/Stores/MemcacheStore.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      */
91 91
     public function has($name)
92 92
     {
93
-        return $this->driver->get($this->prefix . $name);
93
+        return $this->driver->get($this->prefix.$name);
94 94
     }
95 95
 
96 96
     /**
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      */
99 99
     public function get($name)
100 100
     {
101
-        return $this->driver->get($this->prefix . $name);
101
+        return $this->driver->get($this->prefix.$name);
102 102
     }
103 103
 
104 104
     /**
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             $lifetime = 0;
114 114
         }
115 115
 
116
-        return $this->driver->set($this->prefix . $name, $data, $lifetime);
116
+        return $this->driver->set($this->prefix.$name, $data, $lifetime);
117 117
     }
118 118
 
119 119
     /**
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     public function forever($name, $data)
123 123
     {
124
-        return $this->driver->forever($this->prefix . $name, $data);
124
+        return $this->driver->forever($this->prefix.$name, $data);
125 125
     }
126 126
 
127 127
     /**
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      */
130 130
     public function delete($name)
131 131
     {
132
-        return $this->driver->delete($this->prefix . $name);
132
+        return $this->driver->delete($this->prefix.$name);
133 133
     }
134 134
 
135 135
     /**
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      */
138 138
     public function inc($name, $delta = 1)
139 139
     {
140
-        return $this->driver->inc($this->prefix . $name);
140
+        return $this->driver->inc($this->prefix.$name);
141 141
     }
142 142
 
143 143
     /**
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function dec($name, $delta = 1)
147 147
     {
148
-        return $this->driver->dec($this->prefix . $name, $delta);
148
+        return $this->driver->dec($this->prefix.$name, $delta);
149 149
     }
150 150
 
151 151
     /**
Please login to merge, or discard this patch.