package and depencies

This commit is contained in:
RafficMohammed
2023-01-08 02:57:24 +05:30
parent d5332eb421
commit 1d54b8bc7f
4309 changed files with 193331 additions and 172289 deletions

View File

@@ -21,10 +21,10 @@ class RoutingConfigurator
{
use Traits\AddTrait;
private $loader;
private $path;
private $file;
private $env;
private PhpFileLoader $loader;
private string $path;
private string $file;
private ?string $env;
public function __construct(RouteCollection $collection, PhpFileLoader $loader, string $path, string $file, string $env = null)
{
@@ -38,7 +38,7 @@ class RoutingConfigurator
/**
* @param string|string[]|null $exclude Glob patterns to exclude from the import
*/
final public function import($resource, string $type = null, bool $ignoreErrors = false, $exclude = null): ImportConfigurator
final public function import(string|array $resource, string $type = null, bool $ignoreErrors = false, string|array $exclude = null): ImportConfigurator
{
$this->loader->setCurrentDir(\dirname($this->path));
@@ -68,10 +68,7 @@ class RoutingConfigurator
return $this->env;
}
/**
* @return static
*/
final public function withPath(string $path): self
final public function withPath(string $path): static
{
$clone = clone $this;
$clone->path = $clone->file = $path;