@@ -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); |
@@ -100,10 +100,10 @@ |
||
| 100 | 100 | protected function createComponentFilterForm() |
| 101 | 101 | { |
| 102 | 102 | $form = $this->driver->formManager()->filterForm($this->translator, $this->columns, $this->filter, $this->sorting, $this->onPage); |
| 103 | - $form->doRedirect[] = function ($onPage, $filter, $sorting) { |
|
| 103 | + $form->doRedirect[] = function($onPage, $filter, $sorting) { |
|
| 104 | 104 | $this->redirect('Item:default', $this->driver->type(), $this->database, $this->type, $this->table, 1, $onPage, $filter, $sorting); |
| 105 | 105 | }; |
| 106 | - $form->doReset[] = function () { |
|
| 106 | + $form->doReset[] = function() { |
|
| 107 | 107 | $this->redirect('Item:default', $this->driver->type(), $this->database, $this->type, $this->table); |
| 108 | 108 | }; |
| 109 | 109 | return $form; |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | 'svg' => 'image/svg+xml', |
| 45 | 45 | 'otf' => 'application/x-font-opentype', |
| 46 | 46 | ]; |
| 47 | - $path = __DIR__ . '/../../www/' . $file; |
|
| 47 | + $path = __DIR__.'/../../www/'.$file; |
|
| 48 | 48 | $extension = pathinfo($path, PATHINFO_EXTENSION); |
| 49 | 49 | $contentType = isset($contentTypes[$extension]) ? $contentTypes[$extension] : 'text/plain'; |
| 50 | 50 | $httpResponse->setContentType($contentType); |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | return $message; |
| 51 | 51 | } |
| 52 | 52 | foreach ($params as $key => $value) { |
| 53 | - $message = str_replace('%' . $key . '%', $value, $message); |
|
| 53 | + $message = str_replace('%'.$key.'%', $value, $message); |
|
| 54 | 54 | } |
| 55 | 55 | return $message; |
| 56 | 56 | } |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | $databaseForm->addFieldsToForm($form); |
| 44 | 44 | $form->addSubmit('save', 'Save'); |
| 45 | 45 | $form->onSuccess[] = [$databaseForm, 'submit']; |
| 46 | - $form->onSuccess[] = function () { |
|
| 46 | + $form->onSuccess[] = function() { |
|
| 47 | 47 | $this->presenter->redirect('Database:default', $this->driver->type()); |
| 48 | 48 | }; |
| 49 | 49 | return $form; |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | $tableForm->addFieldsToForm($form); |
| 50 | 50 | $form->addSubmit('save', 'Save'); |
| 51 | 51 | $form->onSuccess[] = [$tableForm, 'submit']; |
| 52 | - $form->onSuccess[] = function () { |
|
| 52 | + $form->onSuccess[] = function() { |
|
| 53 | 53 | $this->presenter->redirect('Table:default', $this->driver->type(), $this->database); |
| 54 | 54 | }; |
| 55 | 55 | return $form; |
@@ -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']); |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | |
| 35 | 35 | public function name() |
| 36 | 36 | { |
| 37 | - return $this->type() . '.name'; |
|
| 37 | + return $this->type().'.name'; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | /** |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | return $count; |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - $stats = $this->connection->getExtendedStats('cachedump', (int)$table); |
|
| 67 | + $stats = $this->connection->getExtendedStats('cachedump', (int) $table); |
|
| 68 | 68 | $keys = isset($stats[$this->database]) ? $stats[$this->database] : []; |
| 69 | 69 | return count($keys); |
| 70 | 70 | } |