@@ -67,7 +67,7 @@ |
||
| 67 | 67 | public static function otm($k = null) |
| 68 | 68 | { |
| 69 | 69 | $type = static::model_type(); |
| 70 | - $d = ['t' => $type . 's_models', 'k' => $type . '_id', 'a' => $type . 's_otm']; |
|
| 70 | + $d = ['t' => $type.'s_models', 'k' => $type.'_id', 'a' => $type.'s_otm']; |
|
| 71 | 71 | return is_null($k) ? $d : $d[$k]; |
| 72 | 72 | } |
| 73 | 73 | } |
@@ -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,7 +83,7 @@ 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 | - $errors[sprintf('MODEL_%s_FIELD_%s', static::model_type(), $column_name)] = 'CRUDITES_' . $err; |
|
| 86 | + $errors[sprintf('MODEL_%s_FIELD_%s', static::model_type(), $column_name)] = 'CRUDITES_'.$err; |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | return $errors; |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | */ |
| 157 | 157 | public static function tableAlias(): string |
| 158 | 158 | { |
| 159 | - if (defined(get_called_class() . '::TABLE_ALIAS')) { |
|
| 159 | + if (defined(get_called_class().'::TABLE_ALIAS')) { |
|
| 160 | 160 | return get_called_class()::TABLE_ALIAS; |
| 161 | 161 | } |
| 162 | 162 | |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | |
| 166 | 166 | public static function model_type(): string |
| 167 | 167 | { |
| 168 | - if (defined(get_called_class() . '::MODEL_TYPE')) { |
|
| 168 | + if (defined(get_called_class().'::MODEL_TYPE')) { |
|
| 169 | 169 | return get_called_class()::MODEL_TYPE; |
| 170 | 170 | } |
| 171 | 171 | |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | $extraction_table = $extraction_class::table(); |
| 14 | 14 | |
| 15 | 15 | foreach ($extraction_table->columns() as $column_name => $column) { |
| 16 | - $probe_name = $extraction_class::tableAlias() . '_' . $column_name; |
|
| 16 | + $probe_name = $extraction_class::tableAlias().'_'.$column_name; |
|
| 17 | 17 | |
| 18 | 18 | if (!is_null($probe_res = $from_model->get($probe_name))) { |
| 19 | 19 | $extract_model->set($column_name, $probe_res); |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | public function import($assoc_data) |
| 42 | 42 | { |
| 43 | 43 | if (!is_array($assoc_data)) { |
| 44 | - throw new \Exception(__FUNCTION__ . '(assoc_data) parm is not an array'); |
|
| 44 | + throw new \Exception(__FUNCTION__.'(assoc_data) parm is not an array'); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | // shove it all up in model, god will sort them out |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | if ($table_name === false) { |
| 70 | 70 | $calling_class = $reflect->getShortName(); |
| 71 | - if (defined($const_name = 'TABLE_' . strtoupper($calling_class))) { |
|
| 71 | + if (defined($const_name = 'TABLE_'.strtoupper($calling_class))) { |
|
| 72 | 72 | $table_name = constant($const_name); |
| 73 | 73 | } else { |
| 74 | 74 | $table_name = strtolower($calling_class); |