@@ -16,6 +16,9 @@  | 
                                                    ||
| 16 | 16 | |
| 17 | 17 | private $item;  | 
                                                        
| 18 | 18 | |
| 19 | + /**  | 
                                                        |
| 20 | + * @param string|null $driver  | 
                                                        |
| 21 | + */  | 
                                                        |
| 19 | 22 | public function __construct($driver, $database, $type, $table, $item)  | 
                                                        
| 20 | 23 |      { | 
                                                        
| 21 | 24 | parent::__construct();  | 
                                                        
@@ -33,7 +33,7 @@  | 
                                                    ||
| 33 | 33 | $this->template->type = $this->type;  | 
                                                        
| 34 | 34 | $this->template->table = $this->table;  | 
                                                        
| 35 | 35 | $this->template->item = $this->item;  | 
                                                        
| 36 | - $this->template->setFile(__DIR__ . '/default.latte');  | 
                                                        |
| 36 | + $this->template->setFile(__DIR__.'/default.latte');  | 
                                                        |
| 37 | 37 | $this->template->render();  | 
                                                        
| 38 | 38 | }  | 
                                                        
| 39 | 39 | }  | 
                                                        
@@ -102,6 +102,9 @@ discard block  | 
                                                    ||
| 102 | 102 | }  | 
                                                        
| 103 | 103 | }  | 
                                                        
| 104 | 104 | |
| 105 | + /**  | 
                                                        |
| 106 | + * @param Form $form  | 
                                                        |
| 107 | + */  | 
                                                        |
| 105 | 108 | private function addSortingFields($form)  | 
                                                        
| 106 | 109 |      { | 
                                                        
| 107 | 110 | $sortingItems = [];  | 
                                                        
@@ -128,6 +131,9 @@ discard block  | 
                                                    ||
| 128 | 131 | return $sortingContainer;  | 
                                                        
| 129 | 132 | }  | 
                                                        
| 130 | 133 | |
| 134 | + /**  | 
                                                        |
| 135 | + * @param Form $form  | 
                                                        |
| 136 | + */  | 
                                                        |
| 131 | 137 | private function addFilterFields($form)  | 
                                                        
| 132 | 138 |      { | 
                                                        
| 133 | 139 |          $filterContainer = $form->addContainer('filter'); | 
                                                        
@@ -47,7 +47,7 @@ discard block  | 
                                                    ||
| 47 | 47 | $this->template->filter = $this->filter;  | 
                                                        
| 48 | 48 | $this->template->sorting = $this->sorting;  | 
                                                        
| 49 | 49 | $this->template->limit = $this->onPage != self::DEFAULT_ON_PAGE;  | 
                                                        
| 50 | - $this->template->setFile(__DIR__ . '/filter_form.latte');  | 
                                                        |
| 50 | + $this->template->setFile(__DIR__.'/filter_form.latte');  | 
                                                        |
| 51 | 51 | $this->template->render();  | 
                                                        
| 52 | 52 | }  | 
                                                        
| 53 | 53 | |
@@ -139,7 +139,7 @@ discard block  | 
                                                    ||
| 139 | 139 | }  | 
                                                        
| 140 | 140 | $filterItems[$column->getKey()] = $column->getTitle();  | 
                                                        
| 141 | 141 |              foreach ($column->getFilters() as $filter) { | 
                                                        
| 142 | - $operators[$filter] = 'core.filter.' . $filter;  | 
                                                        |
| 142 | + $operators[$filter] = 'core.filter.'.$filter;  | 
                                                        |
| 143 | 143 | }  | 
                                                        
| 144 | 144 | }  | 
                                                        
| 145 | 145 | |
@@ -24,6 +24,10 @@  | 
                                                    ||
| 24 | 24 | |
| 25 | 25 | private $locale;  | 
                                                        
| 26 | 26 | |
| 27 | + /**  | 
                                                        |
| 28 | + * @param string $driver  | 
                                                        |
| 29 | + * @param string $locale  | 
                                                        |
| 30 | + */  | 
                                                        |
| 27 | 31 | public function __construct(ITranslator $translator, DriverStorage $driverStorage, CredentialsStorageInterface $credentialsStorage, $driver, $locale)  | 
                                                        
| 28 | 32 |      { | 
                                                        
| 29 | 33 | parent::__construct();  | 
                                                        
@@ -53,9 +53,9 @@ discard block  | 
                                                    ||
| 53 | 53 | }  | 
                                                        
| 54 | 54 | }  | 
                                                        
| 55 | 55 |          $form->addSelect('driver', 'core.form.driver', $driversList) | 
                                                        
| 56 | -            ->setAttribute('onchange', 'window.location = "' . $this->presenter->link('this', ['driver' => null, 'locale' => $this->locale]) . ($this->locale == 'en' ? '?' : '&') . 'driver=" + this.value;') | 
                                                        |
