composer update
This commit is contained in:
@@ -47,10 +47,8 @@ class CollectionConfigurator
|
||||
|
||||
/**
|
||||
* Creates a sub-collection.
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
final public function collection($name = '')
|
||||
final public function collection(string $name = ''): self
|
||||
{
|
||||
return new self($this->collection, $this->name.$name, $this, $this->prefixes);
|
||||
}
|
||||
@@ -62,7 +60,7 @@ class CollectionConfigurator
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function prefix($prefix)
|
||||
final public function prefix($prefix): self
|
||||
{
|
||||
if (\is_array($prefix)) {
|
||||
if (null === $this->parentPrefixes) {
|
||||
@@ -88,7 +86,7 @@ class CollectionConfigurator
|
||||
return $this;
|
||||
}
|
||||
|
||||
private function createRoute($path): Route
|
||||
private function createRoute(string $path): Route
|
||||
{
|
||||
return (clone $this->route)->setPath($path);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ class ImportConfigurator
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function prefix($prefix, bool $trailingSlashOnRoot = true)
|
||||
final public function prefix($prefix, bool $trailingSlashOnRoot = true): self
|
||||
{
|
||||
if (!\is_array($prefix)) {
|
||||
$this->route->addPrefix($prefix);
|
||||
@@ -84,7 +84,7 @@ class ImportConfigurator
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function namePrefix(string $namePrefix)
|
||||
final public function namePrefix(string $namePrefix): self
|
||||
{
|
||||
$this->route->addNamePrefix($namePrefix);
|
||||
|
||||
|
||||
@@ -34,12 +34,13 @@ class RoutingConfigurator
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ImportConfigurator
|
||||
* @param string|string[]|null $exclude Glob patterns to exclude from the import
|
||||
*/
|
||||
final public function import($resource, $type = null, $ignoreErrors = false)
|
||||
final public function import($resource, string $type = null, bool $ignoreErrors = false, $exclude = null): ImportConfigurator
|
||||
{
|
||||
$this->loader->setCurrentDir(\dirname($this->path));
|
||||
$imported = $this->loader->import($resource, $type, $ignoreErrors, $this->file);
|
||||
|
||||
$imported = $this->loader->import($resource, $type, $ignoreErrors, $this->file, $exclude) ?: [];
|
||||
if (!\is_array($imported)) {
|
||||
return new ImportConfigurator($this->collection, $imported);
|
||||
}
|
||||
@@ -52,10 +53,7 @@ class RoutingConfigurator
|
||||
return new ImportConfigurator($this->collection, $mergedCollection);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return CollectionConfigurator
|
||||
*/
|
||||
final public function collection($name = '')
|
||||
final public function collection(string $name = ''): CollectionConfigurator
|
||||
{
|
||||
return new CollectionConfigurator($this->collection, $name);
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ trait AddTrait
|
||||
return $this->add($name, $path);
|
||||
}
|
||||
|
||||
private function createRoute($path): Route
|
||||
private function createRoute(string $path): Route
|
||||
{
|
||||
return new Route($path);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ trait RouteTrait
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function defaults(array $defaults)
|
||||
final public function defaults(array $defaults): self
|
||||
{
|
||||
$this->route->addDefaults($defaults);
|
||||
|
||||
@@ -38,7 +38,7 @@ trait RouteTrait
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function requirements(array $requirements)
|
||||
final public function requirements(array $requirements): self
|
||||
{
|
||||
$this->route->addRequirements($requirements);
|
||||
|
||||
@@ -50,7 +50,7 @@ trait RouteTrait
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function options(array $options)
|
||||
final public function options(array $options): self
|
||||
{
|
||||
$this->route->addOptions($options);
|
||||
|
||||
@@ -62,7 +62,7 @@ trait RouteTrait
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function utf8(bool $utf8 = true)
|
||||
final public function utf8(bool $utf8 = true): self
|
||||
{
|
||||
$this->route->addOptions(['utf8' => $utf8]);
|
||||
|
||||
@@ -74,7 +74,7 @@ trait RouteTrait
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function condition(string $condition)
|
||||
final public function condition(string $condition): self
|
||||
{
|
||||
$this->route->setCondition($condition);
|
||||
|
||||
@@ -86,7 +86,7 @@ trait RouteTrait
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function host(string $pattern)
|
||||
final public function host(string $pattern): self
|
||||
{
|
||||
$this->route->setHost($pattern);
|
||||
|
||||
@@ -101,7 +101,7 @@ trait RouteTrait
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function schemes(array $schemes)
|
||||
final public function schemes(array $schemes): self
|
||||
{
|
||||
$this->route->setSchemes($schemes);
|
||||
|
||||
@@ -116,7 +116,7 @@ trait RouteTrait
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function methods(array $methods)
|
||||
final public function methods(array $methods): self
|
||||
{
|
||||
$this->route->setMethods($methods);
|
||||
|
||||
@@ -130,7 +130,7 @@ trait RouteTrait
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function controller($controller)
|
||||
final public function controller($controller): self
|
||||
{
|
||||
$this->route->addDefaults(['_controller' => $controller]);
|
||||
|
||||
@@ -142,7 +142,7 @@ trait RouteTrait
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function locale(string $locale)
|
||||
final public function locale(string $locale): self
|
||||
{
|
||||
$this->route->addDefaults(['_locale' => $locale]);
|
||||
|
||||
@@ -154,7 +154,7 @@ trait RouteTrait
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function format(string $format)
|
||||
final public function format(string $format): self
|
||||
{
|
||||
$this->route->addDefaults(['_format' => $format]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user