@@ -23,7 +23,7 @@ |
||
23 | 23 | /** |
24 | 24 | * Command line options |
25 | 25 | * @param string $actionID |
26 | - * @return array |
|
26 | + * @return string[] |
|
27 | 27 | */ |
28 | 28 | public function options($actionID) |
29 | 29 | { |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace app\commands; |
4 | 4 | |
5 | -use Exception; |
|
6 | -use yii\console\Controller; |
|
5 | +use Exception; |
|
6 | +use yii\console\Controller; |
|
7 | 7 | use Yii; |
8 | 8 | |
9 | 9 | final class WorkerController extends Controller |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | namespace app\commands; |
4 | 4 |
@@ -2,10 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace app\components; |
4 | 4 | |
5 | -use Redis; |
|
6 | -use RPQ\Client; |
|
5 | +use Redis; |
|
6 | +use RPQ\Client; |
|
7 | 7 | use yii\base\BaseObject; |
8 | -use Yii; |
|
9 | 8 | |
10 | 9 | final class RPQComponent extends BaseObject |
11 | 10 | { |
@@ -8,7 +8,7 @@ |
||
8 | 8 | 'id' => $yaml['app']['id'], |
9 | 9 | 'name' => $yaml['app']['name'], |
10 | 10 | 'basePath' => dirname(__DIR__), |
11 | - 'bootstrap' => [ 'log' ], |
|
11 | + 'bootstrap' => ['log'], |
|
12 | 12 | 'language' => 'en-US', |
13 | 13 | 'sourceLanguage' => 'en-US', |
14 | 14 | 'components' => [ |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | 'transport' => $this->transport |
54 | 54 | ]); |
55 | 55 | |
56 | - $this->client->on(Client::EVENT_BEFORE_SEND, function (RequestEvent $e) { |
|
56 | + $this->client->on(Client::EVENT_BEFORE_SEND, function(RequestEvent $e) { |
|
57 | 57 | Yii::info([ |
58 | 58 | 'message' => sprintf('Sending HTTP request [%s] %s', $e->request->getMethod(), $e->request->getUrl()), |
59 | 59 | 'data' => [ |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | ], 'httpclient'); |
66 | 66 | }); |
67 | 67 | |
68 | - $this->client->on(Client::EVENT_AFTER_SEND, function (RequestEvent $e) { |
|
68 | + $this->client->on(Client::EVENT_AFTER_SEND, function(RequestEvent $e) { |
|
69 | 69 | Yii::info([ |
70 | 70 | 'message' => sprintf('Recieved HTTP response HTTP [%s] | [%s] %s', $e->response->getStatusCode(), $e->request->getMethod(), $e->request->getUrl()), |
71 | 71 | 'data' => [ |
@@ -63,7 +63,7 @@ |
||
63 | 63 | if (!is_string($text)) { |
64 | 64 | // exceptions may not be serializable if in the call stack somewhere is a Closure |
65 | 65 | if ($text instanceof \Throwable || $text instanceof \Exception) { |
66 | - $text = (string)$text; |
|
66 | + $text = (string) $text; |
|
67 | 67 | } else if (\is_array($text)) { |
68 | 68 | $ctx = $text; |
69 | 69 | if (isset($ctx['message'])) { |