Skip to content

Commit cec362b

Browse files
committed
Updated class header.
1 parent 6d9d2f9 commit cec362b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+148
-182
lines changed

Controller/Controller.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Controller/ControllerMiddlewareDelegate.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Controller/ControllerMiddlewareOptions.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
/**
44
* Qubus\Routing
55
*
6-
* @link https://github.com/QubusPHP/routing
6+
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Controller/ControllerMiddlewarePipe.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Controller/WithMiddlewaresAware.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,14 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);
1513

1614
namespace Qubus\Routing\Controller;
1715

18-
use Psr\Http\Server\MiddlewareInterface;
19-
2016
use function is_array;
2117

2218
trait WithMiddlewaresAware

Events/EventArgument.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);
1513

1614
namespace Qubus\Routing\Events;
1715

16+
use Psr\Http\Message\RequestInterface;
1817
use Qubus\Http\Request;
1918
use Qubus\Routing\Router;
2019

@@ -38,7 +37,7 @@ public function getRouter(): Router;
3837
/**
3938
* Get request instance.
4039
*/
41-
public function getRequest(): Request;
40+
public function getRequest(): Request|RequestInterface;
4241

4342
/**
4443
* Get all event arguments.

Events/EventHandler.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Events/RoutingEventArgument.php

+4-5
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);
1513

1614
namespace Qubus\Routing\Events;
1715

16+
use Psr\Http\Message\RequestInterface;
1817
use Qubus\Exception\Data\TypeException;
1918
use Qubus\Http\Request;
2019
use Qubus\Routing\Router;
@@ -65,9 +64,9 @@ public function getRouter(): Router
6564
}
6665

6766
/**
68-
* Get the request instance
67+
* Get the request instance.
6968
*/
70-
public function getRequest(): Request
69+
public function getRequest(): Request|RequestInterface
7170
{
7271
return $this->getRouter()->getRequest();
7372
}

Events/RoutingEventHandler.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Exceptions/CrudRouteException.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Exceptions/HttpException.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Exceptions/NamedRouteNotFoundException.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
88
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
9+
* @author Joshua Parker <[email protected]>
1210
*/
1311

1412
declare(strict_types=1);

Exceptions/NotFoundHttpException.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Exceptions/RouteControllerNotFoundException.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Exceptions/RouteMethodNotFoundException.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Exceptions/RouteNameRedefinedException.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Exceptions/RouteParamFailedConstraintException.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Exceptions/RouteParseException.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Exceptions/TooLateToAddNewRouteException.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Factories/ResponsableFactory.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Factories/ResponseFactory.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Factories/RoutableFactory.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Factories/RouteFactory.php

+5-7
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);
@@ -38,18 +36,18 @@ public static function create(
3836
$uri,
3937
$action,
4038
$defaultNamespace,
41-
$invoker ?? static::$invoker,
42-
$middlewareResolver ?? static::$middlewareResolver
39+
$invoker ?? self::$invoker,
40+
$middlewareResolver ?? self::$middlewareResolver
4341
);
4442
}
4543

4644
public static function setInvoker(InvokerInterface $invoker): void
4745
{
48-
static::$invoker = $invoker;
46+
self::$invoker = $invoker;
4947
}
5048

5149
public static function setMiddlewareResolver(MiddlewareResolver $middlewareResolver): void
5250
{
53-
static::$middlewareResolver = $middlewareResolver;
51+
self::$middlewareResolver = $middlewareResolver;
5452
}
5553
}

Factories/RouterFactory.php

+9-11
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
*
66
* @link https://github.com/QubusPHP/router
77
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @author Joshua Parker <[email protected]>
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);
@@ -39,30 +37,30 @@ public static function create(
3937
?MiddlewareResolver $middlewareResolver = null
4038
): Router {
4139
return new Router(
42-
$routeCollector ?? static::$routeCollector,
43-
$container ?? static::$container,
44-
$responseFactory ?? static::$responseFactory,
45-
$middlewareResolver ?? static::$middlewareResolver
40+
$routeCollector ?? self::$routeCollector,
41+
$container ?? self::$container,
42+
$responseFactory ?? self::$responseFactory,
43+
$middlewareResolver ?? self::$middlewareResolver
4644
);
4745
}
4846

4947
public static function setRouteCollector(Collector $routeCollector): void
5048
{
51-
static::$routeCollector = $routeCollector;
49+
self::$routeCollector = $routeCollector;
5250
}
5351

5452
public static function setContainer(ContainerInterface $container): void
5553
{
56-
static::$container = $container;
54+
self::$container = $container;
5755
}
5856

5957
public static function setResponseFactory(ResponseFactoryInterface $responseFactory): void
6058
{
61-
static::$responseFactory = $responseFactory;
59+
self::$responseFactory = $responseFactory;
6260
}
6361

6462
public static function setMiddlewareResolver(MiddlewareResolver $middlewareResolver): void
6563
{
66-
static::$middlewareResolver = $middlewareResolver;
64+
self::$middlewareResolver = $middlewareResolver;
6765
}
6866
}

0 commit comments

Comments
 (0)