Skip to content

Commit

Permalink
Applied automated CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Sep 19, 2022
1 parent 068ae33 commit 8114f35
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
4 changes: 2 additions & 2 deletions bin/console.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ static function (int $errorCode, string $message = '', string $file = '', int $l
E_STRICT | E_NOTICE | E_WARNING,
);

$variables = EnvironmentVariables::fromEnvironment(new ImportGpgKeyFromStringViaTemporaryFile());
$logger = new Logger(
$variables = EnvironmentVariables::fromEnvironment(new ImportGpgKeyFromStringViaTemporaryFile());
$logger = new Logger(
'automatic-releases',
[new StreamHandler(STDERR, $variables->logLevel())],
[
Expand Down
2 changes: 1 addition & 1 deletion src/HttpClient/LoggingHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ public function sendRequest(RequestInterface $request): ResponseInterface

return $response;
}
}
}
4 changes: 3 additions & 1 deletion src/Monolog/ConvertLogContextHttpRequestsIntoStrings.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
use Monolog\Processor\ProcessorInterface;
use Psr\Http\Message\RequestInterface;

use function array_map;

/** @internal */
final class ConvertLogContextHttpRequestsIntoStrings implements ProcessorInterface
{
Expand All @@ -34,4 +36,4 @@ public function __invoke(LogRecord $record): LogRecord
$record->formatted
);
}
}
}
4 changes: 3 additions & 1 deletion src/Monolog/ConvertLogContextHttpResponsesIntoStrings.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
use Monolog\Processor\ProcessorInterface;
use Psr\Http\Message\ResponseInterface;

use function array_map;

/** @internal */
final class ConvertLogContextHttpResponsesIntoStrings implements ProcessorInterface
{
Expand All @@ -34,4 +36,4 @@ public function __invoke(LogRecord $record): LogRecord
$record->formatted
);
}
}
}
3 changes: 0 additions & 3 deletions test/unit/HttpClient/LoggingHttpClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@

use Http\Discovery\Psr17FactoryDiscovery;
use Laminas\AutomaticReleases\HttpClient\LoggingHttpClient;
use Monolog\Handler\StreamHandler;
use Monolog\Logger;
use PHPUnit\Framework\TestCase;
use Psr\Http\Client\ClientInterface;
use Psr\Log\LoggerInterface;
use function fopen;

/** @covers \Laminas\AutomaticReleases\HttpClient\LoggingHttpClient */
final class LoggingHttpClientTest extends TestCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,10 @@

use DateTimeImmutable;
use Http\Discovery\Psr17FactoryDiscovery;
use Laminas\AutomaticReleases\HttpClient\LoggingHttpClient;
use Laminas\AutomaticReleases\Monolog\ConvertLogContextHttpRequestsIntoStrings;
use Laminas\AutomaticReleases\Monolog\ConvertLogContextHttpResponsesIntoStrings;
use Monolog\Handler\StreamHandler;
use Monolog\Level;
use Monolog\Logger;
use Monolog\LogRecord;
use PHPUnit\Framework\TestCase;
use Psr\Http\Client\ClientInterface;
use function fopen;

/** @covers \Laminas\AutomaticReleases\Monolog\ConvertLogContextHttpResponsesIntoStrings */
final class ConvertLogContextHttpResponsesIntoStringsTest extends TestCase
Expand Down
3 changes: 3 additions & 0 deletions test/unit/Monolog/VerifyLoggingIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
use Monolog\Handler\StreamHandler;
use Monolog\Logger;
use PHPUnit\Framework\TestCase;

use function fopen;
use function rewind;
use function stream_get_contents;

/**
* Small integration test to ensure future compatibility with monolog in our setup.
Expand Down

0 comments on commit 8114f35

Please sign in to comment.