style: Fix minor styleguide issues for PHPCS
This commit is contained in:
parent
4bffcf1ba5
commit
c3ef50978a
|
@ -5,7 +5,6 @@ namespace Icinga\Exception\Http;
|
|||
|
||||
use Icinga\Exception\IcingaException;
|
||||
|
||||
|
||||
/**
|
||||
* Base class for HTTP exceptions
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
namespace Icinga\Exception\Http;
|
||||
|
||||
|
||||
interface HttpExceptionInterface
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -25,7 +25,7 @@ class Json
|
|||
{
|
||||
if (version_compare(phpversion(), '5.4.0', '<')) {
|
||||
$encoded = json_encode($value);
|
||||
} else if (version_compare(phpversion(), '5.5.0', '<')) {
|
||||
} elseif (version_compare(phpversion(), '5.5.0', '<')) {
|
||||
$encoded = json_encode($value, $options);
|
||||
} else {
|
||||
$encoded = json_encode($value, $options, $depth);
|
||||
|
|
|
@ -772,7 +772,8 @@ class Form extends Zend_Form
|
|||
$action = $action->without(array_keys($this->getElements()));
|
||||
}
|
||||
|
||||
// TODO(el): Re-evalute this necessity. JavaScript could use the container's URL if there's no action set.
|
||||
// TODO(el): Re-evalute this necessity.
|
||||
// JavaScript could use the container'sURL if there's no action set.
|
||||
// We MUST set an action as JS gets confused otherwise, if
|
||||
// this form is being displayed in an additional column
|
||||
$this->setAction($action);
|
||||
|
|
|
@ -74,14 +74,15 @@ class InlinePie extends AbstractWidget
|
|||
* @var string
|
||||
*/
|
||||
private $template =<<<'EOD'
|
||||
<span sparkType="pie" class="sparkline {class}" title="{title}" role="img" aria-label="{title}" sparkSliceColors="[{colors}]" values="{data}">
|
||||
</span>
|
||||
<span sparkType="pie" class="sparkline {class}" title="{title}" role="img" aria-label="{title}"
|
||||
sparkSliceColors="[{colors}]" values="{data}"></span>
|
||||
{noscript}
|
||||
EOD;
|
||||
|
||||
private $noscript =<<<'EOD'
|
||||
<noscript>
|
||||
<img width={size} height={size} class="inlinepie {class}" title="{title}" role="img" aria-label="{title}" src="{url}" data-icinga-colors="{colors}" data-icinga-values="{data}"/>
|
||||
<img width={size} height={size} class="inlinepie {class}" title="{title}" role="img" aria-label="{title}"
|
||||
src="{url}" data-icinga-colors="{colors}" data-icinga-values="{data}"/>
|
||||
</noscript>
|
||||
EOD;
|
||||
|
||||
|
|
|
@ -36,7 +36,9 @@ EOT;
|
|||
*/
|
||||
private $dropdownTpl = <<< 'EOT'
|
||||
<li class="dropdown-nav-item">
|
||||
<a href="#" class="dropdown-toggle" title="{TITLE}" aria-label="{TITLE}"><i aria-hidden="true" class="icon-down-open"></i></a>
|
||||
<a href="#" class="dropdown-toggle" title="{TITLE}" aria-label="{TITLE}">
|
||||
<i aria-hidden="true" class="icon-down-open"></i>
|
||||
</a>
|
||||
<ul class="nav">
|
||||
{TABS}
|
||||
</ul>
|
||||
|
|
|
@ -127,7 +127,6 @@ class UserDomainMigration
|
|||
rename($from, $to);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected function migrateNavigation()
|
||||
|
|
|
@ -369,7 +369,9 @@ class TransportConfigForm extends ConfigForm
|
|||
'order' => 0,
|
||||
'ignore' => true,
|
||||
'label' => $this->translate('Force Changes'),
|
||||
'description' => $this->translate('Check this box to enforce changes without connectivity validation')
|
||||
'description' => $this->translate(
|
||||
'Check this box to enforce changes without connectivity validation'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -204,7 +204,10 @@ class ApiCommandTransport implements CommandTransportInterface
|
|||
->setPayload($command->getData())
|
||||
->send();
|
||||
} catch (JsonDecodeException $e) {
|
||||
throw new CommandTransportException('Got invalid JSON response from the Icinga 2 API: %s', $e->getMessage());
|
||||
throw new CommandTransportException(
|
||||
'Got invalid JSON response from the Icinga 2 API: %s',
|
||||
$e->getMessage()
|
||||
);
|
||||
}
|
||||
|
||||
if (isset($response['error'])) {
|
||||
|
@ -256,9 +259,15 @@ class ApiCommandTransport implements CommandTransportInterface
|
|||
try {
|
||||
$response = $request->send();
|
||||
} catch (CurlException $e) {
|
||||
throw new CommandTransportException('Couldn\'t connect to the Icinga 2 API: %s', $e->getMessage());
|
||||
throw new CommandTransportException(
|
||||
'Couldn\'t connect to the Icinga 2 API: %s',
|
||||
$e->getMessage()
|
||||
);
|
||||
} catch (JsonDecodeException $e) {
|
||||
throw new CommandTransportException('Got invalid JSON response from the Icinga 2 API: %s', $e->getMessage());
|
||||
throw new CommandTransportException(
|
||||
'Got invalid JSON response from the Icinga 2 API: %s',
|
||||
$e->getMessage()
|
||||
);
|
||||
}
|
||||
|
||||
if (isset($response['error'])) {
|
||||
|
|
|
@ -96,7 +96,8 @@ class ConfigCommand extends Command
|
|||
*
|
||||
* --path=<urlpath> The URL path to Icinga Web 2 [/icingaweb2]
|
||||
*
|
||||
* --root|--document-root=<directory> The directory from which the webserver will serve files [/path/to/icingaweb2/public]
|
||||
* --root|--document-root=<directory> The directory from which the webserver will serve files
|
||||
* [/path/to/icingaweb2/public]
|
||||
*
|
||||
* --config=<directory> Path to Icinga Web 2's configuration files [/etc/icingaweb2]
|
||||
*
|
||||
|
@ -106,9 +107,13 @@ class ConfigCommand extends Command
|
|||
*
|
||||
* icingacli setup config webserver apache
|
||||
*
|
||||
* icingacli setup config webserver apache --path=/icingaweb2 --document-root=/usr/share/icingaweb2/public --config=/etc/icingaweb2
|
||||
* icingacli setup config webserver apache \
|
||||
* --path=/icingaweb2 \
|
||||
* --document-root=/usr/share/icingaweb2/public \
|
||||
* --config=/etc/icingaweb2
|
||||
*
|
||||
* icingacli setup config webserver apache --file=/etc/apache2/conf.d/icingaweb2.conf
|
||||
* icingacli setup config webserver apache \
|
||||
* --file=/etc/apache2/conf.d/icingaweb2.conf
|
||||
*
|
||||
* icingacli setup config webserver nginx
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue