Skip to content

Commit 473a811

Browse files
authored
Merge pull request #83 from l0gicgate/CodeQuality
Code Quality
2 parents 83ff8a0 + c27e94a commit 473a811

23 files changed

Lines changed: 181 additions & 903 deletions
File renamed without changes.

composer.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
"name": "Rob Allen",
2121
"email": "rob@akrabat.com",
2222
"homepage": "http://akrabat.com"
23+
},
24+
{
25+
"name": "Pierre Berube",
26+
"email": "pierre@lgse.com",
27+
"homepage": "http://www.lgse.com"
2328
}
2429
],
2530
"require": {
@@ -32,11 +37,11 @@
3237
},
3338
"require-dev": {
3439
"nyholm/psr7": "^1.0",
35-
"phpunit/phpunit": "^7.0",
3640
"phpstan/phpstan": "^0.10.3",
41+
"phpunit/phpunit": "^7.0",
42+
"php-http/psr7-integration-tests": "dev-master",
3743
"squizlabs/php_codesniffer": "^3.3.2",
38-
"zendframework/zend-diactoros": "^2.0",
39-
"php-http/psr7-integration-tests": "dev-master"
44+
"zendframework/zend-diactoros": "^2.0"
4045
},
4146
"provide": {
4247
"psr/http-factory": "^1.0"

phpunit.xml renamed to phpunit.xml.dist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.1/phpunit.xsd"
44
colors="true"
5-
bootstrap="tests/bootstrap.php">
5+
bootstrap="tests/bootstrap.php"
6+
>
67
<testsuites>
7-
<testsuite name="slim\http">
8+
<testsuite name="Slim-Http Test Suite">
89
<directory>tests/</directory>
910
</testsuite>
1011
</testsuites>
11-
1212
<filter>
1313
<whitelist processUncoveredFilesFromWhitelist="true">
1414
<directory suffix=".php">src/</directory>

src/Factory/DecoratedResponseFactory.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,18 @@
22
/**
33
* Slim Framework (https://slimframework.com)
44
*
5-
* @link https://github.com/slimphp/Slim-Http
6-
* @copyright Copyright (c) 2011-2018 Josh Lockhart
7-
* @license https://github.com/slimphp/Slim-Http/blob/master/LICENSE (MIT License)
5+
* @license https://github.com/slimphp/Slim-Http/blob/master/LICENSE.md (MIT License)
86
*/
7+
8+
declare(strict_types=1);
9+
910
namespace Slim\Http\Factory;
1011

1112
use Psr\Http\Message\ResponseFactoryInterface;
1213
use Psr\Http\Message\ResponseInterface;
1314
use Psr\Http\Message\StreamFactoryInterface;
1415
use Slim\Http\Response;
1516

16-
/**
17-
* Class DecoratedResponseFactory
18-
* @package Slim\Http\Factory
19-
*/
2017
class DecoratedResponseFactory implements ResponseFactoryInterface
2118
{
2219
/**
@@ -30,7 +27,6 @@ class DecoratedResponseFactory implements ResponseFactoryInterface
3027
private $streamFactory;
3128

3229
/**
33-
* DecoratedResponseFactory constructor.
3430
* @param ResponseFactoryInterface $responseFactory
3531
* @param StreamFactoryInterface $streamFactory
3632
*/

src/Factory/DecoratedServerRequestFactory.php

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,18 @@
22
/**
33
* Slim Framework (https://slimframework.com)
44
*
5-
* @link https://github.com/slimphp/Slim-Http
6-
* @copyright Copyright (c) 2011-2018 Josh Lockhart
7-
* @license https://github.com/slimphp/Slim-Http/blob/master/LICENSE (MIT License)
5+
* @license https://github.com/slimphp/Slim-Http/blob/master/LICENSE.md (MIT License)
86
*/
7+
8+
declare(strict_types=1);
9+
910
namespace Slim\Http\Factory;
1011

1112
use Psr\Http\Message\ServerRequestFactoryInterface;
1213
use Psr\Http\Message\ServerRequestInterface;
14+
use Psr\Http\Message\UriInterface;
1315
use Slim\Http\ServerRequest;
1416

15-
/**
16-
* Class DecoratedServerRequestFactory
17-
* @package Slim\Http\Factory
18-
*/
1917
class DecoratedServerRequestFactory implements ServerRequestFactoryInterface
2018
{
2119
/**
@@ -24,7 +22,6 @@ class DecoratedServerRequestFactory implements ServerRequestFactoryInterface
2422
private $serverRequestFactory;
2523

2624
/**
27-
* DecoratedServerRequestFactory constructor.
2825
* @param ServerRequestFactoryInterface $serverRequestFactory
2926
*/
3027
public function __construct(ServerRequestFactoryInterface $serverRequestFactory)
@@ -34,7 +31,7 @@ public function __construct(ServerRequestFactoryInterface $serverRequestFactory)
3431

3532
/**
3633
* @param string $method
37-
* @param \Psr\Http\Message\UriInterface|string $uri
34+
* @param UriInterface|string $uri
3835
* @param array $serverParams
3936
* @return ServerRequest
4037
*/

src/Factory/DecoratedUriFactory.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,17 @@
22
/**
33
* Slim Framework (https://slimframework.com)
44
*
5-
* @link https://github.com/slimphp/Slim-Http
6-
* @copyright Copyright (c) 2011-2018 Josh Lockhart
7-
* @license https://github.com/slimphp/Slim-Http/blob/master/LICENSE (MIT License)
5+
* @license https://github.com/slimphp/Slim-Http/blob/master/LICENSE.md (MIT License)
86
*/
7+
8+
declare(strict_types=1);
9+
910
namespace Slim\Http\Factory;
1011

1112
use Psr\Http\Message\UriFactoryInterface;
1213
use Psr\Http\Message\UriInterface;
1314
use Slim\Http\Uri;
1415

15-
/**
16-
* Class DecoratedUriFactory
17-
* @package Slim\Http\Factory
18-
*/
1916
class DecoratedUriFactory implements UriFactoryInterface
2017
{
2118
/**
@@ -24,7 +21,6 @@ class DecoratedUriFactory implements UriFactoryInterface
2421
private $uriFactory;
2522

2623
/**
27-
* DecoratedUriFactory constructor.
2824
* @param UriFactoryInterface $uriFactory
2925
*/
3026
public function __construct(UriFactoryInterface $uriFactory)

0 commit comments

Comments
 (0)