@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | public function index($code = 500) |
33 | 33 | { |
34 | - $codeString = $code . '_' . error_code_string($code); |
|
34 | + $codeString = $code.'_'.error_code_string($code); |
|
35 | 35 | |
36 | 36 | if (presenter()->theme->use === true) { |
37 | 37 | presenter()->theme->setLayout('error'); |
@@ -45,8 +45,8 @@ discard block |
||
45 | 45 | |
46 | 46 | view('error-code', [ |
47 | 47 | 'code' => $code, |
48 | - 'title' => language()->getLine($codeString . '_TITLE'), |
|
49 | - 'message' => language()->getLine($codeString . '_MESSAGE'), |
|
48 | + 'title' => language()->getLine($codeString.'_TITLE'), |
|
49 | + 'message' => language()->getLine($codeString.'_MESSAGE'), |
|
50 | 50 | ]); |
51 | 51 | } |
52 | 52 | } |
53 | 53 | \ No newline at end of file |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $item = new SplArrayObject(); |
52 | 52 | foreach ($fields as $field) { |
53 | 53 | if ($row->offsetExists($field)) { |
54 | - $item[ $field ] = $row->offsetGet($field); |
|
54 | + $item[$field] = $row->offsetGet($field); |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
@@ -77,8 +77,8 @@ discard block |
||
77 | 77 | $chunks = array_chunk($this->storage, $entries); |
78 | 78 | $offset = $page - 1; |
79 | 79 | |
80 | - if (isset($chunks[ $offset ])) { |
|
81 | - $result = new ArrayIterator($chunks[ $offset ]); |
|
80 | + if (isset($chunks[$offset])) { |
|
81 | + $result = new ArrayIterator($chunks[$offset]); |
|
82 | 82 | |
83 | 83 | if (empty($fields)) { |
84 | 84 | return $this->result = $result; |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $item = new SplArrayObject(); |
88 | 88 | foreach ($fields as $field) { |
89 | 89 | if ($row->offsetExists($field)) { |
90 | - $item[ $field ] = $row->offsetGet($field); |
|
90 | + $item[$field] = $row->offsetGet($field); |
|
91 | 91 | } |
92 | 92 | } |
93 | 93 | |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | $counter = 0; |
262 | 262 | foreach ($this->storage as $row) { |
263 | 263 | if ($row->offsetExists($field)) { |
264 | - if ( ! in_array($row->offsetGet($field), $notInCriteria)) { |
|
264 | + if (!in_array($row->offsetGet($field), $notInCriteria)) { |
|
265 | 265 | $result[] = $row; |
266 | 266 | $counter++; |
267 | 267 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | public function __construct() |
36 | 36 | { |
37 | - if ( ! empty($this->file)) { |
|
37 | + if (!empty($this->file)) { |
|
38 | 38 | $extension = pathinfo($this->file, PATHINFO_EXTENSION); |
39 | 39 | |
40 | 40 | switch ($extension) { |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | $first = reset($this->storage); |
52 | - if ( ! isset($first[ $this->primaryKey ])) { |
|
52 | + if (!isset($first[$this->primaryKey])) { |
|
53 | 53 | $keys = $first->getKeys(); |
54 | 54 | $this->primaryKey = reset($keys); |
55 | 55 | } |
@@ -78,57 +78,57 @@ |
||
78 | 78 | |
79 | 79 | $timestamp = $this->isUnixTimestamp === true ? strtotime(date('Y-m-d H:i:s')) : date('Y-m-d H:i:s'); |
80 | 80 | |
81 | - if ( ! isset($sets[ 'record_status' ])) { |
|
82 | - $sets[ 'record_status' ] = $this->recordStatus; |
|
81 | + if (!isset($sets['record_status'])) { |
|
82 | + $sets['record_status'] = $this->recordStatus; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | if (empty($this->primary_keys)) { |
86 | 86 | $primary_key = isset($this->primary_key) ? $this->primary_key : 'id'; |
87 | 87 | |
88 | - if (empty($sets[ $primary_key ])) { |
|
89 | - if ( ! isset($sets[ 'record_create_user' ])) { |
|
90 | - $sets[ 'record_create_user' ] = $this->recordUser; |
|
88 | + if (empty($sets[$primary_key])) { |
|
89 | + if (!isset($sets['record_create_user'])) { |
|
90 | + $sets['record_create_user'] = $this->recordUser; |
|
91 | 91 | } |
92 | 92 | |
93 | - if ( ! isset($sets[ 'record_create_timestamp' ])) { |
|
94 | - $sets[ 'record_create_timestamp' ] = $timestamp; |
|
93 | + if (!isset($sets['record_create_timestamp'])) { |
|
94 | + $sets['record_create_timestamp'] = $timestamp; |
|
95 | 95 | } |
96 | 96 | } |
97 | 97 | } else { |
98 | 98 | foreach ($this->primary_keys as $primary_key) { |
99 | - if (empty($sets[ $primary_key ])) { |
|
100 | - if ( ! isset($sets[ 'record_create_user' ])) { |
|
101 | - $sets[ 'record_create_user' ] = $this->recordUser; |
|
99 | + if (empty($sets[$primary_key])) { |
|
100 | + if (!isset($sets['record_create_user'])) { |
|
101 | + $sets['record_create_user'] = $this->recordUser; |
|
102 | 102 | } |
103 | 103 | |
104 | - if ( ! isset($sets[ 'record_create_timestamp' ])) { |
|
105 | - $sets[ 'record_create_timestamp' ] = $timestamp; |
|
104 | + if (!isset($sets['record_create_timestamp'])) { |
|
105 | + $sets['record_create_timestamp'] = $timestamp; |
|
106 | 106 | } |
107 | 107 | } |
108 | 108 | } |
109 | 109 | } |
110 | 110 | |
111 | - $sets[ 'record_update_user' ] = $this->recordUser; |
|
111 | + $sets['record_update_user'] = $this->recordUser; |
|
112 | 112 | |
113 | - if ( ! isset($sets[ 'record_update_timestamp' ])) { |
|
114 | - $sets[ 'record_update_timestamp' ] = $timestamp; |
|
113 | + if (!isset($sets['record_update_timestamp'])) { |
|
114 | + $sets['record_update_timestamp'] = $timestamp; |
|
115 | 115 | } |
116 | 116 | } |
117 | 117 | |
118 | 118 | protected function updateRecordSets(array &$sets) |
119 | 119 | { |
120 | - $sets[ 'record_status' ] = $this->recordStatus; |
|
121 | - $sets[ 'record_update_user' ] = $this->recordUser; |
|
120 | + $sets['record_status'] = $this->recordStatus; |
|
121 | + $sets['record_update_user'] = $this->recordUser; |
|
122 | 122 | |
123 | 123 | $timestamp = $this->isUnixTimestamp === true ? strtotime(date('Y-m-d H:i:s')) : date('Y-m-d H:i:s'); |
124 | 124 | |
125 | - if ( ! isset($sets[ 'record_update_timestamp' ])) { |
|
126 | - $sets[ 'record_update_timestamp' ] = $timestamp; |
|
125 | + if (!isset($sets['record_update_timestamp'])) { |
|
126 | + $sets['record_update_timestamp'] = $timestamp; |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | if ($this->recordStatus === 'PUBLISH') { |
130 | - $sets[ 'record_delete_timestamp' ] = null; |
|
131 | - $sets[ 'record_delete_user' ] = null; |
|
130 | + $sets['record_delete_timestamp'] = null; |
|
131 | + $sets['record_delete_user'] = null; |
|
132 | 132 | } |
133 | 133 | } |
134 | 134 | } |
135 | 135 | \ No newline at end of file |
@@ -81,10 +81,10 @@ discard block |
||
81 | 81 | |
82 | 82 | if (empty($where)) { |
83 | 83 | if (empty($this->primaryKeys)) { |
84 | - $where[ $primaryKey ] = $sets[ $primaryKey ]; |
|
84 | + $where[$primaryKey] = $sets[$primaryKey]; |
|
85 | 85 | } else { |
86 | 86 | foreach ($this->primaryKeys as $primaryKey) { |
87 | - $where[ $primaryKey ] = $sets[ $primaryKey ]; |
|
87 | + $where[$primaryKey] = $sets[$primaryKey]; |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | } |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $collection = isset($collection) ? $collection : $this->collection; |
119 | 119 | |
120 | 120 | if (method_exists($this, 'insertRecordSets')) { |
121 | - foreach($sets as $set) { |
|
121 | + foreach ($sets as $set) { |
|
122 | 122 | $this->insertRecordSets($set); |
123 | 123 | } |
124 | 124 | } |
@@ -147,11 +147,11 @@ discard block |
||
147 | 147 | |
148 | 148 | $where = []; |
149 | 149 | if (empty($this->primaryKeys)) { |
150 | - $where[ $primaryKey ] = $sets[ $primaryKey ]; |
|
151 | - $this->qb->where($primaryKey, $sets[ $primaryKey ]); |
|
150 | + $where[$primaryKey] = $sets[$primaryKey]; |
|
151 | + $this->qb->where($primaryKey, $sets[$primaryKey]); |
|
152 | 152 | } else { |
153 | 153 | foreach ($this->primaryKeys as $primaryKey) { |
154 | - $where[ $primaryKey ] = $sets[ $primaryKey ]; |
|
154 | + $where[$primaryKey] = $sets[$primaryKey]; |
|
155 | 155 | } |
156 | 156 | } |
157 | 157 | |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $this->primaryKeys = []; |
161 | 161 | |
162 | 162 | if (method_exists($this, 'updateRecordSets')) { |
163 | - foreach($sets as $set) { |
|
163 | + foreach ($sets as $set) { |
|
164 | 164 | $this->updateRecordSets($set); |
165 | 165 | } |
166 | 166 | } |
@@ -199,19 +199,19 @@ discard block |
||
199 | 199 | $where = []; |
200 | 200 | |
201 | 201 | if (empty($this->primaryKeys)) { |
202 | - $where[ $primaryKey ] = $id; |
|
203 | - $sets[ $primaryKey ] = $id; |
|
202 | + $where[$primaryKey] = $id; |
|
203 | + $sets[$primaryKey] = $id; |
|
204 | 204 | } elseif (is_array($id)) { |
205 | 205 | foreach ($this->primaryKeys as $primaryKey) { |
206 | - $where[ $primaryKey ] = $sets[ $primaryKey ]; |
|
207 | - $sets[ $primaryKey ] = $id[ $primaryKey ]; |
|
206 | + $where[$primaryKey] = $sets[$primaryKey]; |
|
207 | + $sets[$primaryKey] = $id[$primaryKey]; |
|
208 | 208 | } |
209 | 209 | } else { |
210 | 210 | foreach ($this->primaryKeys as $primaryKey) { |
211 | - $where[ $primaryKey ] = $sets[ $primaryKey ]; |
|
211 | + $where[$primaryKey] = $sets[$primaryKey]; |
|
212 | 212 | } |
213 | 213 | |
214 | - $sets[ reset($this->primaryKeys) ] = $id; |
|
214 | + $sets[reset($this->primaryKeys)] = $id; |
|
215 | 215 | } |
216 | 216 | |
217 | 217 | // Reset Primary Keys |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | $affectedRows = []; |
262 | 262 | |
263 | 263 | foreach ($ids as $id) { |
264 | - $affectedRows[ $id ] = $this->trash($id); |
|
264 | + $affectedRows[$id] = $this->trash($id); |
|
265 | 265 | } |
266 | 266 | |
267 | 267 | return $affectedRows; |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | $affectedRows = []; |
275 | 275 | |
276 | 276 | foreach ($ids as $id) { |
277 | - $affectedRows[ $id ] = $this->trashBy($id, $where, $collection); |
|
277 | + $affectedRows[$id] = $this->trashBy($id, $where, $collection); |
|
278 | 278 | } |
279 | 279 | |
280 | 280 | return $affectedRows; |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | |
285 | 285 | public function delete($id, $force = false, $collection = null) |
286 | 286 | { |
287 | - if ((isset($collection) AND is_bool($collection)) OR ! isset($collection)) { |
|
287 | + if ((isset($collection) AND is_bool($collection)) OR !isset($collection)) { |
|
288 | 288 | $collection = $this->collection; |
289 | 289 | } |
290 | 290 | |
@@ -292,13 +292,13 @@ discard block |
||
292 | 292 | |
293 | 293 | $where = []; |
294 | 294 | if (empty($this->primaryKeys)) { |
295 | - $where[ $primaryKey ] = $id; |
|
295 | + $where[$primaryKey] = $id; |
|
296 | 296 | } elseif (is_array($id)) { |
297 | 297 | foreach ($this->primaryKeys as $primaryKey) { |
298 | - $where[ $primaryKey ] = $id[ $primaryKey ]; |
|
298 | + $where[$primaryKey] = $id[$primaryKey]; |
|
299 | 299 | } |
300 | 300 | } else { |
301 | - $where[ reset($this->primaryKeys) ] = $id; |
|
301 | + $where[reset($this->primaryKeys)] = $id; |
|
302 | 302 | } |
303 | 303 | |
304 | 304 | // Reset Primary Keys |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | $affectedRows = []; |
337 | 337 | |
338 | 338 | foreach ($ids as $id) { |
339 | - $affectedRows[ $id ] = $this->delete($id, $force, $collection); |
|
339 | + $affectedRows[$id] = $this->delete($id, $force, $collection); |
|
340 | 340 | } |
341 | 341 | |
342 | 342 | return $affectedRows; |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | $affectedRows = []; |
348 | 348 | |
349 | 349 | foreach ($ids as $id) { |
350 | - $affectedRows[ $id ] = $this->deleteBy($id, $where, $force, $collection); |
|
350 | + $affectedRows[$id] = $this->deleteBy($id, $where, $force, $collection); |
|
351 | 351 | } |
352 | 352 | |
353 | 353 | return $affectedRows; |
@@ -364,19 +364,19 @@ discard block |
||
364 | 364 | $where = []; |
365 | 365 | |
366 | 366 | if (empty($this->primaryKeys)) { |
367 | - $where[ $primaryKey ] = $id; |
|
368 | - $sets[ $primaryKey ] = $id; |
|
367 | + $where[$primaryKey] = $id; |
|
368 | + $sets[$primaryKey] = $id; |
|
369 | 369 | } elseif (is_array($id)) { |
370 | 370 | foreach ($this->primaryKeys as $primaryKey) { |
371 | - $where[ $primaryKey ] = $sets[ $primaryKey ]; |
|
372 | - $sets[ $primaryKey ] = $id[ $primaryKey ]; |
|
371 | + $where[$primaryKey] = $sets[$primaryKey]; |
|
372 | + $sets[$primaryKey] = $id[$primaryKey]; |
|
373 | 373 | } |
374 | 374 | } else { |
375 | 375 | foreach ($this->primaryKeys as $primaryKey) { |
376 | - $where[ $primaryKey ] = $sets[ $primaryKey ]; |
|
376 | + $where[$primaryKey] = $sets[$primaryKey]; |
|
377 | 377 | } |
378 | 378 | |
379 | - $sets[ reset($this->primaryKeys) ] = $id; |
|
379 | + $sets[reset($this->primaryKeys)] = $id; |
|
380 | 380 | } |
381 | 381 | |
382 | 382 | // Reset Primary Keys |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | $affectedRows = []; |
420 | 420 | |
421 | 421 | foreach ($ids as $id) { |
422 | - $affectedRows[ $id ] = $this->publish($id, $collection); |
|
422 | + $affectedRows[$id] = $this->publish($id, $collection); |
|
423 | 423 | } |
424 | 424 | |
425 | 425 | return $affectedRows; |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | $affectedRows = []; |
433 | 433 | |
434 | 434 | foreach ($ids as $id) { |
435 | - $affectedRows[ $id ] = $this->publishBy($id, $where, $collection); |
|
435 | + $affectedRows[$id] = $this->publishBy($id, $where, $collection); |
|
436 | 436 | } |
437 | 437 | |
438 | 438 | return $affectedRows; |
@@ -102,13 +102,13 @@ discard block |
||
102 | 102 | $relationForeignKey = null, |
103 | 103 | $referenceModel = null |
104 | 104 | ) { |
105 | - $this->pivotModel =& $pivotModel; |
|
105 | + $this->pivotModel = & $pivotModel; |
|
106 | 106 | $this->pivotTable = $pivotModel->table; |
107 | 107 | $this->pivotForeignKey = $pivotForeignKey; |
108 | 108 | |
109 | 109 | // Map Relation Model |
110 | 110 | $this->mapRelationModel($relationModel); |
111 | - $this->relationForeignKey = $this->relationTable . '.' . $relationForeignKey; |
|
111 | + $this->relationForeignKey = $this->relationTable.'.'.$relationForeignKey; |
|
112 | 112 | |
113 | 113 | // Map Reference Model |
114 | 114 | $this->mapReferenceModel($referenceModel); |
@@ -150,14 +150,14 @@ discard block |
||
150 | 150 | if ($referenceModel instanceof Model) { |
151 | 151 | $this->referenceModel = $referenceModel; |
152 | 152 | $this->referenceTable = $referenceModel->table; |
153 | - $this->referencePrimaryKey = $this->referenceModel->table . '.' . $this->referenceModel->primaryKey; |
|
153 | + $this->referencePrimaryKey = $this->referenceModel->table.'.'.$this->referenceModel->primaryKey; |
|
154 | 154 | } elseif (class_exists($referenceModel)) { |
155 | 155 | $this->referenceModel = new $referenceModel(); |
156 | 156 | $this->referenceTable = $this->referenceModel->table; |
157 | - $this->referencePrimaryKey = $this->referenceModel->table . '.' . $this->referenceModel->primaryKey; |
|
157 | + $this->referencePrimaryKey = $this->referenceModel->table.'.'.$this->referenceModel->primaryKey; |
|
158 | 158 | } else { |
159 | 159 | $this->referenceTable = $referenceModel; |
160 | - $this->referencePrimaryKey = $this->referenceModel->table . '.' . 'id'; |
|
160 | + $this->referencePrimaryKey = $this->referenceModel->table.'.'.'id'; |
|
161 | 161 | } |
162 | 162 | } |
163 | 163 | } |
164 | 164 | \ No newline at end of file |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $referencePrimaryKey = null |
86 | 86 | ) { |
87 | 87 | // Map Relation Model |
88 | - $this->relationModel =& $relationModel; |
|
88 | + $this->relationModel = & $relationModel; |
|
89 | 89 | |
90 | 90 | // Map Relation Table |
91 | 91 | $this->relationTable = $relationModel->table; |
@@ -139,6 +139,6 @@ discard block |
||
139 | 139 | 'tb_', |
140 | 140 | ]; |
141 | 141 | |
142 | - return $this->referencePrimaryKey . '_' . str_replace($tablePrefixes, '', $this->referenceTable); |
|
142 | + return $this->referencePrimaryKey.'_'.str_replace($tablePrefixes, '', $this->referenceTable); |
|
143 | 143 | } |
144 | 144 | } |
145 | 145 | \ No newline at end of file |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $referencePrimaryKey = null |
86 | 86 | ) { |
87 | 87 | // Map Reference Model |
88 | - $this->referenceModel =& $referenceModel; |
|
88 | + $this->referenceModel = & $referenceModel; |
|
89 | 89 | |
90 | 90 | // Map Reference Table |
91 | 91 | $this->referenceTable = $referenceModel->table; |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $this->mapRelationModel($relationModel); |
98 | 98 | |
99 | 99 | // Map Relation Foreign Key |
100 | - $this->relationForeignKey = $this->relationTable . '.' . (isset($relationForeignKey) ? $relationForeignKey |
|
100 | + $this->relationForeignKey = $this->relationTable.'.'.(isset($relationForeignKey) ? $relationForeignKey |
|
101 | 101 | : $this->mapRelationForeignKey()); |
102 | 102 | } |
103 | 103 | |
@@ -139,6 +139,6 @@ discard block |
||
139 | 139 | 'tb_', |
140 | 140 | ]; |
141 | 141 | |
142 | - return $this->referencePrimaryKey . '_' . str_replace($tablePrefixes, '', $this->referenceTable); |
|
142 | + return $this->referencePrimaryKey.'_'.str_replace($tablePrefixes, '', $this->referenceTable); |
|
143 | 143 | } |
144 | 144 | } |
145 | 145 | \ No newline at end of file |
@@ -106,14 +106,14 @@ discard block |
||
106 | 106 | $this->mapReferenceModel($referenceModel); |
107 | 107 | |
108 | 108 | // Map Intermediate Table |
109 | - $this->pivotTable = $this->relationTable . '_' . $this->referenceTable; |
|
109 | + $this->pivotTable = $this->relationTable.'_'.$this->referenceTable; |
|
110 | 110 | |
111 | 111 | if (isset($pivotTable)) { |
112 | 112 | $this->pivotTable = $pivotTable; |
113 | 113 | } |
114 | 114 | |
115 | - $this->pivotRelationKey = $this->pivotTable . '.' . $this->pivotRelationKey; |
|
116 | - $this->pivotReferenceKey = $this->pivotTable . '.' . $this->pivotReferenceKey; |
|
115 | + $this->pivotRelationKey = $this->pivotTable.'.'.$this->pivotRelationKey; |
|
116 | + $this->pivotReferenceKey = $this->pivotTable.'.'.$this->pivotReferenceKey; |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | // ------------------------------------------------------------------------ |
@@ -131,16 +131,16 @@ discard block |
||
131 | 131 | $this->relationModel = $relationModel; |
132 | 132 | $this->relationTable = $this->relationModel->table; |
133 | 133 | $this->relationPrimaryKey = $this->relationModel->primaryKey; |
134 | - $this->pivotRelationKey = $this->relationModel->primaryKey . '_' . $this->relationModel->table; |
|
134 | + $this->pivotRelationKey = $this->relationModel->primaryKey.'_'.$this->relationModel->table; |
|
135 | 135 | } elseif (class_exists($relationModel)) { |
136 | 136 | $this->relationModel = new $relationModel(); |
137 | 137 | $this->relationTable = $this->relationModel->table; |
138 | - $this->relationPrimaryKey = $this->relationModel->table . '.' . $this->relationModel->primaryKey; |
|
139 | - $this->pivotRelationKey = $this->relationModel->primaryKey . '_' . $this->relationModel->table; |
|
138 | + $this->relationPrimaryKey = $this->relationModel->table.'.'.$this->relationModel->primaryKey; |
|
139 | + $this->pivotRelationKey = $this->relationModel->primaryKey.'_'.$this->relationModel->table; |
|
140 | 140 | } else { |
141 | 141 | $this->relationTable = $relationModel; |
142 | - $this->relationPrimaryKey = $this->relationTable . '.id'; |
|
143 | - $this->pivotRelationKey = $this->relationTable . '.id_' . $this->relationTable; |
|
142 | + $this->relationPrimaryKey = $this->relationTable.'.id'; |
|
143 | + $this->pivotRelationKey = $this->relationTable.'.id_'.$this->relationTable; |
|
144 | 144 | } |
145 | 145 | } |
146 | 146 | |
@@ -158,16 +158,16 @@ discard block |
||
158 | 158 | if ($referenceModel instanceof Model) { |
159 | 159 | $this->referenceTable = $referenceModel->table; |
160 | 160 | $this->referencePrimaryKey = $referenceModel->primaryKey; |
161 | - $this->pivotReferenceKey = $referenceModel->primaryKey . '_' . $this->referenceTable; |
|
161 | + $this->pivotReferenceKey = $referenceModel->primaryKey.'_'.$this->referenceTable; |
|
162 | 162 | } elseif (class_exists($referenceModel)) { |
163 | 163 | $referenceModel = new $referenceModel(); |
164 | 164 | $this->referenceTable = $referenceModel->table; |
165 | - $this->referencePrimaryKey = $this->referenceTable . '.' . $referenceModel->primaryKey; |
|
166 | - $this->pivotReferenceKey = $referenceModel->primaryKey . '_' . $this->referenceTable; |
|
165 | + $this->referencePrimaryKey = $this->referenceTable.'.'.$referenceModel->primaryKey; |
|
166 | + $this->pivotReferenceKey = $referenceModel->primaryKey.'_'.$this->referenceTable; |
|
167 | 167 | } else { |
168 | 168 | $this->referenceTable = $referenceModel; |
169 | - $this->referencePrimaryKey = $this->referenceTable . '.id'; |
|
170 | - $this->pivotReferenceKey = 'id_' . $this->referenceTable; |
|
169 | + $this->referencePrimaryKey = $this->referenceTable.'.id'; |
|
170 | + $this->pivotReferenceKey = 'id_'.$this->referenceTable; |
|
171 | 171 | } |
172 | 172 | } |
173 | 173 | } |
174 | 174 | \ No newline at end of file |