diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 5b19ed23..f9bb5e3e 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1656,12 +1656,6 @@ parameters: count: 16 path: src/Phaseolies/Support/Collection.php - - - message: '#^Comparison operation "\<" between int\<80500, 80599\> and 70300 is always false\.$#' - identifier: smaller.alwaysFalse - count: 1 - path: src/Phaseolies/Support/CookieJar.php - - message: '#^PHPDoc tag @return with type void is incompatible with native type bool\.$#' identifier: return.phpDocType diff --git a/src/Phaseolies/Support/CookieJar.php b/src/Phaseolies/Support/CookieJar.php index faf459ee..df35d112 100644 --- a/src/Phaseolies/Support/CookieJar.php +++ b/src/Phaseolies/Support/CookieJar.php @@ -148,27 +148,6 @@ protected function setCookie(Cookie $cookie): bool $options['partitioned'] = true; } - if (PHP_VERSION_ID < 70300) { - // For PHP < 7.3 - $path = $options['path']; - if (isset($options['samesite'])) { - $path .= '; samesite=' . $options['samesite']; - } - if (isset($options['partitioned'])) { - $path .= '; partitioned'; - } - return setcookie( - $name, - $value, - $options['expires'], - $path, - $options['domain'], - $options['secure'], - $options['httponly'] - ); - } - - // For PHP >= 7.3 return setcookie($name, $value, $options); } diff --git a/src/Phaseolies/Support/Facades/Abort.php b/src/Phaseolies/Support/Facades/Abort.php index 84cc6bab..1c2d7d09 100644 --- a/src/Phaseolies/Support/Facades/Abort.php +++ b/src/Phaseolies/Support/Facades/Abort.php @@ -2,14 +2,14 @@ namespace Phaseolies\Support\Facades; +use Phaseolies\Facade\BaseFacade; + /** - * @method static \Phaseolies\Http\Support\RequestAbortion abort(int $code, string $message = '') - * @method static \Phaseolies\Http\Support\RequestAbortion abortIf(bool $condition, int $code, string $message = '') + * @method static void abort(int $code, string $message = '') + * @method static void abortIf(bool $condition, int $code, string $message = '') + * * @see \Phaseolies\Http\Support\RequestAbortion */ - -use Phaseolies\Facade\BaseFacade; - class Abort extends BaseFacade { protected static function getFacadeAccessor() diff --git a/src/Phaseolies/Support/Facades/App.php b/src/Phaseolies/Support/Facades/App.php index 36b3b4b1..f9876f16 100644 --- a/src/Phaseolies/Support/Facades/App.php +++ b/src/Phaseolies/Support/Facades/App.php @@ -2,32 +2,31 @@ namespace Phaseolies\Support\Facades; +use Phaseolies\Facade\BaseFacade; + /** - * @method static \Phaseolies\Application langPath($path = ''): string - * @method static \Phaseolies\Application setBasePath(string $basePath): self - * @method static \Phaseolies\Application templatesPath($path = ''): string - * @method static \Phaseolies\Application bootstrapPath($path = ''): string - * @method static \Phaseolies\Application schemaPath($path = ''): string - * @method static \Phaseolies\Application publicPath($path = ''): string - * @method static \Phaseolies\Application storagePath($path = ''): string - * @method static \Phaseolies\Application appPath(): string - * @method static \Phaseolies\Application basePath(): string - * @method static \Phaseolies\Application configPath($path = ''): string - * @method static \Phaseolies\Application runningInConsole(): bool - * @method static \Phaseolies\Application hasBeenBootstrapped(): bool - * @method static \Phaseolies\Application isBooted(): bool - * @method static \Phaseolies\Application make($abstract, array $parameters = []) - * @method static \Phaseolies\Application getLocale(): string - * @method static \Phaseolies\Application currentLocale(): string - * @method static \Phaseolies\Application getFallbackLocale(): string - * @method static \Phaseolies\Application setLocale($locale): void - * @method static \Phaseolies\Application setFallbackLocale($fallbackLocale) - * @method static \Phaseolies\Application isLocale($locale): bool + * @method static string langPath($path = '') + * @method static string templatesPath($path = '') + * @method static string bootstrapPath($path = '') + * @method static string schemaPath($path = '') + * @method static string publicPath($path = '') + * @method static string storagePath($path = '') + * @method static string appPath() + * @method static string basePath() + * @method static string configPath($path = '') + * @method static bool runningInConsole() + * @method static bool hasBeenBootstrapped() + * @method static bool isBooted() + * @method static object|string make($abstract, array $parameters = []) + * @method static string getLocale() + * @method static string currentLocale() + * @method static string getFallbackLocale() + * @method static void setLocale($locale) + * @method static void setFallbackLocale($fallbackLocale) + * @method static bool isLocale($locale) + * * @see \Phaseolies\Application */ - -use Phaseolies\Facade\BaseFacade; - class App extends BaseFacade { protected static function getFacadeAccessor() diff --git a/src/Phaseolies/Support/Facades/Cache.php b/src/Phaseolies/Support/Facades/Cache.php index 5309f4d8..b51297d4 100644 --- a/src/Phaseolies/Support/Facades/Cache.php +++ b/src/Phaseolies/Support/Facades/Cache.php @@ -2,36 +2,39 @@ namespace Phaseolies\Support\Facades; +use Closure; +use Phaseolies\Facade\BaseFacade; +use Phaseolies\Cache\Lock\AtomicLock; + /** - * @method static \Phaseolies\Cache\CacheStore get($key, $default = null): mixed - * @method static \Phaseolies\Cache\CacheStore set($key, $value, $ttl = null): bool - * @method static \Phaseolies\Cache\CacheStore delete($key): bool - * @method static \Phaseolies\Cache\CacheStore clear(): bool - * @method static \Phaseolies\Cache\CacheStore getMultiple($keys, $default = null): iterable - * @method static \Phaseolies\Cache\CacheStore setMultiple($values, $ttl = null): bool - * @method static \Phaseolies\Cache\CacheStore deleteMultiple($keys): bool - * @method static \Phaseolies\Cache\CacheStore has($key): bool - * @method static \Phaseolies\Cache\CacheStore increment($key, $value = 1): int|bool - * @method static \Phaseolies\Cache\CacheStore decrement($key, $value = 1): int|bool - * @method static \Phaseolies\Cache\CacheStore forever($key, $value): bool - * @method static \Phaseolies\Cache\CacheStore forget($key) - * @method static \Phaseolies\Cache\CacheStore stash(string $key, $ttl, Closure $callback): mixed - * @method static \Phaseolies\Cache\CacheStore stashForever(string $key, Closure $callback): mixed - * @method static \Phaseolies\Cache\CacheStore stashWhen(string $key, Closure $callback, bool $condition, $ttl = null): mixed - * @method static locked(string $name, int $seconds = 10, ?string $owner = null): AtomicLock - * @method static restoreLock(string $name, string $owner): AtomicLock - * @method static \Phaseolies\Cache\Lock\AtomicLock get(): bool - * @method static \Phaseolies\Cache\Lock\AtomicLock block(int $seconds): bool - * @method static \Phaseolies\Cache\Lock\AtomicLock release(): bool - * @method static \Phaseolies\Cache\Lock\AtomicLock owner(): string - * @method static \Phaseolies\Cache\Lock\AtomicLock isOwnedByCurrentProcess(): bool - * @method static \Phaseolies\Cache\Lock\AtomicLock getOwner(): string - * @method static \Phaseolies\Cache\Lock\AtomicLock getName(): string + * @method static mixed get($key, $default = null) + * @method static bool set($key, $value, $ttl = null) + * @method static bool delete($key) + * @method static bool clear() + * @method static iterable getMultiple($keys, $default = null) + * @method static bool setMultiple($values, $ttl = null) + * @method static bool deleteMultiple($keys) + * @method static bool has($key) + * @method static int|bool increment($key, $value = 1) + * @method static int|bool decrement($key, $value = 1) + * @method static bool forever($key, $value) + * @method static bool forget($key) + * @method static mixed stash(string $key, $ttl, Closure $callback) + * @method static mixed stashForever(string $key, Closure $callback) + * @method static mixed stashWhen(string $key, Closure $callback, bool $condition, $ttl = null) + * @method static AtomicLock locked(string $name, int $seconds = 10, ?string $owner = null) + * @method static AtomicLock restoreLock(string $name, string $owner) + * @method static bool get() + * @method static bool block(int $seconds) + * @method static bool release() + * @method static string owner() + * @method static bool isOwnedByCurrentProcess() + * @method static string getOwner() + * @method static string getName() + * * @see \Phaseolies\Cache\CacheStore + * @see \Phaseolies\Cache\Lock\AtomicLock */ - -use Phaseolies\Facade\BaseFacade; - class Cache extends BaseFacade { protected static function getFacadeAccessor() diff --git a/src/Phaseolies/Support/Facades/Config.php b/src/Phaseolies/Support/Facades/Config.php index 889434f4..768107ce 100644 --- a/src/Phaseolies/Support/Facades/Config.php +++ b/src/Phaseolies/Support/Facades/Config.php @@ -2,15 +2,16 @@ namespace Phaseolies\Support\Facades; +use Phaseolies\Facade\BaseFacade; + /** - * @method static \Phaseolies\Config\Config set(string $key, mixed $value): void - * @method static \Phaseolies\Config\Config get(string $key, mixed $default = null): mixed - * @method static \Phaseolies\Config\Config all(): array - * @method static \Phaseolies\Config\Config clearCache(): void + * @method static void set(string $key, mixed $value) + * @method static mixed get(string $key, mixed $default = null) + * @method static array all() + * @method static void clearCache() + * * @see \Phaseolies\Config\Config */ -use Phaseolies\Facade\BaseFacade; - class Config extends BaseFacade { protected static function getFacadeAccessor() diff --git a/src/Phaseolies/Support/Facades/Cookie.php b/src/Phaseolies/Support/Facades/Cookie.php index 5fb2477e..cfb4a972 100644 --- a/src/Phaseolies/Support/Facades/Cookie.php +++ b/src/Phaseolies/Support/Facades/Cookie.php @@ -2,19 +2,20 @@ namespace Phaseolies\Support\Facades; +use Phaseolies\Facade\BaseFacade; +use Phaseolies\Http\Response\Cookie as BrowserCookie; + /** - * @method static \Phaseolies\Support\CookieJar make(string $name, ?string $value = null, array $options = []): Cookie - * @method static \Phaseolies\Support\CookieJar get(string $key, $default = null) - * @method static \Phaseolies\Support\CookieJar has(string $key): bool - * @method static \Phaseolies\Support\CookieJar store($name, $value = null, array $options = []): bool - * @method static \Phaseolies\Support\CookieJar remove(string $name, array $options = []): void - * @method static \Phaseolies\Support\CookieJar forever(string $name, string $value, array $options = []): void - * @method static \Phaseolies\Support\CookieJar all(bool $decodeValues = true): array + * @method static BrowserCookie make(string $name, ?string $value = null, array $options = []) + * @method static mixed get(string $key, $default = null) + * @method static bool has(string $key) + * @method static bool store($name, $value = null, array $options = []) + * @method static void remove(string $name, array $options = []) + * @method static void forever(string $name, string $value, array $options = []) + * @method static array all(bool $decodeValues = true) + * * @see \Phaseolies\Support\CookieJar */ - -use Phaseolies\Facade\BaseFacade; - class Cookie extends BaseFacade { protected static function getFacadeAccessor() diff --git a/src/Phaseolies/Support/Facades/Crypt.php b/src/Phaseolies/Support/Facades/Crypt.php index 2eadbf17..a62a7a1d 100644 --- a/src/Phaseolies/Support/Facades/Crypt.php +++ b/src/Phaseolies/Support/Facades/Crypt.php @@ -2,13 +2,14 @@ namespace Phaseolies\Support\Facades; +use Phaseolies\Facade\BaseFacade; + /** - * @method static \Phaseolies\Support\Encryption encrypt(mixed $payload): string - * @method static \Phaseolies\Support\Encryption decrypt(string $payload): string + * @method static string encrypt(mixed $payload) + * @method static mixed decrypt(string $payload) + * * @see \Phaseolies\Support\Encryption */ -use Phaseolies\Facade\BaseFacade; - class Crypt extends BaseFacade { protected static function getFacadeAccessor() diff --git a/src/Phaseolies/Support/Facades/DB.php b/src/Phaseolies/Support/Facades/DB.php index 15865fe5..bc62ecae 100644 --- a/src/Phaseolies/Support/Facades/DB.php +++ b/src/Phaseolies/Support/Facades/DB.php @@ -2,38 +2,44 @@ namespace Phaseolies\Support\Facades; +use PDO; +use PDOStatement; +use Phaseolies\Facade\BaseFacade; +use Phaseolies\Database\Query\Builder; +use Phaseolies\Database\Entity\Model; +use Phaseolies\Support\Collection; + /** - * @method static getPdoInstance(?string $connection = null): PDO - * @method static beginTransaction(): void - * @method static commit(): void - * @method static rollBack(): void - * @method static transaction(\Closure $callback, int $attempts = 1) - * @method static transactionLevel(): int - * @method static getTableColumns(?string $table = null): array - * @method static dropAllTables(): int - * @method static table(string $table): Builder - * @method static getTables(): array - * @method static tableExists(string $table): bool - * @method static getTable(Model $model): string - * @method static getConnection(): PDO - * @method static procedure(string $procedureName,array $params = [],array $outputParams = []): \Phaseolies\Support\Collection - * @method static view(string $viewName, array $where = [], array $params = []): array - * @method static query(string $sql, array $params = []): \Phaseolies\Support\Collection - * @method static execute(string $sql, array $params = []): int - * @method static statement(string $sql, array $params = []): \PDOStatement - * @method static connection(?string $name = null): self - * @method static bucket(string $table): \Phaseolies\Database\Entity\Query\Builder - * @method static disconnect(?string $connection = null): bool - * @method static reconnect(?string $connection = null): PDO - * @method static isConnected(?string $connection = null): bool - * @method static getFreshConnection(?string $connection = null): PDO - * @method static cleanupAllConnections(): void + * @method static PDO getPdoInstance(?string $connection = null) + * @method static void beginTransaction() + * @method static void commit() + * @method static void rollBack() + * @method static mixed transaction(\Closure $callback, int $attempts = 1) + * @method static int transactionLevel() + * @method static array getTableColumns(?string $table = null) + * @method static int dropAllTables() + * @method static Builder table(string $table) + * @method static array getTables() + * @method static bool tableExists(string $table) + * @method static string getTable(Model $model) + * @method static PDO getConnection() + * @method static \Phaseolies\Database\Procedure\ProcedureResult procedure(string $procedureName,array $params = [],array $outputParams = []) + * @method static array view(string $viewName, array $where = [], array $params = []) + * @method static Collection query(string $sql, array $params = []) + * @method static int execute(string $sql, array $params = []) + * @method static PDOStatement statement(string $sql, array $params = []) + * @method static \Phaseolies\Database\Database connection(?string $name = null) + * @method static \Phaseolies\Database\Entity\Query\Builder bucket(string $table) + * @method static bool disconnect(?string $connection = null) + * @method static PDO reconnect(?string $connection = null) + * @method static bool isConnected(?string $connection = null) + * @method static PDO getFreshConnection(?string $connection = null) + * @method static void cleanupAllConnections() + * @method static void disableForeignKeyConstraints() + * @method static void enableForeignKeyConstraints() * * @see \Phaseolies\Database\Database */ - -use Phaseolies\Facade\BaseFacade; - class DB extends BaseFacade { protected static function getFacadeAccessor() diff --git a/src/Phaseolies/Support/Facades/Hash.php b/src/Phaseolies/Support/Facades/Hash.php index 304c0636..9a651699 100644 --- a/src/Phaseolies/Support/Facades/Hash.php +++ b/src/Phaseolies/Support/Facades/Hash.php @@ -2,15 +2,15 @@ namespace Phaseolies\Support\Facades; +use Phaseolies\Facade\BaseFacade; + /** - * @method static \Phaseolies\Auth\Security\PasswordHashing make(string $plainText) - * @method static \Phaseolies\Auth\Security\PasswordHashing check(string $plainText, string $hashedText) - * @method static \Phaseolies\Auth\Security\PasswordHashing needsRehash(string $password) + * @method static string make(string $plainText) + * @method static bool check(string $plainText, string $hashedText) + * @method static bool needsRehash(string $password) + * * @see \Phaseolies\Auth\Security\PasswordHashing */ - -use Phaseolies\Facade\BaseFacade; - class Hash extends BaseFacade { protected static function getFacadeAccessor() diff --git a/src/Phaseolies/Support/Facades/Lang.php b/src/Phaseolies/Support/Facades/Lang.php index ad33bf3b..bd7109bf 100644 --- a/src/Phaseolies/Support/Facades/Lang.php +++ b/src/Phaseolies/Support/Facades/Lang.php @@ -2,19 +2,20 @@ namespace Phaseolies\Support\Facades; +use Phaseolies\Facade\BaseFacade; + /** - * @method static \Phaseolies\Translation\Translator trans($key, array $replace = [], $locale = null) - * @method static \Phaseolies\Translation\Translator get($key, array $replace = [], $locale = null) - * @method static \Phaseolies\Application makeReplacements($line, array $replace) - * @method static \Phaseolies\Application load($namespace, $group, $locale) - * @method static \Phaseolies\Application setLocale($locale) - * @method static \Phaseolies\Application getLocale() - * @method static \Phaseolies\Application setFallback($fallback) - * @method static \Phaseolies\Application getFallback() + * @method static string trans($key, array $replace = [], $locale = null) + * @method static string get($key, array $replace = [], $locale = null) + * @method static string makeReplacements($line, array $replace) + * @method static array load(string $locale, string $group, ?string $namespace = null) + * @method static void setLocale($locale) + * @method static string getLocale() + * @method static void setFallback($fallback) + * @method static string getFallback() + * * @see \Phaseolies\Translation\Translator */ -use Phaseolies\Facade\BaseFacade; - class Lang extends BaseFacade { protected static function getFacadeAccessor() diff --git a/src/Phaseolies/Support/Facades/Log.php b/src/Phaseolies/Support/Facades/Log.php index 57a26ac1..a0a12293 100644 --- a/src/Phaseolies/Support/Facades/Log.php +++ b/src/Phaseolies/Support/Facades/Log.php @@ -2,20 +2,20 @@ namespace Phaseolies\Support\Facades; +use Phaseolies\Facade\BaseFacade; + /** - * @method static \Phaseolies\Support\LoggerService debug(mixed $message, array $context = []) - * @method static \Phaseolies\Support\LoggerService info(mixed $message, array $context = []) - * @method static \Phaseolies\Support\LoggerService notice(mixed $message, array $context = []) - * @method static \Phaseolies\Support\LoggerService warning(mixed $message, array $context = []) - * @method static \Phaseolies\Support\LoggerService error(mixed $message, array $context = []) - * @method static \Phaseolies\Support\LoggerService critical(mixed $message, array $context = []) - * @method static \Phaseolies\Support\LoggerService alert(mixed $message, array $context = []) - * @method static \Phaseolies\Support\LoggerService emergency(mixed $message, array $context = []) + * @method static void debug(mixed $message, array $context = []) + * @method static void info(mixed $message, array $context = []) + * @method static void notice(mixed $message, array $context = []) + * @method static void warning(mixed $message, array $context = []) + * @method static void error(mixed $message, array $context = []) + * @method static void critical(mixed $message, array $context = []) + * @method static void alert(mixed $message, array $context = []) + * @method static void emergency(mixed $message, array $context = []) + * * @see \Phaseolies\Support\LoggerService */ - -use Phaseolies\Facade\BaseFacade; - class Log extends BaseFacade { protected static function getFacadeAccessor() diff --git a/src/Phaseolies/Support/Facades/Mail.php b/src/Phaseolies/Support/Facades/Mail.php index 9a2be00b..7d37bca0 100644 --- a/src/Phaseolies/Support/Facades/Mail.php +++ b/src/Phaseolies/Support/Facades/Mail.php @@ -2,6 +2,8 @@ namespace Phaseolies\Support\Facades; +use Phaseolies\Facade\BaseFacade; + /** * @method static \Phaseolies\Support\Mail\MailService to(\Phaseolies\Database\Entity\Model|string|array $recipient, string|null $name = null) * @method static \Phaseolies\Support\Mail\MailService cc(string|array $cc) @@ -9,11 +11,9 @@ * @method static \Phaseolies\Support\Mail\MailService driver(\Symfony\Component\Mailer\Transport\TransportInterface|string $transport) * @method static \Symfony\Component\Mailer\SentMessage send(\Phaseolies\Support\Mail\Mailable $mailable) * @method static \Symfony\Component\Mailer\SentMessage deliver(\Phaseolies\Support\Mail\Mailable $mailable) + * * @see \Phaseolies\Support\Mail\MailService */ - -use Phaseolies\Facade\BaseFacade; - class Mail extends BaseFacade { protected static function getFacadeAccessor() diff --git a/src/Phaseolies/Support/Facades/Pool.php b/src/Phaseolies/Support/Facades/Pool.php index 1bf1458d..d0f0d2c9 100644 --- a/src/Phaseolies/Support/Facades/Pool.php +++ b/src/Phaseolies/Support/Facades/Pool.php @@ -2,15 +2,15 @@ namespace Phaseolies\Support\Facades; +use Phaseolies\Facade\BaseFacade; + /** - * @method static \Phaseolies\Console\Schedule\SchedulePool call(string $command, bool $background = true): array - * @method static \Phaseolies\Console\Schedule\SchedulePool isProcessRunning(int $pid): bool - * @method static \Phaseolies\Console\Schedule\SchedulePool getRunningProcesses(): array + * @method static array call(string $command, bool $background = true) + * @method static bool isProcessRunning(int $pid) + * @method static array getRunningProcesses() + * * @see \Phaseolies\Console\Schedule\SchedulePool */ - -use Phaseolies\Facade\BaseFacade; - class Pool extends BaseFacade { protected static function getFacadeAccessor() diff --git a/src/Phaseolies/Support/Facades/Redirect.php b/src/Phaseolies/Support/Facades/Redirect.php index b20641fc..a1101cf4 100644 --- a/src/Phaseolies/Support/Facades/Redirect.php +++ b/src/Phaseolies/Support/Facades/Redirect.php @@ -2,18 +2,18 @@ namespace Phaseolies\Support\Facades; -/** - * @method static \Phaseolies\Http\RedirectResponse to(string $url, int $statusCode = 302) - * @method static \Phaseolies\Http\RedirectResponse back() - * @method static \Phaseolies\Http\RedirectResponse withInput() - * @method static \Phaseolies\Http\RedirectResponse route(string $name, array $params = []) - * @method static \Phaseolies\Http\RedirectResponse withErrors(array $errors) - * @method static \Phaseolies\Http\RedirectResponse away(string $url, int $statusCode = 302) - * @see \Phaseolies\Http\RedirectResponse - */ - use Phaseolies\Facade\BaseFacade; +/** + * @method static \Phaseolies\Http\Response\RedirectResponse to(string $url, int $statusCode = 302) + * @method static \Phaseolies\Http\Response\RedirectResponse back() + * @method static \Phaseolies\Http\Response\RedirectResponse withInput() + * @method static \Phaseolies\Http\Response\RedirectResponse route(string $name, array $params = []) + * @method static \Phaseolies\Http\Response\RedirectResponse withErrors(array $errors) + * @method static \Phaseolies\Http\Response\RedirectResponse away(string $url, int $statusCode = 302) + * + * @see \Phaseolies\Http\Response\RedirectResponse + */ class Redirect extends BaseFacade { protected static function getFacadeAccessor() diff --git a/src/Phaseolies/Support/Facades/Route.php b/src/Phaseolies/Support/Facades/Route.php index 482e9bd8..af4819eb 100644 --- a/src/Phaseolies/Support/Facades/Route.php +++ b/src/Phaseolies/Support/Facades/Route.php @@ -15,16 +15,16 @@ * @method static \Phaseolies\Support\Router any(string $uri, array|string|callable|null $callback) * @method static void group(array $attributes, \Closure $callback) * @method static \Phaseolies\Support\Router redirect(string $uri, string $destination, int $status = 302) - * @method static \Phaseolies\Support\Router bundle(string $uri, string $controller, array $options = []): void - * @method static \Phaseolies\Support\Router apiBundle(string $uri, string $controller, array $options = []): void - * @method static \Phaseolies\Support\Router nestedBundle(string $parent, string $child, string $controller, array $options = []): void - * @method static \Phaseolies\Support\Router getCurrentMiddlewareNames(): ?array - * @method static \Phaseolies\Support\Router getRouteNames(): ?array - * @method static \Phaseolies\Support\Router has(string $name): bool - * @method static \Phaseolies\Support\Router is(string $name): bool - * @method static \Phaseolies\Support\Router currentRouteName(): ?string - * @method static \Phaseolies\Support\Router currentRouteAction(): string|array|null - * @method static \Phaseolies\Support\Router currentRouteUsesController(string $controllerClass): bool + * @method static void bundle(string $uri, string $controller, array $options = []) + * @method static void apiBundle(string $uri, string $controller, array $options = []) + * @method static void nestedBundle(string $parent, string $child, string $controller, array $options = []) + * @method static array|null getCurrentMiddlewareNames() + * @method static array|null getRouteNames() + * @method static bool has(string $name) + * @method static bool is(string $name) + * @method static string|null currentRouteName() + * @method static string|array|null currentRouteAction() + * @method static bool currentRouteUsesController(string $controllerClass): bool * * @see \Phaseolies\Support\Router */ diff --git a/src/Phaseolies/Support/Facades/Sanitize.php b/src/Phaseolies/Support/Facades/Sanitize.php index f2647f8b..b9e123f1 100644 --- a/src/Phaseolies/Support/Facades/Sanitize.php +++ b/src/Phaseolies/Support/Facades/Sanitize.php @@ -2,18 +2,18 @@ namespace Phaseolies\Support\Facades; +use Phaseolies\Facade\BaseFacade; + /** * @method static \Phaseolies\Support\Validation\Sanitizer request(array $data, array $rules) - * @method static \Phaseolies\Support\Validation\Sanitizer validate() - * @method static \Phaseolies\Support\Validation\Sanitizer fails() - * @method static \Phaseolies\Support\Validation\Sanitizer errors() - * @method static \Phaseolies\Support\Validation\Sanitizer passed() - * @method static \Phaseolies\Support\Validation\Sanitizer errors() + * @method static bool validate() + * @method static bool fails() + * @method static array errors() + * @method static array passed() + * @method static array errors() + * * @see \Phaseolies\Support\Validation\Sanitizer */ - -use Phaseolies\Facade\BaseFacade; - class Sanitize extends BaseFacade { protected static function getFacadeAccessor() diff --git a/src/Phaseolies/Support/Facades/Schema.php b/src/Phaseolies/Support/Facades/Schema.php index edcd4a56..7e69ecdb 100644 --- a/src/Phaseolies/Support/Facades/Schema.php +++ b/src/Phaseolies/Support/Facades/Schema.php @@ -2,19 +2,18 @@ namespace Phaseolies\Support\Facades; +use Phaseolies\Facade\BaseFacade; + /** - * @method static \Phaseolies\Database\Migration\Schema create(string $table, callable $callback): void - * @method static \Phaseolies\Database\Migration\Schema table(string $table, callable $callback): void - * @method static \Phaseolies\Database\Migration\Schema dropIfExists(string $table): void - * @method static \Phaseolies\Database\Migration\Schema hasTable(string $table): bool - * @method static \Phaseolies\Database\Migration\Schema disableForeignKeyConstraints(): void - * @method static \Phaseolies\Database\Migration\Schema enableForeignKeyConstraints(): void + * @method static void create(string $table, callable $callback) + * @method static void table(string $table, callable $callback) + * @method static void dropIfExists(string $table) + * @method static bool hasTable(string $table) + * @method static void disableForeignKeyConstraints() + * @method static void enableForeignKeyConstraints() * * @see \Phaseolies\Database\Migration\Schema */ - -use Phaseolies\Facade\BaseFacade; - class Schema extends BaseFacade { protected static function getFacadeAccessor() diff --git a/src/Phaseolies/Support/Facades/Session.php b/src/Phaseolies/Support/Facades/Session.php index 1005d5cf..fcc1de1d 100644 --- a/src/Phaseolies/Support/Facades/Session.php +++ b/src/Phaseolies/Support/Facades/Session.php @@ -2,32 +2,31 @@ namespace Phaseolies\Support\Facades; +use Phaseolies\Facade\BaseFacade; + /** - * @method static get(string $key, $default = null) - * @method static pull(string $key, $default = null) - * @method static getPeek(string $key, $default = null) - * @method static putPeek(string $key, $value): void - * @method static flushPeek(): void - * @method static put(string|array $key, $value = null): void - * @method static has(string $key): bool - * @method static forget(string $key): void - * @method static flush(): void - * @method static regenerate(bool $deleteOldSession = true): void - * @method static all(): array - * @method static getId(): string - * @method static setId(string $id): void - * @method static destroy(): void - * @method static token(): ?string - * @method static flash(string $key, $value): void - * @method static reflash($keys): void - * @method static invalidate(): void - * @method static regenerateToken(): void + * @method static mixed get(string $key, $default = null) + * @method static mixed pull(string $key, $default = null) + * @method static mixed getPeek(string $key, $default = null) + * @method static void putPeek(string $key, $value) + * @method static void flushPeek() + * @method static void put(string|array $key, $value = null) + * @method static bool has(string $key) + * @method static void forget(string $key) + * @method static void flush() + * @method static void regenerate(bool $deleteOldSession = true) + * @method static array all() + * @method static string getId() + * @method static void setId(string $id) + * @method static void destroy() + * @method static ?string token() + * @method static void flash(string $key, $value) + * @method static void reflash($keys) + * @method static void invalidate() + * @method static void regenerateToken() * * @see \Phaseolies\Support\Session */ - -use Phaseolies\Facade\BaseFacade; - class Session extends BaseFacade { protected static function getFacadeAccessor() diff --git a/src/Phaseolies/Support/Facades/Storage.php b/src/Phaseolies/Support/Facades/Storage.php index 45afdcc8..05ab8050 100644 --- a/src/Phaseolies/Support/Facades/Storage.php +++ b/src/Phaseolies/Support/Facades/Storage.php @@ -2,14 +2,14 @@ namespace Phaseolies\Support\Facades; +use Phaseolies\Facade\BaseFacade; + /** - * @method static \Phaseolies\Support\Storage\StorageFileService disk(?string $name = null) - * @method static string|null getDiskPath(string $disk) + * @method static mixed disk(?string $name = null) + * @method static ?string getDiskPath(string $disk) + * * @see \Phaseolies\Support\Storage\StorageFileService */ - -use Phaseolies\Facade\BaseFacade; - class Storage extends BaseFacade { protected static function getFacadeAccessor() diff --git a/src/Phaseolies/Support/Facades/Str.php b/src/Phaseolies/Support/Facades/Str.php index 8a906550..b54f5f7d 100644 --- a/src/Phaseolies/Support/Facades/Str.php +++ b/src/Phaseolies/Support/Facades/Str.php @@ -2,43 +2,42 @@ namespace Phaseolies\Support\Facades; +use Phaseolies\Facade\BaseFacade; + /** - * @method static \Phaseolies\Support\StringService substr(string $input, int $start, ?int $length = null): string - * @method static \Phaseolies\Support\StringService len(string $input): int - * @method static \Phaseolies\Support\StringService count_word(string $string): int - * @method static \Phaseolies\Support\StringService isPalindrome(string $string): bool - * @method static \Phaseolies\Support\StringService random(int $length = 10): string - * @method static \Phaseolies\Support\StringService camel(string $input): string - * @method static \Phaseolies\Support\StringService mask(string $string,int $visibleFromStart = 1,int $visibleFromEnd = 1,string $maskCharacter = '*' ): string - * @method static \Phaseolies\Support\StringService truncate(string $string, int $maxLength, string $suffix = '...'): string - * @method static \Phaseolies\Support\StringService snake(string $input): string - * @method static \Phaseolies\Support\StringService title(string $input): string - * @method static \Phaseolies\Support\StringService slug(string $input, string $separator = '-'): string - * @method static \Phaseolies\Support\StringService contains(string $haystack, string $needle): bool - * @method static \Phaseolies\Support\StringService limitWords(string $string, int $words, string $end = '...'): string - * @method static \Phaseolies\Support\StringService remove_white_space(string $input): string - * @method static \Phaseolies\Support\StringService uuid(): string - * @method static \Phaseolies\Support\StringService startsWith(string $haystack, string $needle): bool - * @method static \Phaseolies\Support\StringService endsWith(string $haystack, string $needle): bool - * @method static \Phaseolies\Support\StringService studly(string $input): string - * @method static \Phaseolies\Support\StringService reverse(string $input): string - * @method static \Phaseolies\Support\StringService extractNumbers(string $input): string - * @method static \Phaseolies\Support\StringService longestCommonSubstring(string $str1, string $str2): string - * @method static \Phaseolies\Support\StringService leetSpeak(string $input): string - * @method static \Phaseolies\Support\StringService extractEmails(string $input): array - * @method static \Phaseolies\Support\StringService highlightKeyword(string $input, string $keyword, string $tag = 'strong'): string - * @method static \Phaseolies\Support\StringService suffixAppend(string $input, string $suffix): string - * @method static \Phaseolies\Support\StringService removeSuffix(string $input, string $suffix): string - * @method static \Phaseolies\Support\StringService after(string $subject, string $search): string - * @method static \Phaseolies\Support\StringService before(string $subject, string $search): string - * @method static \Phaseolies\Support\StringService between(string $subject, string $from, string $to): string - * @method static \Phaseolies\Support\StringService isJson(string $value): string - * @method static \Phaseolies\Support\StringService urlHarmonize(string $url): string + * @method static string substr(string $input, int $start, ?int $length = null) + * @method static int len(string $input) + * @method static int countWord(string $string) + * @method static bool isPalindrome(string $string) + * @method static string random(int $length = 10) + * @method static string camel(string $input) + * @method static string mask(string $string,int $visibleFromStart = 1,int $visibleFromEnd = 1,string $maskCharacter = '*' ) + * @method static string truncate(string $string, int $maxLength, string $suffix = '...') + * @method static string snake(string $input) + * @method static string title(string $input) + * @method static string slug(string $input, string $separator = '-') + * @method static bool contains(string $haystack, string|array $needles, bool $ignoreCase = true) + * @method static string limitWords(string $string, int $words, string $end = '...') + * @method static string removeWhiteSpace(string $input) + * @method static string uuid() + * @method static bool startsWith(string $haystack, string|array $needles) + * @method static bool endsWith(string $haystack, string|array $needles, string $encoding = 'UTF-8') + * @method static string studly(string $input) + * @method static string reverse(string $input) + * @method static string extractNumbers(string $input) + * @method static string longestCommonSubstring(string $str1, string $str2) + * @method static string leetSpeak(string $input) + * @method static array extractEmails(string $input) + * @method static string highlightKeyword(string $input, string $keyword, string $tag = 'strong') + * @method static string suffixAppend(string $input, string $suffix) + * @method static string removeSuffix(string $input, string $suffix) + * @method static string after(string $subject, string $search) + * @method static string before(string $subject, string $search) + * @method static string between(string $subject, string $from, string $to) + * @method static bool isJson(string $value) + * @method static string urlHarmonize(string $url) * @see \Phaseolies\Support\StringService */ - -use Phaseolies\Facade\BaseFacade; - class Str extends BaseFacade { protected static function getFacadeAccessor() diff --git a/src/Phaseolies/Support/Facades/URL.php b/src/Phaseolies/Support/Facades/URL.php index 533a6ba3..99635aaa 100644 --- a/src/Phaseolies/Support/Facades/URL.php +++ b/src/Phaseolies/Support/Facades/URL.php @@ -2,25 +2,25 @@ namespace Phaseolies\Support\Facades; +use Phaseolies\Facade\BaseFacade; + /** - * @method static \Phaseolies\Support\UrlGenerator enqueue(string $path = '/', $secure = null) - * @method static \Phaseolies\Support\UrlGenerator full() - * @method static \Phaseolies\Support\UrlGenerator current() - * @method static \Phaseolies\Support\UrlGenerator route($name, array $parameters = [], $secure = null) + * @method static string enqueue(string $path = '/', $secure = null) + * @method static string full() + * @method static string current() + * @method static string route(string $name, array|string|int $parameters = [], ?bool $secure = null) * @method static \Phaseolies\Support\UrlGenerator to($path = '/') - * @method static \Phaseolies\Support\UrlGenerator withQuery(array $query = []) + * @method static \Phaseolies\Support\UrlGenerator withQuery(array|string $query = []) * @method static \Phaseolies\Support\UrlGenerator withSignature($expiration = 3600) * @method static \Phaseolies\Support\UrlGenerator withFragment($fragment = '') - * @method static \Phaseolies\Support\UrlGenerator make() - * @method static \Phaseolies\Support\UrlGenerator signed($path = '/', array $parameters = [], $expiration = 3600, $secure = null) - * @method static \Phaseolies\Support\UrlGenerator isValid(string $url) - * @method static \Phaseolies\Support\UrlGenerator base(string $url) + * @method static string make() + * @method static string signed(string $path = '/', array|string|int $parameters = [], int $expiration = 3600, ?bool $secure = null) + * @method static bool isValid(string $url) + * @method static string base() * @method static \Phaseolies\Support\UrlGenerator setSecure(bool $secure) + * * @see \Phaseolies\Support\UrlGenerator */ - -use Phaseolies\Facade\BaseFacade; - class URL extends BaseFacade { protected static function getFacadeAccessor()