| 56 | +            ->setAttribute('onchange', 'window.location = "'.$this->presenter->link('this', ['driver' => null, 'locale' => $this->locale]).($this->locale == 'en' ? '?' : '&').'driver=" + this.value;') | 
                                                        |
| 57 | 57 | ->setDefaultValue($this->driver)  | 
                                                        
| 58 | -            ->setOption('description', Html::el('span')->addText($this->translator->translate('core.missing_driver') . ' ')->addHtml(Html::el('a')->setAttribute('href', $this->presenter->link('Default:check'))->setAttribute('target', '_blank')->setText($this->translator->translate('core.check_why')))); | 
                                                        |
| 58 | +            ->setOption('description', Html::el('span')->addText($this->translator->translate('core.missing_driver').' ')->addHtml(Html::el('a')->setAttribute('href', $this->presenter->link('Default:check'))->setAttribute('target', '_blank')->setText($this->translator->translate('core.check_why')))); | 
                                                        |
| 59 | 59 |          if ($this->driver) { | 
                                                        
| 60 | 60 | $driver = $this->driverStorage->getDriver($this->driver);  | 
                                                        
| 61 | 61 | $credentialsForm = $driver->getCredentialsForm();  | 
                                                        
@@ -76,7 +76,7 @@ discard block  | 
                                                    ||
| 76 | 76 | |
| 77 | 77 | public function connect(Form $form, ArrayHash $values)  | 
                                                        
| 78 | 78 |      { | 
                                                        
| 79 | - $values = (array)$values;  | 
                                                        |
| 79 | + $values = (array) $values;  | 
                                                        |
| 80 | 80 | $this->credentialsStorage->setCredentials($this->driver, $values);  | 
                                                        
| 81 | 81 |          if (isset($values['database']) && $values['database']) { | 
                                                        
| 82 | 82 |              $this->presenter->redirect('Table:default', $this->driver, $values['database']); | 
                                                        
@@ -14,6 +14,9 @@  | 
                                                    ||
| 14 | 14 | |
| 15 | 15 | private $queue;  | 
                                                        
| 16 | 16 | |
| 17 | + /**  | 
                                                        |
| 18 | + * @param string $queue  | 
                                                        |
| 19 | + */  | 
                                                        |
| 17 | 20 | public function __construct(AMQPStreamConnection $connection, $queue)  | 
                                                        
| 18 | 21 |      { | 
                                                        
| 19 | 22 | $this->connection = $connection;  | 
                                                        
@@ -61,6 +61,10 @@ discard block  | 
                                                    ||
| 61 | 61 | return $queues;  | 
                                                        
| 62 | 62 | }  | 
                                                        
| 63 | 63 | |
| 64 | + /**  | 
                                                        |
| 65 | + * @param string $vhost  | 
                                                        |
| 66 | + * @param string $queue  | 
                                                        |
| 67 | + */  | 
                                                        |
| 64 | 68 | public function getMessages($vhost, $queue)  | 
                                                        
| 65 | 69 |      { | 
                                                        
| 66 | 70 | $count = 0;  | 
                                                        
@@ -84,6 +88,10 @@ discard block  | 
                                                    ||
| 84 | 88 | return $result;  | 
                                                        
| 85 | 89 | }  | 
                                                        
| 86 | 90 | |
| 91 | + /**  | 
                                                        |
| 92 | + * @param string $endpoint  | 
                                                        |
| 93 | + * @param string $params  | 
                                                        |
| 94 | + */  | 
                                                        |
| 87 | 95 | private function call($endpoint, $method = 'GET', $params = null)  | 
                                                        
| 88 | 96 |      { | 
                                                        
| 89 | 97 | $ch = curl_init($this->baseUrl . $endpoint);  | 
                                                        
@@ -10,7 +10,7 @@ discard block  | 
                                                    ||
| 10 | 10 | |
| 11 | 11 | public function __construct($host = 'localhost', $port = '15672', $user = 'guest', $password = 'guest')  | 
                                                        
| 12 | 12 |      { | 
                                                        
| 13 | - $this->baseUrl = 'http://' . $user . ':' . $password . '@' . $host . ':' . $port;  | 
                                                        |
| 13 | + $this->baseUrl = 'http://'.$user.':'.$password.'@'.$host.':'.$port;  | 
                                                        |
| 14 | 14 | }  | 
                                                        
| 15 | 15 | |
| 16 | 16 | /**  | 
                                                        
@@ -35,7 +35,7 @@ discard block  | 
                                                    ||
| 35 | 35 | $vhosts[] = $item;  | 
                                                        
| 36 | 36 | continue;  | 
                                                        
| 37 | 37 | }  | 
                                                        
| 38 | -            $permissions = $this->call('/api/vhosts/' . urlencode($item['name']) . '/permissions'); | 
                                                        |
| 38 | +            $permissions = $this->call('/api/vhosts/'.urlencode($item['name']).'/permissions'); | 
                                                        |
| 39 | 39 |              foreach ($permissions as $permission) { | 
                                                        
| 40 | 40 |                  if ($permission['user'] == $user) { | 
                                                        
| 41 | 41 | $vhosts[] = $item;  | 
                                                        
@@ -55,7 +55,7 @@ discard block  | 
                                                    ||
| 55 | 55 |      { | 
                                                        
| 56 | 56 | $endpoint = '/api/queues';  | 
                                                        
| 57 | 57 |          if ($vhost) { | 
                                                        
| 58 | - $endpoint .= '/' . urlencode($vhost);  | 
                                                        |
| 58 | + $endpoint .= '/'.urlencode($vhost);  | 
                                                        |
| 59 | 59 | }  | 
                                                        
| 60 | 60 | $queues = $this->call($endpoint);  | 
                                                        
| 61 | 61 | return $queues;  | 
                                                        
@@ -74,7 +74,7 @@ discard block  | 
                                                    ||
| 74 | 74 | return [];  | 
                                                        
| 75 | 75 | }  | 
                                                        
| 76 | 76 | |
| 77 | - $endpoint = '/api/queues/' . urlencode($vhost) . '/' . urlencode($queue) . '/get';  | 
                                                        |
| 77 | + $endpoint = '/api/queues/'.urlencode($vhost).'/'.urlencode($queue).'/get';  | 
                                                        |
| 78 | 78 | $params = [  | 
                                                        
| 79 | 79 | 'count' => $count,  | 
                                                        
| 80 | 80 | 'requeue' => true,  | 
                                                        
@@ -86,7 +86,7 @@ discard block  | 
                                                    ||
| 86 | 86 | |
| 87 | 87 | private function call($endpoint, $method = 'GET', $params = null)  | 
                                                        
| 88 | 88 |      { | 
                                                        
| 89 | - $ch = curl_init($this->baseUrl . $endpoint);  | 
                                                        |
| 89 | + $ch = curl_init($this->baseUrl.$endpoint);  | 
                                                        |
| 90 | 90 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);  | 
                                                        
| 91 | 91 | curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);  | 
                                                        
| 92 | 92 | curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);  | 
                                                        
@@ -99,7 +99,7 @@ discard block  | 
                                                    ||
| 99 | 99 |          if (!$response) { | 
                                                        
| 100 | 100 | return [];  | 
                                                        
| 101 | 101 | }  | 
                                                        
| 102 | - $result = json_decode((string)$response, true);  | 
                                                        |
| 102 | + $result = json_decode((string) $response, true);  | 
                                                        |
| 103 | 103 |          if (isset($result['error'])) { | 
                                                        
| 104 | 104 | throw new ConnectException($result['reason']);  | 
                                                        
| 105 | 105 | }  | 
                                                        
@@ -13,6 +13,9 @@  | 
                                                    ||
| 13 | 13 | |
| 14 | 14 | private $key;  | 
                                                        
| 15 | 15 | |
| 16 | + /**  | 
                                                        |
| 17 | + * @param string $key  | 
                                                        |
| 18 | + */  | 
                                                        |
| 16 | 19 | public function __construct(RedisProxy $connection, $key)  | 
                                                        
| 17 | 20 |      { | 
                                                        
| 18 | 21 | $this->connection = $connection;  | 
                                                        
@@ -15,6 +15,9 @@  | 
                                                    ||
| 15 | 15 | |
| 16 | 16 | private $key;  | 
                                                        
| 17 | 17 | |
| 18 | + /**  | 
                                                        |
| 19 | + * @param string $hash  | 
                                                        |
| 20 | + */  | 
                                                        |
| 18 | 21 | public function __construct(RedisProxy $connection, $hash, $key)  | 
                                                        
| 19 | 22 |      { | 
                                                        
| 20 | 23 | $this->connection = $connection;  | 
                                                        
@@ -15,6 +15,9 @@  | 
                                                    ||
| 15 | 15 | |
| 16 | 16 | private $member;  | 
                                                        
| 17 | 17 | |
| 18 | + /**  | 
                                                        |
| 19 | + * @param string $key  | 
                                                        |
| 20 | + */  | 
                                                        |
| 18 | 21 | public function __construct(RedisProxy $connection, $key, $member)  | 
                                                        
| 19 | 22 |      { | 
                                                        
| 20 | 23 | $this->connection = $connection;  | 
                                                        
@@ -17,7 +17,7 @@  | 
                                                    ||
| 17 | 17 | $this->template->driver = $actualDriver;  | 
                                                        
| 18 | 18 | $this->driver = $this->driverStorage->getDriver($actualDriver);  | 
                                                        
| 19 | 19 |          if (!$this->driver) { | 
                                                        
| 20 | -            throw new BadRequestException('Driver "' . $actualDriver . '" not found'); | 
                                                        |
| 20 | +            throw new BadRequestException('Driver "'.$actualDriver.'" not found'); | 
                                                        |
| 21 | 21 | }  | 
                                                        
| 22 | 22 | |
| 23 | 23 | $credentials = $this->credentialsStorage->getCredentials($actualDriver);  |