Skip to content

Commit 7cc74b6

Browse files
minor: fix code style according to php-cs (#285)
Co-authored-by: Christopher Georg <[email protected]>
1 parent 80d09e4 commit 7cc74b6

File tree

6 files changed

+8
-22
lines changed

6 files changed

+8
-22
lines changed

Controller/HealthCheckController.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ class HealthCheckController
1717
protected $template;
1818
protected $failureStatusCode;
1919

20-
/**
21-
* @param $template
22-
* @param $failureStatusCode
23-
*/
2420
public function __construct(RunnerManager $runnerManager, PathHelper $pathHelper, $template, $failureStatusCode)
2521
{
2622
$this->runnerManager = $runnerManager;
@@ -107,7 +103,7 @@ public function runAllChecksHttpStatusAction(Request $request): Response
107103

108104
return new Response(
109105
'',
110-
(ArrayReporter::STATUS_OK === $report->getGlobalStatus() ? 200 : $this->failureStatusCode)
106+
ArrayReporter::STATUS_OK === $report->getGlobalStatus() ? 200 : $this->failureStatusCode
111107
);
112108
}
113109

@@ -120,7 +116,7 @@ public function runSingleCheckHttpStatusAction($checkId, Request $request): Resp
120116

121117
return new Response(
122118
'',
123-
(ArrayReporter::STATUS_OK === $report->getGlobalStatus() ? 200 : $this->failureStatusCode)
119+
ArrayReporter::STATUS_OK === $report->getGlobalStatus() ? 200 : $this->failureStatusCode
124120
);
125121
}
126122

Helper/AbstractMailReporter.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Liip\MonitorBundle\Helper;
44

5-
use ArrayObject;
65
use Laminas\Diagnostics\Check\CheckInterface;
76
use Laminas\Diagnostics\Result\Collection as ResultsCollection;
87
use Laminas\Diagnostics\Result\ResultInterface;
@@ -44,7 +43,7 @@ public function __construct($recipients, $sender, $subject, $sendOnWarning = tru
4443
/**
4544
* @return void
4645
*/
47-
public function onStart(ArrayObject $checks, $runnerConfig)
46+
public function onStart(\ArrayObject $checks, $runnerConfig)
4847
{
4948
}
5049

Helper/ConsoleReporter.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ class ConsoleReporter implements ReporterInterface
2222
*/
2323
protected $output;
2424

25-
/**
26-
* @param OutputInterface $output
27-
*/
2825
public function __construct(OutputInterface $output = null)
2926
{
3027
if (null === $output) {

Helper/RawConsoleReporter.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ class RawConsoleReporter implements ReporterInterface
2222
*/
2323
protected $output;
2424

25-
/**
26-
* @param OutputInterface $output
27-
*/
2825
public function __construct(OutputInterface $output = null)
2926
{
3027
if (null === $output) {

Helper/SwiftMailerReporter.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
use Laminas\Diagnostics\Check\CheckInterface;
66
use Laminas\Diagnostics\Result\Collection as ResultsCollection;
77
use Laminas\Diagnostics\Result\ResultInterface;
8-
use Swift_Mailer;
9-
use Swift_Message;
108

119
/**
1210
* @author louis <[email protected]>
@@ -21,7 +19,7 @@ class SwiftMailerReporter extends AbstractMailReporter
2119
* @param string $subject
2220
* @param bool $sendOnWarning
2321
*/
24-
public function __construct(Swift_Mailer $mailer, $recipients, $sender, $subject, $sendOnWarning = true)
22+
public function __construct(\Swift_Mailer $mailer, $recipients, $sender, $subject, $sendOnWarning = true)
2523
{
2624
$this->mailer = $mailer;
2725

@@ -43,7 +41,7 @@ protected function sendEmail(ResultsCollection $results): void
4341
}
4442
}
4543

46-
$message = (new Swift_Message())
44+
$message = (new \Swift_Message())
4745
->setSubject($this->subject)
4846
->setFrom($this->sender)
4947
->setTo($this->recipients)

Tests/Check/RedisCollectionTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
use Laminas\Diagnostics\Check\Redis;
66
use Liip\MonitorBundle\Check\RedisCollection;
77
use PHPUnit\Framework\TestCase;
8-
use ReflectionClass;
9-
use ReflectionException;
108

119
final class RedisCollectionTest extends TestCase
1210
{
1311
public const AUTH = 'my-super-secret-password';
1412

1513
/**
1614
* @test
15+
*
1716
* @dataProvider provideDsnWithAut
1817
*/
1918
public function handleDsnWithAuth(string $dsn): void
@@ -37,11 +36,11 @@ public function handleDsnWithAuth(string $dsn): void
3736
private function assertAuthPropertyValue(Redis $check, string $auth): void
3837
{
3938
try {
40-
$refClass = new ReflectionClass($check);
39+
$refClass = new \ReflectionClass($check);
4140
$authProp = $refClass->getProperty('auth');
4241
$authProp->setAccessible(true);
4342
self::assertSame($auth, $authProp->getValue($check));
44-
} catch (ReflectionException $e) {
43+
} catch (\ReflectionException $e) {
4544
self::fail($e->getMessage());
4645
}
4746
}

0 commit comments

Comments
 (0)