@@ -138,8 +138,8 @@ discard block |
||
| 138 | 138 | * |
| 139 | 139 | * @see Record::$indexes |
| 140 | 140 | */ |
| 141 | - const INDEX = 1000; //Default index type |
|
| 142 | - const UNIQUE = 2000; //Unique index definition |
|
| 141 | + const INDEX = 1000; //Default index type |
|
| 142 | + const UNIQUE = 2000; //Unique index definition |
|
| 143 | 143 | |
| 144 | 144 | /** |
| 145 | 145 | * Errors in relations and acessors. |
@@ -470,7 +470,7 @@ discard block |
||
| 470 | 470 | public function setField($name, $value, $filter = true) |
| 471 | 471 | { |
| 472 | 472 | if (!array_key_exists($name, $this->fields)) { |
| 473 | - throw new FieldException("Undefined field '{$name}' in '" . static::class . "'."); |
|
| 473 | + throw new FieldException("Undefined field '{$name}' in '".static::class."'."); |
|
| 474 | 474 | } |
| 475 | 475 | |
| 476 | 476 | $original = isset($this->fields[$name]) ? $this->fields[$name] : null; |
@@ -496,7 +496,7 @@ discard block |
||
| 496 | 496 | public function getField($name, $default = null, $filter = true) |
| 497 | 497 | { |
| 498 | 498 | if (!array_key_exists($name, $this->fields)) { |
| 499 | - throw new FieldException("Undefined field '{$name}' in '" . static::class . "'."); |
|
| 499 | + throw new FieldException("Undefined field '{$name}' in '".static::class."'."); |
|
| 500 | 500 | } |
| 501 | 501 | |
| 502 | 502 | $value = $this->fields[$name]; |
@@ -542,7 +542,7 @@ discard block |
||
| 542 | 542 | //Constructing relation |
| 543 | 543 | if (!isset($this->ormSchema[ORM::M_RELATIONS][$name])) { |
| 544 | 544 | throw new RecordException( |
| 545 | - "Undefined relation {$name} in record " . static::class . '.' |
|
| 545 | + "Undefined relation {$name} in record ".static::class.'.' |
|
| 546 | 546 | ); |
| 547 | 547 | } |
| 548 | 548 | |
@@ -698,7 +698,7 @@ discard block |
||
| 698 | 698 | public function __debugInfo() |
| 699 | 699 | { |
| 700 | 700 | $info = [ |
| 701 | - 'table' => $this->ormSchema[ORM::M_DB] . '/' . $this->ormSchema[ORM::M_TABLE], |
|
| 701 | + 'table' => $this->ormSchema[ORM::M_DB].'/'.$this->ormSchema[ORM::M_TABLE], |
|
| 702 | 702 | 'pivotData' => $this->pivotData, |
| 703 | 703 | 'fields' => $this->getFields(), |
| 704 | 704 | 'errors' => $this->getErrors(), |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | |
| 410 | 410 | if (!$injector instanceof InjectorInterface) { |
| 411 | 411 | throw new InjectionException( |
| 412 | - "Class '" . get_class($injector) . "' must be an instance of InjectorInterface for '{$reflection->getName()}'" |
|
| 412 | + "Class '".get_class($injector)."' must be an instance of InjectorInterface for '{$reflection->getName()}'" |
|
| 413 | 413 | ); |
| 414 | 414 | } |
| 415 | 415 | |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | $class, |
| 434 | 434 | array $parameters, |
| 435 | 435 | $context = null, |
| 436 | - \ReflectionClass &$reflection = null |
|
| 436 | + \ReflectionClass & $reflection = null |
|
| 437 | 437 | ) { |
| 438 | 438 | try { |
| 439 | 439 | $reflection = new \ReflectionClass($class); |
@@ -174,7 +174,7 @@ |
||
| 174 | 174 | { |
| 175 | 175 | //We do support 3 mutators: getter, setter and accessor, all of them can be |
| 176 | 176 | //referenced to valid field name by adding "s" at the end |
| 177 | - $mutator = $mutator . 's'; |
|
| 177 | + $mutator = $mutator.'s'; |
|
| 178 | 178 | |
| 179 | 179 | if (isset($this->{$mutator}[$field])) { |
| 180 | 180 | return $this->{$mutator}[$field]; |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | break; |
| 91 | 91 | default: |
| 92 | 92 | throw new EntityException( |
| 93 | - "Undefined field format '" . static::FIELD_FORMAT . "'" |
|
| 93 | + "Undefined field format '".static::FIELD_FORMAT."'" |
|
| 94 | 94 | ); |
| 95 | 95 | } |
| 96 | 96 | |
@@ -61,14 +61,14 @@ |
||
| 61 | 61 | */ |
| 62 | 62 | public function getSchema($database, $table) |
| 63 | 63 | { |
| 64 | - if (!isset($this->schemas[$database . '.' . $table])) { |
|
| 64 | + if (!isset($this->schemas[$database.'.'.$table])) { |
|
| 65 | 65 | $schema = $this->getTable($database, $table)->getSchema(); |
| 66 | 66 | |
| 67 | 67 | //We have to declare existed to prevent dropping existed schema |
| 68 | - $this->schemas[$database . '.' . $table] = $schema->declareExisted(); |
|
| 68 | + $this->schemas[$database.'.'.$table] = $schema->declareExisted(); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - return $this->schemas[$database . '.' . $table]; |
|
| 71 | + return $this->schemas[$database.'.'.$table]; |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -187,7 +187,7 @@ |
||
| 187 | 187 | ]); |
| 188 | 188 | |
| 189 | 189 | return $this->files->normalizePath( |
| 190 | - $this->config->getDirectory() . FilesInterface::SEPARATOR . $filename |
|
| 190 | + $this->config->getDirectory().FilesInterface::SEPARATOR.$filename |
|
| 191 | 191 | ); |
| 192 | 192 | } |
| 193 | 193 | } |
| 194 | 194 | \ No newline at end of file |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | ); |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - if ($this->foreignTable != $this->table && !$outerSchema->hasColumn($this->foreignKey)) { |
|
| 87 | + if ($this->foreignTable != $this->table && !$outerSchema->hasColumn($this->foreignKey)) { |
|
| 88 | 88 | throw new ReferenceException( |
| 89 | 89 | "Unable to alter foreign key '{$schema->getName()}'.'{$this->column}'," |
| 90 | 90 | . " foreign column '{$this->foreignTable}'.'{$this->foreignKey}' does not exists" |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | //Executing migration inside global transaction |
| 125 | - $this->execute(function () use ($migration) { |
|
| 125 | + $this->execute(function() use ($migration) { |
|
| 126 | 126 | $migration->up(); |
| 127 | 127 | }); |
| 128 | 128 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | //Executing migration inside global transaction |
| 155 | - $this->execute(function () use ($migration) { |
|
| 155 | + $this->execute(function() use ($migration) { |
|
| 156 | 156 | $migration->down(); |
| 157 | 157 | }); |
| 158 | 158 | |
@@ -103,7 +103,7 @@ |
||
| 103 | 103 | */ |
| 104 | 104 | public function localeDirectory($locale) |
| 105 | 105 | { |
| 106 | - return $this->config['localesDirectory'] . $locale . '/'; |
|
| 106 | + return $this->config['localesDirectory'].$locale.'/'; |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | /** |