@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | public function import($assoc_data) |
| 43 | 43 | { |
| 44 | 44 | if (!is_array($assoc_data)) { |
| 45 | - throw new \Exception(__FUNCTION__ . '(assoc_data) parm is not an array'); |
|
| 45 | + throw new \Exception(__FUNCTION__.'(assoc_data) parm is not an array'); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | // shove it all up in model, god will sort them out |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | |
| 70 | 70 | if ($table_name === false) { |
| 71 | 71 | $calling_class = $reflect->getShortName(); |
| 72 | - if (defined($const_name = 'TABLE_' . strtoupper($calling_class))) { |
|
| 72 | + if (defined($const_name = 'TABLE_'.strtoupper($calling_class))) { |
|
| 73 | 73 | $table_name = constant($const_name); |
| 74 | 74 | } else { |
| 75 | 75 | $table_name = strtolower($calling_class); |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | $ret = []; |
| 115 | 115 | $pk_name = implode('_', array_keys($Query->table()->primary_keys())); |
| 116 | 116 | |
| 117 | - if (count($pks = $Query->table()->primary_keys()) > 1) { |
|
| 117 | + if (count($pks = $Query->table()->primary_keys())>1) { |
|
| 118 | 118 | $concat_pk = sprintf('CONCAT(%s) as %s', implode(',', $pks), $pk_name); |
| 119 | 119 | $Query->select_also([$concat_pk]); |
| 120 | 120 | } |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | public function __toString() |
| 14 | 14 | { |
| 15 | - return static::class_short_name() . ' #' . $this->get_id(); |
|
| 15 | + return static::class_short_name().' #'.$this->get_id(); |
|
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | public function immortal(): bool |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | $extraction_table = $extraction_class::table(); |
| 28 | 28 | foreach ($extraction_table->columns() as $column_name => $column) { |
| 29 | - $probe_name = $extraction_class::table_alias() . '_' . $column_name; |
|
| 29 | + $probe_name = $extraction_class::table_alias().'_'.$column_name; |
|
| 30 | 30 | |
| 31 | 31 | if (!is_null($probe_res = $this->get($probe_name))) { |
| 32 | 32 | $extract_model->set($column_name, $probe_res); |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | */ |
| 186 | 186 | public static function table_alias(): string |
| 187 | 187 | { |
| 188 | - return defined(get_called_class() . '::TABLE_ALIAS') ? static::TABLE_ALIAS : static::model_type(); |
|
| 188 | + return defined(get_called_class().'::TABLE_ALIAS') ? static::TABLE_ALIAS : static::model_type(); |
|
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | public static function class_short_name() |