Skip to content

Commit e6c3e8f

Browse files
committed
fix(routes): Mess with default values of string properties
1 parent d3c0eb7 commit e6c3e8f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/RouteMap/RouteMapAbstract.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,23 @@ abstract class RouteMapAbstract extends DataIterator implements RouteMapInterfac
3333
/**
3434
* @var string|ActionInterface
3535
*/
36-
protected $actionClass = null;
36+
protected $actionClass = '';
3737
/**
38-
* @var string|null
38+
* @var string
3939
*/
40-
protected $packageName = null;
40+
protected $packageName = '';
4141
/**
4242
* @var string|EntityRequestInterface
4343
*/
44-
protected $requestClass = null;
44+
protected $requestClass = '';
4545
/**
4646
* @var string
4747
*/
48-
protected $resourceName = null;
48+
protected $resourceName = '';
4949
/**
5050
* @var string
5151
*/
52-
protected $routesPrefix = null;
52+
protected $routesPrefix = '';
5353

5454
/**
5555
* RouteMapAbstract constructor.
@@ -104,10 +104,10 @@ public function add($method, $pattern): RouteInterface
104104
{
105105
$route = new Route($this, $method);
106106
$route->setContainer($this->container);
107-
if (null !== $this->actionClass) {
107+
if ('' !== $this->actionClass) {
108108
$route->setActionClass($this->actionClass);
109109
}
110-
if (null !== $this->requestClass) {
110+
if ('' !== $this->requestClass) {
111111
$route->setRequestClass($this->requestClass);
112112
}
113113
$route->setPackage($this->getPackage());
@@ -196,7 +196,7 @@ public function getResource(): string
196196
*/
197197
public function hasPackage(): bool
198198
{
199-
return null !== $this->packageName;
199+
return '' !== $this->packageName;
200200
}
201201

202202
/**

0 commit comments

Comments
 (0)