@@ -78,14 +78,14 @@ |
||
78 | 78 | 'POST_CONTROLLER', |
79 | 79 | 'POST_COMMANDER', |
80 | 80 | ])) { |
81 | - $this->closures[ $event ][] = $closure; |
|
81 | + $this->closures[$event][] = $closure; |
|
82 | 82 | } |
83 | 83 | } |
84 | 84 | |
85 | 85 | public function callEvent($event) |
86 | 86 | { |
87 | 87 | if (array_key_exists($event, $this->closures)) { |
88 | - foreach ($this->closures[ $event ] as $closure) { |
|
88 | + foreach ($this->closures[$event] as $closure) { |
|
89 | 89 | call_user_func($closure); |
90 | 90 | } |
91 | 91 | } |
@@ -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 |
@@ -170,16 +170,16 @@ discard block |
||
170 | 170 | $familyRelationships = []; |
171 | 171 | |
172 | 172 | foreach ([ |
173 | - 'PARENT', |
|
174 | - 'CHILD', |
|
175 | - 'SPOUSE', |
|
176 | - 'SIBLING', |
|
177 | - 'GRANDPARENTS', |
|
178 | - 'GRANDCHILD', |
|
179 | - 'PARENTS_SIBLING', |
|
180 | - 'SIBLINGS_CHILD', |
|
181 | - 'AUNTS_UNCLES_CHILD', |
|
182 | - ] as $relationship |
|
173 | + 'PARENT', |
|
174 | + 'CHILD', |
|
175 | + 'SPOUSE', |
|
176 | + 'SIBLING', |
|
177 | + 'GRANDPARENTS', |
|
178 | + 'GRANDCHILD', |
|
179 | + 'PARENTS_SIBLING', |
|
180 | + 'SIBLINGS_CHILD', |
|
181 | + 'AUNTS_UNCLES_CHILD', |
|
182 | + ] as $relationship |
|
183 | 183 | ) { |
184 | 184 | $familyRelationships[ $relationship ] = $this->language->getLine($relationship); |
185 | 185 | } |
@@ -192,12 +192,12 @@ discard block |
||
192 | 192 | $statuses = []; |
193 | 193 | |
194 | 194 | foreach ([ |
195 | - 'PUBLISH', |
|
196 | - 'UNPUBLISH', |
|
197 | - 'DRAFT', |
|
198 | - 'ARCHIVED', |
|
199 | - 'TRASH' |
|
200 | - ] as $status |
|
195 | + 'PUBLISH', |
|
196 | + 'UNPUBLISH', |
|
197 | + 'DRAFT', |
|
198 | + 'ARCHIVED', |
|
199 | + 'TRASH' |
|
200 | + ] as $status |
|
201 | 201 | ) { |
202 | 202 | $statuses[ $status ] = $this->language->getLine($status); |
203 | 203 | } |
@@ -210,10 +210,10 @@ discard block |
||
210 | 210 | $visibilities = []; |
211 | 211 | |
212 | 212 | foreach ([ |
213 | - 'PUBLIC', |
|
214 | - 'PRIVATE', |
|
215 | - 'MEMBER', |
|
216 | - ] as $visibility |
|
213 | + 'PUBLIC', |
|
214 | + 'PRIVATE', |
|
215 | + 'MEMBER', |
|
216 | + ] as $visibility |
|
217 | 217 | ) { |
218 | 218 | $visibilities[ $visibility ] = $this->language->getLine($visibility); |
219 | 219 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $religions = []; |
35 | 35 | |
36 | 36 | foreach (['ATHEIST', 'HINDU', 'BUDDHA', 'MOSLEM', 'CHRISTIAN', 'CATHOLIC', 'UNDEFINED'] as $religion) { |
37 | - $religions[ $religion ] = $this->language->getLine($religion); |
|
37 | + $religions[$religion] = $this->language->getLine($religion); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | return $religions; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $genders = []; |
46 | 46 | |
47 | 47 | foreach (['MALE', 'FEMALE', 'UNDEFINED'] as $gender) { |
48 | - $genders[ $gender ] = $this->language->getLine($gender); |
|
48 | + $genders[$gender] = $this->language->getLine($gender); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | return $genders; |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $maritals = []; |
57 | 57 | |
58 | 58 | foreach (['SINGLE', 'MARRIED', 'DIVORCED', 'UNDEFINED'] as $marital) { |
59 | - $maritals[ $marital ] = $this->language->getLine($marital); |
|
59 | + $maritals[$marital] = $this->language->getLine($marital); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | return $maritals; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $bloodTypes = []; |
68 | 68 | |
69 | 69 | foreach (['A', 'B', 'AB', 'O', 'UNDEFINED'] as $bloodType) { |
70 | - $bloodTypes[ $bloodType ] = $this->language->getLine($bloodType); |
|
70 | + $bloodTypes[$bloodType] = $this->language->getLine($bloodType); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | return $bloodTypes; |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | for ($i = $start; $i <= $end; $i++) { |
86 | 86 | $time = strtotime($year . 'W' . $week . $i); |
87 | - $days[ strtoupper(date('D', $time)) ] = $this->language->getLine( |
|
87 | + $days[strtoupper(date('D', $time))] = $this->language->getLine( |
|
88 | 88 | 'CAL_' . strtoupper(date($labelFormat, $time))); |
89 | 89 | } |
90 | 90 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | if ($leading) { |
100 | 100 | $date = strlen($date) == 1 ? '0' . $date : $date; |
101 | 101 | } |
102 | - $dates[ $date ] = $date; |
|
102 | + $dates[$date] = $date; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | return $dates; |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | if ($leading) { |
116 | 116 | $month = strlen($month) == 1 ? '0' . $month : $month; |
117 | 117 | } |
118 | - $months[ $month ] = $this->language->getLine(strtoupper('CAL_' . date('F', |
|
118 | + $months[$month] = $this->language->getLine(strtoupper('CAL_' . date('F', |
|
119 | 119 | strtotime('1-' . $month . '-2000')))); |
120 | 120 | } |
121 | 121 | |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $years = []; |
129 | 129 | |
130 | 130 | foreach (range($start, $end) as $year) { |
131 | - $years[ $year ] = $year; |
|
131 | + $years[$year] = $year; |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | return $years; |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $identities = []; |
140 | 140 | |
141 | 141 | foreach (['UNDEFINED', 'IDENTITY_CARD', 'STUDENT_CARD', 'DRIVER_LICENSE', 'PASSPORT'] as $identity) { |
142 | - $identities[ $identity ] = $this->language->getLine($identity); |
|
142 | + $identities[$identity] = $this->language->getLine($identity); |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | return $identities; |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | { |
150 | 150 | $sizes = []; |
151 | 151 | foreach (['XS', 'S', 'M', 'L', 'XL', 'XXL', 'XXXL'] as $size) { |
152 | - $sizes[ $size ] = $size; |
|
152 | + $sizes[$size] = $size; |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | return $sizes; |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | { |
160 | 160 | $boolean = []; |
161 | 161 | foreach (['YES', 'NO'] as $bool) { |
162 | - $boolean[ $bool ] = $this->language->getLine( 'BOOL_' . $bool); |
|
162 | + $boolean[$bool] = $this->language->getLine('BOOL_' . $bool); |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | return $boolean; |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | 'AUNTS_UNCLES_CHILD', |
182 | 182 | ] as $relationship |
183 | 183 | ) { |
184 | - $familyRelationships[ $relationship ] = $this->language->getLine($relationship); |
|
184 | + $familyRelationships[$relationship] = $this->language->getLine($relationship); |
|
185 | 185 | } |
186 | 186 | |
187 | 187 | return $familyRelationships; |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | 'TRASH' |
200 | 200 | ] as $status |
201 | 201 | ) { |
202 | - $statuses[ $status ] = $this->language->getLine($status); |
|
202 | + $statuses[$status] = $this->language->getLine($status); |
|
203 | 203 | } |
204 | 204 | |
205 | 205 | return $statuses; |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | 'MEMBER', |
216 | 216 | ] as $visibility |
217 | 217 | ) { |
218 | - $visibilities[ $visibility ] = $this->language->getLine($visibility); |
|
218 | + $visibilities[$visibility] = $this->language->getLine($visibility); |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | return $visibilities; |
@@ -225,8 +225,8 @@ discard block |
||
225 | 225 | { |
226 | 226 | $languages = []; |
227 | 227 | |
228 | - foreach($this->language->getRegistry() as $language) { |
|
229 | - $languages[ $language->getParameter() ] = $language->getProperties()->name; |
|
228 | + foreach ($this->language->getRegistry() as $language) { |
|
229 | + $languages[$language->getParameter()] = $language->getProperties()->name; |
|
230 | 230 | } |
231 | 231 | |
232 | 232 | return $languages; |
@@ -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; |
@@ -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; |
@@ -77,58 +77,58 @@ |
||
77 | 77 | { |
78 | 78 | $timestamp = $this->unixTimestamp === true ? strtotime(date('Y-m-d H:i:s')) : date('Y-m-d H:i:s'); |
79 | 79 | |
80 | - if ( ! isset($sets[ 'record_status' ])) { |
|
81 | - $sets[ 'record_status' ] = $this->recordStatus; |
|
80 | + if ( ! isset($sets['record_status'])) { |
|
81 | + $sets['record_status'] = $this->recordStatus; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | if (empty($this->primaryKeys)) { |
85 | 85 | $primaryKey = isset($this->primaryKey) ? $this->primaryKey : 'id'; |
86 | 86 | |
87 | - if (empty($sets[ $primaryKey ])) { |
|
88 | - if ( ! isset($sets[ 'record_create_user' ])) { |
|
89 | - $sets[ 'record_create_user' ] = $this->recordUser; |
|
87 | + if (empty($sets[$primaryKey])) { |
|
88 | + if ( ! isset($sets['record_create_user'])) { |
|
89 | + $sets['record_create_user'] = $this->recordUser; |
|
90 | 90 | } |
91 | 91 | |
92 | - if ( ! isset($sets[ 'record_create_timestamp' ])) { |
|
93 | - $sets[ 'record_create_timestamp' ] = $timestamp; |
|
92 | + if ( ! isset($sets['record_create_timestamp'])) { |
|
93 | + $sets['record_create_timestamp'] = $timestamp; |
|
94 | 94 | } elseif ($this->unixTimestamp) { |
95 | - $sets[ 'record_create_timestamp' ] = strtotime($sets[ 'record_create_timestamp' ]); |
|
95 | + $sets['record_create_timestamp'] = strtotime($sets['record_create_timestamp']); |
|
96 | 96 | } |
97 | 97 | } |
98 | 98 | } else { |
99 | 99 | foreach ($this->primaryKeys as $primaryKey) { |
100 | - if (empty($sets[ $primaryKey ])) { |
|
101 | - if ( ! isset($sets[ 'record_create_user' ])) { |
|
102 | - $sets[ 'record_create_user' ] = $this->recordUser; |
|
100 | + if (empty($sets[$primaryKey])) { |
|
101 | + if ( ! isset($sets['record_create_user'])) { |
|
102 | + $sets['record_create_user'] = $this->recordUser; |
|
103 | 103 | } |
104 | 104 | |
105 | - if ( ! isset($sets[ 'record_create_timestamp' ])) { |
|
106 | - $sets[ 'record_create_timestamp' ] = $timestamp; |
|
105 | + if ( ! isset($sets['record_create_timestamp'])) { |
|
106 | + $sets['record_create_timestamp'] = $timestamp; |
|
107 | 107 | } elseif ($this->unixTimestamp) { |
108 | - $sets[ 'record_create_timestamp' ] = strtotime($sets[ 'record_create_timestamp' ]); |
|
108 | + $sets['record_create_timestamp'] = strtotime($sets['record_create_timestamp']); |
|
109 | 109 | } |
110 | 110 | } |
111 | 111 | } |
112 | 112 | } |
113 | 113 | |
114 | - $sets[ 'record_update_user' ] = $this->recordUser; |
|
114 | + $sets['record_update_user'] = $this->recordUser; |
|
115 | 115 | |
116 | - if ( ! isset($sets[ 'record_update_timestamp' ])) { |
|
117 | - $sets[ 'record_update_timestamp' ] = $timestamp; |
|
116 | + if ( ! isset($sets['record_update_timestamp'])) { |
|
117 | + $sets['record_update_timestamp'] = $timestamp; |
|
118 | 118 | } elseif ($this->unixTimestamp) { |
119 | - $sets[ 'record_update_timestamp' ] = strtotime($sets[ 'record_update_timestamp' ]); |
|
119 | + $sets['record_update_timestamp'] = strtotime($sets['record_update_timestamp']); |
|
120 | 120 | } |
121 | 121 | } |
122 | 122 | |
123 | 123 | protected function updateRecordSets(array &$sets) |
124 | 124 | { |
125 | - $sets[ 'record_status' ] = $this->recordStatus; |
|
126 | - $sets[ 'record_update_user' ] = $this->recordUser; |
|
125 | + $sets['record_status'] = $this->recordStatus; |
|
126 | + $sets['record_update_user'] = $this->recordUser; |
|
127 | 127 | |
128 | 128 | $timestamp = $this->unixTimestamp === true ? strtotime(date('Y-m-d H:i:s')) : date('Y-m-d H:i:s'); |
129 | 129 | |
130 | - if ( ! isset($sets[ 'record_update_timestamp' ])) { |
|
131 | - $sets[ 'record_update_timestamp' ] = $timestamp; |
|
130 | + if ( ! isset($sets['record_update_timestamp'])) { |
|
131 | + $sets['record_update_timestamp'] = $timestamp; |
|
132 | 132 | } |
133 | 133 | } |
134 | 134 |
@@ -30,7 +30,7 @@ |
||
30 | 30 | $referenceModel, |
31 | 31 | $foreignKey = null |
32 | 32 | ) { |
33 | - $this->currentModel =& $currentModel; |
|
33 | + $this->currentModel = & $currentModel; |
|
34 | 34 | $this->currentTable = $currentModel->table; |
35 | 35 | $this->currentPrimaryKey = $currentModel->primaryKey; |
36 | 36 |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $intermediaryReferenceForeignKey = null |
41 | 41 | ) { |
42 | 42 | |
43 | - $this->currentModel =& $currentModel; |
|
43 | + $this->currentModel = & $currentModel; |
|
44 | 44 | $this->currentTable = $currentModel->table; |
45 | 45 | $this->currentPrimaryKey = $currentModel->primaryKey; |
46 | 46 |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $ormResult = new \SplFixedArray($result->count()); |
46 | 46 | |
47 | 47 | foreach ($result as $key => $row) { |
48 | - $ormResult[ $key ] = new Result\Row($row, $model); |
|
48 | + $ormResult[$key] = new Result\Row($row, $model); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | parent::__construct($ormResult->toArray()); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $rows = empty($rows) ? 0 : $rows; |
75 | 75 | |
76 | 76 | $limit = input()->get('limit'); |
77 | - $limit = empty( $limit ) ? $this->info->limit : $limit; |
|
77 | + $limit = empty($limit) ? $this->info->limit : $limit; |
|
78 | 78 | |
79 | 79 | return new Pagination($rows, $limit); |
80 | 80 | } |