@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | /** |
38 | 38 | * @param AggregationSource $source |
39 | 39 | * @param Statistics $statistics |
40 | - * @return mixed |
|
40 | + * @return string |
|
41 | 41 | */ |
42 | 42 | public function indexAction(AggregationSource $source, Statistics $statistics) |
43 | 43 | { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | * @param string $id |
56 | 56 | * @param AggregationService $aggregationService |
57 | 57 | * @param SnapshotSource $snapshotSource |
58 | - * @return mixed |
|
58 | + * @return string |
|
59 | 59 | */ |
60 | 60 | public function editAction( |
61 | 61 | $id, |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | /** |
116 | 116 | * @param string $id |
117 | 117 | * @param SnapshotSource $source |
118 | - * @return mixed |
|
118 | + * @return string |
|
119 | 119 | */ |
120 | 120 | public function snapshotAction($id, SnapshotSource $source) |
121 | 121 | { |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | return [ |
184 | 184 | 'status' => 200, |
185 | 185 | 'message' => $this->say('Snapshot deleted.'), |
186 | - 'action' => ['redirect' => $uri] |
|
186 | + 'action' => [ 'redirect' => $uri ] |
|
187 | 187 | ]; |
188 | 188 | } else { |
189 | 189 | return $this->responses->redirect($uri); |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | return [ |
231 | 231 | 'status' => 200, |
232 | 232 | 'message' => $this->say('Snapshots deleted.'), |
233 | - 'action' => ['redirect' => $uri] |
|
233 | + 'action' => [ 'redirect' => $uri ] |
|
234 | 234 | ]; |
235 | 235 | } else { |
236 | 236 | return $this->responses->redirect($uri); |
@@ -273,12 +273,12 @@ discard block |
||
273 | 273 | |
274 | 274 | $snapshotSource->delete($snapshot); |
275 | 275 | |
276 | - $uri = $this->vault->uri('snapshots:edit', ['id' => $aggregation->id]); |
|
276 | + $uri = $this->vault->uri('snapshots:edit', [ 'id' => $aggregation->id ]); |
|
277 | 277 | if ($this->input->isAjax()) { |
278 | 278 | return [ |
279 | 279 | 'status' => 200, |
280 | 280 | 'message' => $this->say('Snapshot deleted.'), |
281 | - 'action' => ['redirect' => $uri] |
|
281 | + 'action' => [ 'redirect' => $uri ] |
|
282 | 282 | ]; |
283 | 283 | } else { |
284 | 284 | return $this->responses->redirect($uri); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | /** |
20 | 20 | * @param $exception_hash |
21 | - * @return null|Aggregation |
|
21 | + * @return null|\Spiral\ORM\RecordInterface |
|
22 | 22 | */ |
23 | 23 | public function findByHash($exception_hash) |
24 | 24 | { |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | /** |
37 | 37 | * @param Snapshot $snapshot |
38 | - * @return null|\Spiral\ORM\RecordEntity |
|
38 | + * @return null|\Spiral\ORM\RecordInterface |
|
39 | 39 | */ |
40 | 40 | public function findBySnapshot(Snapshot $snapshot) |
41 | 41 | { |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
46 | - * @return null|Aggregation |
|
46 | + * @return null|\Spiral\ORM\RecordInterface |
|
47 | 47 | */ |
48 | 48 | public function findLast() |
49 | 49 | { |
@@ -30,7 +30,7 @@ |
||
30 | 30 | */ |
31 | 31 | public function findWithSnapshots() |
32 | 32 | { |
33 | - return $this->find()->where(['count_stored' => ['>=' => 1]]); |
|
33 | + return $this->find()->where([ 'count_stored' => [ '>=' => 1 ] ]); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
@@ -73,7 +73,7 @@ |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
76 | - * @param $string |
|
76 | + * @param string $string |
|
77 | 77 | * @return string |
78 | 78 | */ |
79 | 79 | private function hash($string) |
@@ -33,9 +33,9 @@ |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | /** |
36 | - * @param $hash |
|
37 | - * @param $teaser |
|
38 | - * @return null|Aggregation |
|
36 | + * @param string $hash |
|
37 | + * @param string $teaser |
|
38 | + * @return \Spiral\ORM\RecordEntity |
|
39 | 39 | */ |
40 | 40 | public function findOrCreateByHash($hash, $teaser) |
41 | 41 | { |
@@ -57,8 +57,8 @@ |
||
57 | 57 | * {@inheritdoc} |
58 | 58 | */ |
59 | 59 | protected $indexes = [ |
60 | - [self::UNIQUE, 'exception_hash'], |
|
61 | - [self::INDEX, 'exception_teaser'] |
|
60 | + [ self::UNIQUE, 'exception_hash' ], |
|
61 | + [ self::INDEX, 'exception_teaser' ] |
|
62 | 62 | ]; |
63 | 63 | |
64 | 64 | /** |
@@ -53,7 +53,7 @@ |
||
53 | 53 | ]; |
54 | 54 | |
55 | 55 | if (!empty($aggregation)) { |
56 | - $where['aggregation_id'] = $aggregation->id; |
|
56 | + $where[ 'aggregation_id' ] = $aggregation->id; |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | return $this->find($where); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | // 'aggregation_id' => 'bigint', |
41 | 41 | 'aggregation' => [ |
42 | 42 | self::BELONGS_TO => Aggregation::class, |
43 | - self::INVERSE => [self::HAS_MANY, 'snapshots'] |
|
43 | + self::INVERSE => [ self::HAS_MANY, 'snapshots' ] |
|
44 | 44 | ], |
45 | 45 | |
46 | 46 | //exception fields |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * {@inheritdoc} |
58 | 58 | */ |
59 | 59 | protected $indexes = [ |
60 | - [self::INDEX, 'exception_hash'] |
|
60 | + [ self::INDEX, 'exception_hash' ] |
|
61 | 61 | ]; |
62 | 62 | |
63 | 63 | /** |
@@ -17,13 +17,13 @@ discard block |
||
17 | 17 | <?php if ($snapshot->stored()) { ?> |
18 | 18 | <vault:uri target="snapshots:removeSnapshot" icon="delete" |
19 | 19 | class="btn red waves-effect waves-light" |
20 | - options="<?= ['id' => $snapshot->id] ?>"> |
|
20 | + options="<?= [ 'id' => $snapshot->id ] ?>"> |
|
21 | 21 | [[Remove]] |
22 | 22 | </vault:uri> |
23 | 23 | <?php } ?> |
24 | 24 | |
25 | 25 | <vault:uri target="snapshots:edit" class="btn-flat teal-text waves-effect" |
26 | - post-icon="trending_flat" options="<?= ['id' => $snapshot->aggregation_id] ?>"> |
|
26 | + post-icon="trending_flat" options="<?= [ 'id' => $snapshot->aggregation_id ] ?>"> |
|
27 | 27 | [[BACK]] |
28 | 28 | </vault:uri> |
29 | 29 | </define:actions> |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | break; |
48 | 48 | default: |
49 | 49 | ?> |
50 | - <iframe src="<?= vault()->uri('snapshots:iframe', ['id' => $snapshot->id]) ?>" |
|
50 | + <iframe src="<?= vault()->uri('snapshots:iframe', [ 'id' => $snapshot->id ]) ?>" |
|
51 | 51 | width="100%" height="100%" frameborder="0" scrolling="no" |
52 | 52 | onload="javascript:resizeIframe(this);"></iframe> |
53 | 53 | <?php } ?> |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | </vault:uri> |
15 | 15 | |
16 | 16 | <vault:uri target="snapshots:edit" icon="edit" class="btn teal waves-effect waves-light" |
17 | - options="<?= ['id' => $lastSnapshot->id] ?>"> |
|
17 | + options="<?= [ 'id' => $lastSnapshot->id ] ?>"> |
|
18 | 18 | [[View last]] |
19 | 19 | </vault:uri> |
20 | 20 | <?php } ?> |
@@ -55,13 +55,13 @@ discard block |
||
55 | 55 | </grid:cell> |
56 | 56 | |
57 | 57 | <grid:cell style="text-align:right"> |
58 | - <vault:uri target="snapshots:edit" icon="edit" options="<?= ['id' => $entity->id] ?>" |
|
58 | + <vault:uri target="snapshots:edit" icon="edit" options="<?= [ 'id' => $entity->id ] ?>" |
|
59 | 59 | class="btn-flat waves-effect"/> |
60 | 60 | </grid:cell> |
61 | 61 | <grid:cell style="text-align:right"> |
62 | 62 | <vault:uri target="snapshots:removeSnapshots" icon="delete" |
63 | 63 | class="btn red waves-effect waves-light" |
64 | - options="<?= ['id' => $entity->id] ?>"></vault:uri> |
|
64 | + options="<?= [ 'id' => $entity->id ] ?>"></vault:uri> |
|
65 | 65 | </grid:cell> |
66 | 66 | </vault:grid> |
67 | 67 | </define:content> |