Skip to content

Commit

Permalink
applying updated ruleset
Browse files Browse the repository at this point in the history
  • Loading branch information
SignpostMarv committed Jan 20, 2020
1 parent 4b3cf0c commit 28092ee
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions Tests/CatchingHttpHandlerTest.php
Expand Up @@ -97,7 +97,7 @@ public function DataProviderTesting() : Generator

$logger = new $loggerImplementation(...array_slice($loggerArgs, 1));

list($implementation, $postConstructionCalls) = $frameworkArgs;
[$implementation, $postConstructionCalls] = $frameworkArgs;

/**
* @var string
Expand Down Expand Up @@ -147,7 +147,7 @@ public function DataProviderTesting() : Generator
*
* @dataProvider DataProviderTesting
*/
public function testCachingHttpHandler(
public function test_caching_http_handler(
CatchingHttpHandler $framework,
int $expectedStatus,
string $expectedContentRegex,
Expand Down Expand Up @@ -265,16 +265,16 @@ public function DataProviderTestBadConfig() : Generator

foreach ($this->DataProviderRouterArguments() as $routerArgs) {
foreach ($this->DataProviderBadConfig() as $badConfigArgs) {
list(
[
$handlerConfigArgs,
$expectedExceptionType,
$expectedExceptionMessage
) = $badConfigArgs;
] = $badConfigArgs;

foreach ($this->DataProviderFrameworkArguments() as $frameworkArgs) {
$logger = new $loggerImplementation(...array_slice($loggerArgs, 1));

list($implementation) = $frameworkArgs;
[$implementation] = $frameworkArgs;

$frameworkArgs = array_slice($frameworkArgs, 2);

Expand Down Expand Up @@ -317,9 +317,9 @@ public function DataProviderTestBadConfig() : Generator
*
* @dataProvider DataProviderTestBadConfig
*
* @depends testCachingHttpHandler
* @depends test_caching_http_handler
*/
public function testBadConfig(
public function test_bad_config(
string $implementation,
array $frameworkArgs,
string $expectedExceptionType,
Expand All @@ -345,7 +345,7 @@ public function DataProviderTestBadLogger() : Generator
foreach ($this->DataProviderFrameworkArguments() as $frameworkArgs) {
$logger = new fixtures\Log\ThrowingLogger($throwUnderLogCount, 'testing');

list($implementation, $postConstructionCalls) = $frameworkArgs;
[$implementation, $postConstructionCalls] = $frameworkArgs;

/**
* @var string
Expand Down Expand Up @@ -408,7 +408,7 @@ public function DataProviderTestBadLogger() : Generator
*
* @dataProvider DataProviderTestBadLogger
*/
public function testBadLogger(
public function test_bad_logger(
CatchingHttpHandler $framework,
int $_expectedStatus,
string $_expectedContentRegex,
Expand Down
6 changes: 3 additions & 3 deletions Tests/ImplementationTest.php
Expand Up @@ -117,12 +117,12 @@ public function DataProviderWhoopsHandlerArguments() : Generator
*
* @dataProvider DataProviderGoodSources
*/
public function testEverythingInitialisesFine(
public function test_everything_initialises_fine(
string $implementation,
array $postConstructionCalls,
...$implementationArgs
) : BaseFramework {
list(, , , $logger) = $implementationArgs;
[, , , $logger] = $implementationArgs;

static::assertInstanceOf(LoggerInterface::class, $logger);

Expand All @@ -148,7 +148,7 @@ public function testEverythingInitialisesFine(

protected function extractDefaultFrameworkArgs(array $implementationArgs) : array
{
list($baseUrl, $basePath, $config) = $implementationArgs;
[$baseUrl, $basePath, $config] = $implementationArgs;

return [$baseUrl, $basePath, $config];
}
Expand Down
2 changes: 1 addition & 1 deletion src/CatchingHttpHandler.php
Expand Up @@ -57,7 +57,7 @@ public function __construct(
/**
* @param class-string<HandlerInterface> $maybe
*/
function (string $maybe) : bool {
static function (string $maybe) : bool {
return
class_exists($maybe);
},
Expand Down

0 comments on commit 28092ee

Please sign in to comment.