Skip to content

Commit

Permalink
PSR-12
Browse files Browse the repository at this point in the history
  • Loading branch information
t0mmy742 committed Jan 2, 2020
1 parent 539c334 commit 80b716c
Show file tree
Hide file tree
Showing 123 changed files with 149 additions and 24 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pull request for each branch. This allows me to review and pull in new features

## Style Guide

All pull requests must adhere to the [PSR-2 standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md).
All pull requests must adhere to the [PSR-12 standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-12-extended-coding-style-guide.md).

## Unit Testing

Expand Down
1 change: 1 addition & 0 deletions Slim/App.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/CallableResolver.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Error/AbstractErrorRenderer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Error/Renderers/HtmlErrorRenderer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Error/Renderers/JsonErrorRenderer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Error/Renderers/PlainTextErrorRenderer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Error/Renderers/XmlErrorRenderer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Exception/HttpBadRequestException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Exception/HttpException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Exception/HttpForbiddenException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Exception/HttpInternalServerErrorException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Exception/HttpMethodNotAllowedException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Exception/HttpNotFoundException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Exception/HttpNotImplementedException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Exception/HttpSpecializedException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Exception/HttpUnauthorizedException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
4 changes: 3 additions & 1 deletion Slim/Factory/AppFactory.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down Expand Up @@ -179,7 +180,8 @@ protected static function attemptResponseFactoryDecoration(
ResponseFactoryInterface $responseFactory,
StreamFactoryInterface $streamFactory
): ResponseFactoryInterface {
if (static::$slimHttpDecoratorsAutomaticDetectionEnabled
if (
static::$slimHttpDecoratorsAutomaticDetectionEnabled
&& SlimHttpPsr17Factory::isResponseFactoryAvailable()
) {
return SlimHttpPsr17Factory::createDecoratedResponseFactory($responseFactory, $streamFactory);
Expand Down
1 change: 1 addition & 0 deletions Slim/Factory/Psr17/GuzzlePsr17Factory.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
3 changes: 2 additions & 1 deletion Slim/Factory/Psr17/NyholmPsr17Factory.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace Slim\Factory\Psr17;
Expand All @@ -21,7 +22,7 @@ public static function getServerRequestCreator(): ServerRequestCreatorInterface
* Nyholm Psr17Factory implements all factories in one unified
* factory which implements all of the PSR-17 factory interfaces
*/
$psr17Factory = new static::$responseFactoryClass;
$psr17Factory = new static::$responseFactoryClass();

$serverRequestCreator = new static::$serverRequestCreatorClass(
$psr17Factory,
Expand Down
5 changes: 3 additions & 2 deletions Slim/Factory/Psr17/Psr17Factory.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down Expand Up @@ -46,7 +47,7 @@ public static function getResponseFactory(): ResponseFactoryInterface
throw new RuntimeException(get_called_class() . ' could not instantiate a response factory.');
}

return new static::$responseFactoryClass;
return new static::$responseFactoryClass();
}

/**
Expand All @@ -58,7 +59,7 @@ public static function getStreamFactory(): StreamFactoryInterface
throw new RuntimeException(get_called_class() . ' could not instantiate a stream factory.');
}

return new static::$streamFactoryClass;
return new static::$streamFactoryClass();
}

/**
Expand Down
1 change: 1 addition & 0 deletions Slim/Factory/Psr17/Psr17FactoryProvider.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Factory/Psr17/ServerRequestCreator.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Factory/Psr17/SlimHttpPsr17Factory.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Factory/Psr17/SlimHttpServerRequestCreator.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Factory/Psr17/SlimPsr17Factory.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Factory/Psr17/ZendDiactorosPsr17Factory.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
4 changes: 3 additions & 1 deletion Slim/Factory/ServerRequestCreatorFactory.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down Expand Up @@ -76,7 +77,8 @@ public static function determineServerRequestCreator(): ServerRequestCreatorInte
protected static function attemptServerRequestCreatorDecoration(
ServerRequestCreatorInterface $serverRequestCreator
): ServerRequestCreatorInterface {
if (static::$slimHttpDecoratorsAutomaticDetectionEnabled
if (
static::$slimHttpDecoratorsAutomaticDetectionEnabled
&& SlimHttpServerRequestCreator::isServerRequestDecoratorAvailable()
) {
return new SlimHttpServerRequestCreator($serverRequestCreator);
Expand Down
1 change: 1 addition & 0 deletions Slim/Handlers/ErrorHandler.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Handlers/Strategies/RequestHandler.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Handlers/Strategies/RequestResponse.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Handlers/Strategies/RequestResponseArgs.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Interfaces/AdvancedCallableResolverInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Interfaces/CallableResolverInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Interfaces/DispatcherInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Interfaces/ErrorHandlerInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Interfaces/ErrorRendererInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Interfaces/InvocationStrategyInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Interfaces/MiddlewareDispatcherInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Interfaces/Psr17FactoryInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Interfaces/Psr17FactoryProviderInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Interfaces/RouteCollectorInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Interfaces/RouteCollectorProxyInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Interfaces/RouteGroupInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Interfaces/RouteInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Interfaces/RouteParserInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Interfaces/RouteResolverInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace Slim\Interfaces;
Expand Down
1 change: 1 addition & 0 deletions Slim/Interfaces/ServerRequestCreatorInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Middleware/BodyParsingMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Middleware/ContentLengthMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Middleware/ErrorMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Middleware/MethodOverrideMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Middleware/OutputBufferingMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
1 change: 1 addition & 0 deletions Slim/Middleware/RoutingMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Slim Framework (https://slimframework.com)
*
Expand Down
Loading

0 comments on commit 80b716c

Please sign in to comment.