@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | public function __toString() |
14 | 14 | { |
15 | - return static::class_short_name() . ' #' . $this->getId(); |
|
15 | + return static::class_short_name().' #'.$this->getId(); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | public function immortal(): bool |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | if (!empty($persistence_errors = $table_row->persist())) { // validate and persist |
84 | 84 | $errors = []; |
85 | 85 | foreach ($persistence_errors as $column_name => $err) { |
86 | - if(is_numeric($column_name)) |
|
87 | - $errors[]=$err; |
|
86 | + if (is_numeric($column_name)) |
|
87 | + $errors[] = $err; |
|
88 | 88 | else |
89 | 89 | $errors[sprintf('MODEL_%s_FIELD_%s', static::model_type(), $column_name)] = $err; |
90 | 90 | } |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | */ |
159 | 159 | public static function tableAlias(): string |
160 | 160 | { |
161 | - if (defined(get_called_class() . '::TABLE_ALIAS')) { |
|
161 | + if (defined(get_called_class().'::TABLE_ALIAS')) { |
|
162 | 162 | return get_called_class()::TABLE_ALIAS; |
163 | 163 | } |
164 | 164 | |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | |
168 | 168 | public static function model_type(): string |
169 | 169 | { |
170 | - if (defined(get_called_class() . '::MODEL_TYPE')) { |
|
170 | + if (defined(get_called_class().'::MODEL_TYPE')) { |
|
171 | 171 | return get_called_class()::MODEL_TYPE; |
172 | 172 | } |
173 | 173 |
@@ -83,10 +83,11 @@ |
||
83 | 83 | if (!empty($persistence_errors = $table_row->persist())) { // validate and persist |
84 | 84 | $errors = []; |
85 | 85 | foreach ($persistence_errors as $column_name => $err) { |
86 | - if(is_numeric($column_name)) |
|
87 | - $errors[]=$err; |
|
88 | - else |
|
89 | - $errors[sprintf('MODEL_%s_FIELD_%s', static::model_type(), $column_name)] = $err; |
|
86 | + if(is_numeric($column_name)) { |
|
87 | + $errors[]=$err; |
|
88 | + } else { |
|
89 | + $errors[sprintf('MODEL_%s_FIELD_%s', static::model_type(), $column_name)] = $err; |
|
90 | + } |
|
90 | 91 | } |
91 | 92 | |
92 | 93 | return $errors; |