Skip to content

Commit

Permalink
Apply php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
scheb committed Feb 25, 2024
1 parent 0e11a58 commit 21af991
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/analyzer/Stock/TombstoneNodeVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class TombstoneNodeVisitor extends NameResolver
/**
* @var string|null
*/
private $currentClass = null;
private $currentClass;

/**
* @var string[]
Expand Down
4 changes: 2 additions & 2 deletions src/logger/Graveyard/GraveyardBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class GraveyardBuilder
/**
* @var string|null
*/
private $rootDirectory = null;
private $rootDirectory;

/**
* @var HandlerInterface[]
Expand All @@ -28,7 +28,7 @@ class GraveyardBuilder
/**
* @var LoggerInterface|null
*/
private $logger = null;
private $logger;

/**
* @var bool
Expand Down
2 changes: 1 addition & 1 deletion src/logger/Graveyard/GraveyardRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class GraveyardRegistry
/**
* @var GraveyardInterface|null
*/
private static $graveyard = null;
private static $graveyard;

public static function getGraveyard(): GraveyardInterface
{
Expand Down
5 changes: 2 additions & 3 deletions src/logger/Handler/AnalyzerLogHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Scheb\Tombstone\Logger\Handler;

use LogicException;
use Scheb\Tombstone\Core\Model\Vampire;
use Scheb\Tombstone\Logger\Formatter\AnalyzerLogFormatter;
use Scheb\Tombstone\Logger\Formatter\FormatterInterface;
Expand Down Expand Up @@ -43,7 +42,7 @@ class AnalyzerLogHandler extends AbstractHandler
*/
private $useLocking;

public function __construct(string $logDir, int $sizeLimit = null, ?int $filePermission = null, bool $useLocking = false)
public function __construct(string $logDir, ?int $sizeLimit = null, ?int $filePermission = null, bool $useLocking = false)
{
$this->logDir = $logDir;
$this->sizeLimit = $sizeLimit;
Expand Down Expand Up @@ -120,7 +119,7 @@ public function flush(): void

public function setFormatter(FormatterInterface $formatter): void
{
throw new LogicException('Formatter of AnalyzerLogHandler cannot be changed.');
throw new \LogicException('Formatter of AnalyzerLogHandler cannot be changed.');
}

protected function getDefaultFormatter(): FormatterInterface
Expand Down
6 changes: 0 additions & 6 deletions src/logger/Handler/PsrLoggerHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,8 @@ class PsrLoggerHandler extends AbstractHandler
*/
private $logger;

/**
* @var mixed
*/
private $level;

/**
* @param mixed $level
*/
public function __construct(LoggerInterface $logger, $level)
{
$this->logger = $logger;
Expand Down
4 changes: 2 additions & 2 deletions src/logger/tombstone-function.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
if (!function_exists('tombstone')) {
function tombstone(string ...$arguments): void
{
$trace = \Scheb\Tombstone\Logger\Tracing\TraceProvider::getTraceHere();
\Scheb\Tombstone\Logger\Graveyard\GraveyardRegistry::getGraveyard()->logTombstoneCall($arguments, $trace, []);
$trace = Scheb\Tombstone\Logger\Tracing\TraceProvider::getTraceHere();
Scheb\Tombstone\Logger\Graveyard\GraveyardRegistry::getGraveyard()->logTombstoneCall($arguments, $trace, []);
}
}
2 changes: 1 addition & 1 deletion tests/Analyzer/Matching/VampireMatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected function setUp(): void
$this->tombstoneIndex = $this->createMock(TombstoneIndex::class);
$this->matchingTombstone = $this->createMock(Tombstone::class);

$this->matcher = new \Scheb\Tombstone\Analyzer\Matching\VampireMatcher([
$this->matcher = new VampireMatcher([
$this->matchingStrategy1,
$this->matchingStrategy2,
]);
Expand Down
2 changes: 1 addition & 1 deletion tests/Analyzer/Stock/fixtures/parameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
tombstone('2020-01-01', 'author', 'label');

// Invalid arguments
tombstone(123, 1.23, false, $var, DIRECTORY_SEPARATOR, new \stdClass(), 'label');
tombstone(123, 1.23, false, $var, DIRECTORY_SEPARATOR, new stdClass(), 'label');

0 comments on commit 21af991

Please sign in to comment.