Skip to content

Commit 16ca53f

Browse files
committed
Upgrade coding standard
1 parent 503e7fb commit 16ca53f

6 files changed

Lines changed: 8 additions & 8 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
},
3535
"require-dev": {
3636
"ext-xdebug": "*",
37-
"aplus/coding-standard": "^1.14",
37+
"aplus/coding-standard": "^2.0",
3838
"ergebnis/composer-normalize": "^2.25",
3939
"jetbrains/phpstorm-attributes": "^1.0",
4040
"phpmd/phpmd": "^2.13",

src/Debug/LogCollector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function getActivities() : array
4545

4646
public function getContents() : string
4747
{
48-
if ( ! isset($this->logger)) {
48+
if (!isset($this->logger)) {
4949
return '<p>A Logger instance has not been set on this collector.</p>';
5050
}
5151
\ob_start(); ?>
@@ -89,7 +89,7 @@ public function getContents() : string
8989

9090
protected function renderLogs() : string
9191
{
92-
if ( ! $this->hasData()) {
92+
if (!$this->hasData()) {
9393
return '<p>No log has been set.</p>';
9494
}
9595
$count = \count($this->getData());

src/Loggers/EmailLogger.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class EmailLogger extends Logger
2222
{
2323
protected function setDestination(string $destination) : static
2424
{
25-
if ( ! \filter_var($destination, \FILTER_VALIDATE_EMAIL)) {
25+
if (!\filter_var($destination, \FILTER_VALIDATE_EMAIL)) {
2626
throw new InvalidArgumentException('Invalid email destination: ' . $destination);
2727
}
2828
$this->destination = $destination;
@@ -36,7 +36,7 @@ protected function makeHeaders(Log $log) : string
3636
foreach ($headers as $name => $value) {
3737
$names[] = \strtolower($name);
3838
}
39-
if ( ! \in_array('subject', $names, true)) {
39+
if (!\in_array('subject', $names, true)) {
4040
$headers['Subject'] = 'Log ' . $log->level->name . ' ' . $log->id;
4141
}
4242
$headerLines = [];

src/Loggers/FileLogger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class FileLogger extends Logger
2222
{
2323
protected function setDestination(string $destination) : static
2424
{
25-
if ( ! \is_file($destination) && ! \is_dir(\dirname($destination))) {
25+
if (!\is_file($destination) && !\is_dir(\dirname($destination))) {
2626
throw new InvalidArgumentException('Invalid file destination: ' . $destination);
2727
}
2828
$this->destination = $destination;

src/Loggers/MultiFileLogger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class MultiFileLogger extends Logger
2323
protected function setDestination(string $destination) : static
2424
{
2525
$directory = \realpath($destination);
26-
if ( ! $directory || ! \is_dir($directory)) {
26+
if (!$directory || !\is_dir($directory)) {
2727
throw new InvalidArgumentException('Invalid directory destination: ' . $destination);
2828
}
2929
$this->destination = $directory . \DIRECTORY_SEPARATOR;

tests/Loggers/MultiFileLoggerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final class MultiFileLoggerTest extends TestCase
1717
protected function setUp() : void
1818
{
1919
$destination = \sys_get_temp_dir() . '/logs';
20-
if ( ! \is_dir($destination)) {
20+
if (!\is_dir($destination)) {
2121
\mkdir($destination);
2222
}
2323
\chmod($destination, 0777);

0 commit comments

Comments
 (0)