Skip to content

Commit 5374366

Browse files
committed
Fix style issues
1 parent 3a0f622 commit 5374366

File tree

9 files changed

+31
-16
lines changed

9 files changed

+31
-16
lines changed

application/clicommands/Icinga2Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public function configAction()
179179
*
180180
* @return array[]
181181
*/
182-
protected function cartesianProduct(array & $input)
182+
protected function cartesianProduct(array &$input)
183183
{
184184
$results = [[]];
185185

application/controllers/GraphController.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ public function serviceAction()
9999
/**
100100
* Do all monitored object type independend actions
101101
*
102-
* @param MonitoredObject $monitoredObject The monitored object to render the graphs of
103-
* @param string $checkCommand The check command of the monitored object we supply an image for
104-
* @param string|null $obscuredCheckCommand The "real" check command (if any) of the monitored object
105-
* we display graphs for
102+
* @param MonitoredObject $monitoredObject The monitored object to render the graphs of
103+
* @param string $checkCommand The check command of the monitored object we supply an image for
104+
* @param string|null $obscuredCheckCommand The "real" check command (if any) of the monitored object
105+
* we display graphs for
106106
*/
107107
protected function supplyImage(MonitoredObject $monitoredObject, $checkCommand, $obscuredCheckCommand)
108108
{
@@ -139,6 +139,7 @@ protected function supplyImage(MonitoredObject $monitoredObject, $checkCommand,
139139
->setShowLegend((bool) $this->graphParams['legend'])
140140
->serveImage($this->getResponse());
141141

142+
// not falling through, serveImage exits
142143
default:
143144
throw new HttpBadRequestException('%s', $this->translate(
144145
'Graphite Web yields more than one metric for the given filter.'

application/forms/TimeRangePicker/CustomForm.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ protected function groupDateTime($part)
130130
$decorators = [];
131131
foreach ($elementDecorators as $key => $decorator) {
132132
if ($key === 'Zend_Form_Decorator_ViewHelper') {
133-
$decorators['Zend_Form_Decorator_FormElements'] = $group->getDecorators()['Zend_Form_Decorator_FormElements'];
133+
$decorators['Zend_Form_Decorator_FormElements'] =
134+
$group->getDecorators()['Zend_Form_Decorator_FormElements'];
134135
} else {
135136
$decorators[$key] = (new Proxy())->setActualDecorator($decorator->setElement($element));
136137
}

library/Graphite/Graphing/GraphiteWebClient.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ public function request(Url $url, $method = 'GET', array $headers = [], $body =
9292
*
9393
* @return string
9494
*/
95-
public function escapeMetricPath($metricPath) {
95+
public function escapeMetricPath($metricPath)
96+
{
9697
return preg_replace_callback(
9798
'/[[\]]/',
9899
function (array $matches) {

library/Graphite/Graphing/Template.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,12 @@ public function __construct()
7070
*
7171
* @return Chart[]
7272
*/
73-
public function getCharts(MetricsDataSource $dataSource, MonitoredObject $monitoredObject, array $filter, array & $excludeMetrics = [])
74-
{
73+
public function getCharts(
74+
MetricsDataSource $dataSource,
75+
MonitoredObject $monitoredObject,
76+
array $filter,
77+
array &$excludeMetrics = []
78+
) {
7579
$metrics = [];
7680
$metricsUsed = 0;
7781
$metricsExcluded = 0;
@@ -167,8 +171,12 @@ public function getCharts(MetricsDataSource $dataSource, MonitoredObject $monito
167171
* @param string[][] $metricsCombinations
168172
* @param string[] $currentCombination
169173
*/
170-
protected function combineMetrics(array & $metrics, array & $possibleCombinations, array & $metricsCombinations, array $currentCombination = [])
171-
{
174+
protected function combineMetrics(
175+
array &$metrics,
176+
array &$possibleCombinations,
177+
array &$metricsCombinations,
178+
array $currentCombination = []
179+
) {
172180
if (empty($currentCombination)) {
173181
foreach ($metrics as $curveName => & $curveMetrics) {
174182
foreach ($curveMetrics as $metric => & $_) {

library/Graphite/Graphing/Templates.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function loadIni($path)
144144
$templateName,
145145
$path,
146146
implode(', ', array_map(
147-
function($option) {
147+
function ($option) {
148148
return "\"graph.$option\"";
149149
},
150150
$standalone

library/Graphite/Util/InternalProcessTracker.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
namespace Icinga\Module\Graphite\Util;
4+
45
use Icinga\Authentication\Auth;
56
use Icinga\Security\SecurityException;
67

library/Graphite/Web/Widget/Graphs.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,10 @@ protected function getGraphsList()
241241
IPT::indent();
242242

243243
$charts = $template->getCharts(
244-
static::getMetricsDataSource(), $this->monitoredObject, [], $excludeMetrics
244+
static::getMetricsDataSource(),
245+
$this->monitoredObject,
246+
[],
247+
$excludeMetrics
245248
);
246249

247250
if (! empty($charts)) {
@@ -295,8 +298,8 @@ protected function getGraphsList()
295298

296299
$img = '<img id="graphiteImg-'
297300
. md5((string) $imageUrl->without('cachebuster'))
298-
. "\" src=\"$src\" data-actualimageurl=\"$imageUrl\" class=\"detach graphiteImg\" alt=\"\""
299-
. " width=\"$this->width\" height=\"$this->height\""
301+
. "\" src=\"$src\" data-actualimageurl=\"$imageUrl\" class=\"detach graphiteImg\""
302+
. " alt=\"\" width=\"$this->width\" height=\"$this->height\""
300303
. " style=\"min-width: {$this->width}px; min-height: {$this->height}px;\">";
301304
}
302305

library/Graphite/Web/Widget/Graphs/Service.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ protected function filterImageUrl(Url $url)
3535
{
3636
return $url
3737
->setParam('host.name', $this->monitoredObject->getHost()->getName())
38-
->setParam('service.name', $this->monitoredObject->getName());
38+
->setParam('service.name', $this->monitoredObject->getName());
3939
}
4040

4141
protected function getMonitoredObjectIdentifier()

0 commit comments

Comments
 (0)