Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions Controller/HealthCheckController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ class HealthCheckController
protected $template;
protected $failureStatusCode;

/**
* @param $template
* @param $failureStatusCode
*/
public function __construct(RunnerManager $runnerManager, PathHelper $pathHelper, $template, $failureStatusCode)
{
$this->runnerManager = $runnerManager;
Expand Down Expand Up @@ -107,7 +103,7 @@ public function runAllChecksHttpStatusAction(Request $request): Response

return new Response(
'',
(ArrayReporter::STATUS_OK === $report->getGlobalStatus() ? 200 : $this->failureStatusCode)
ArrayReporter::STATUS_OK === $report->getGlobalStatus() ? 200 : $this->failureStatusCode
);
}

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

return new Response(
'',
(ArrayReporter::STATUS_OK === $report->getGlobalStatus() ? 200 : $this->failureStatusCode)
ArrayReporter::STATUS_OK === $report->getGlobalStatus() ? 200 : $this->failureStatusCode
);
}

Expand Down
3 changes: 1 addition & 2 deletions Helper/AbstractMailReporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Liip\MonitorBundle\Helper;

use ArrayObject;
use Laminas\Diagnostics\Check\CheckInterface;
use Laminas\Diagnostics\Result\Collection as ResultsCollection;
use Laminas\Diagnostics\Result\ResultInterface;
Expand Down Expand Up @@ -44,7 +43,7 @@ public function __construct($recipients, $sender, $subject, $sendOnWarning = tru
/**
* @return void
*/
public function onStart(ArrayObject $checks, $runnerConfig)
public function onStart(\ArrayObject $checks, $runnerConfig)
{
}

Expand Down
3 changes: 0 additions & 3 deletions Helper/ConsoleReporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ class ConsoleReporter implements ReporterInterface
*/
protected $output;

/**
* @param OutputInterface $output
*/
public function __construct(OutputInterface $output = null)
{
if (null === $output) {
Expand Down
3 changes: 0 additions & 3 deletions Helper/RawConsoleReporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ class RawConsoleReporter implements ReporterInterface
*/
protected $output;

/**
* @param OutputInterface $output
*/
public function __construct(OutputInterface $output = null)
{
if (null === $output) {
Expand Down
6 changes: 2 additions & 4 deletions Helper/SwiftMailerReporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
use Laminas\Diagnostics\Check\CheckInterface;
use Laminas\Diagnostics\Result\Collection as ResultsCollection;
use Laminas\Diagnostics\Result\ResultInterface;
use Swift_Mailer;
use Swift_Message;

/**
* @author louis <[email protected]>
Expand All @@ -21,7 +19,7 @@ class SwiftMailerReporter extends AbstractMailReporter
* @param string $subject
* @param bool $sendOnWarning
*/
public function __construct(Swift_Mailer $mailer, $recipients, $sender, $subject, $sendOnWarning = true)
public function __construct(\Swift_Mailer $mailer, $recipients, $sender, $subject, $sendOnWarning = true)
{
$this->mailer = $mailer;

Expand All @@ -43,7 +41,7 @@ protected function sendEmail(ResultsCollection $results): void
}
}

$message = (new Swift_Message())
$message = (new \Swift_Message())
->setSubject($this->subject)
->setFrom($this->sender)
->setTo($this->recipients)
Expand Down
7 changes: 3 additions & 4 deletions Tests/Check/RedisCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
use Laminas\Diagnostics\Check\Redis;
use Liip\MonitorBundle\Check\RedisCollection;
use PHPUnit\Framework\TestCase;
use ReflectionClass;
use ReflectionException;

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

/**
* @test
*
* @dataProvider provideDsnWithAut
*/
public function handleDsnWithAuth(string $dsn): void
Expand All @@ -37,11 +36,11 @@ public function handleDsnWithAuth(string $dsn): void
private function assertAuthPropertyValue(Redis $check, string $auth): void
{
try {
$refClass = new ReflectionClass($check);
$refClass = new \ReflectionClass($check);
$authProp = $refClass->getProperty('auth');
$authProp->setAccessible(true);
self::assertSame($auth, $authProp->getValue($check));
} catch (ReflectionException $e) {
} catch (\ReflectionException $e) {
self::fail($e->getMessage());
}
}
Expand Down