Skip to content

Commit

Permalink
Merge pull request #95 from niden/master
Browse files Browse the repository at this point in the history
5.5.0
  • Loading branch information
niden authored Dec 25, 2023
2 parents 7e4560a + 56bf6f7 commit 6e3c59e
Show file tree
Hide file tree
Showing 155 changed files with 472 additions and 470 deletions.
6 changes: 3 additions & 3 deletions src/Acl/Adapter/AbstractAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ abstract class AbstractAdapter extends AbstractEventsAware implements \Phalcon\A
*
* @return string|null
*/
public function getActiveAccess(): ?string
public function getActiveAccess(): string|null
{
}

Expand All @@ -68,7 +68,7 @@ public function getActiveAccess(): ?string
*
* @return string|null
*/
public function getActiveComponent(): ?string
public function getActiveComponent(): string|null
{
}

Expand All @@ -78,7 +78,7 @@ public function getActiveComponent(): ?string
*
* @return string|null
*/
public function getActiveRole(): ?string
public function getActiveRole(): string|null
{
}

Expand Down
6 changes: 3 additions & 3 deletions src/Acl/Adapter/AdapterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,23 +93,23 @@ public function dropComponentAccess(string $componentName, $accessList): void;
*
* @return string|null
*/
public function getActiveAccess(): ?string;
public function getActiveAccess(): string|null;

/**
* Returns the role which the list is checking if it's allowed to certain
* component/access
*
* @return string|null
*/
public function getActiveRole(): ?string;
public function getActiveRole(): string|null;

/**
* Returns the component which the list is checking if some role can access
* it
*
* @return string|null
*/
public function getActiveComponent(): ?string;
public function getActiveComponent(): string|null;

/**
* Return an array with every component registered in the list
Expand Down
7 changes: 4 additions & 3 deletions src/Acl/Adapter/Memory.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ public function addRole($role, $accessInherits = null): bool
*
* // Allow access to any role to browse on any component
* $acl->allow("", "", "browse");
* ```
*
* @param string $roleName
* @param string $componentName
Expand Down Expand Up @@ -328,7 +329,7 @@ public function dropComponentAccess(string $componentName, $accessList): void
*
* @return mixed
*/
public function getActiveFunction()
public function getActiveFunction(): mixed
{
}

Expand All @@ -346,7 +347,7 @@ public function getActiveFunctionCustomArgumentsCount(): int
*
* @return string|null
*/
public function getActiveKey(): ?string
public function getActiveKey(): string|null
{
}

Expand Down Expand Up @@ -465,7 +466,7 @@ private function allowOrDeny(string $roleName, string $componentName, $access, $
* @param string $access
* @return string|bool
*/
private function canAccess(string $roleName, string $componentName, string $access)
private function canAccess(string $roleName, string $componentName, string $access): bool|string
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/Annotations/Adapter/Apcu.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function __construct(array $options = [])
* @param string $key
* @return bool|Reflection
*/
public function read(string $key)
public function read(string $key): Reflection|bool
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/Annotations/Adapter/Memory.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Memory extends \Phalcon\Annotations\Adapter\AbstractAdapter
* @param string $key
* @return bool|Reflection
*/
public function read(string $key)
public function read(string $key): Reflection|bool
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/Annotations/Adapter/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function __construct(array $options = [])
* @param string $key
* @return bool|int|Reflection
*/
public function read(string $key)
public function read(string $key): Reflection|int|bool
{
}

Expand Down
10 changes: 5 additions & 5 deletions src/Annotations/Annotation.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function __construct(array $reflectionData)
* @param mixed $position
* @return mixed|null
*/
public function getArgument($position)
public function getArgument($position): mixed
{
}

Expand Down Expand Up @@ -78,7 +78,7 @@ public function getExprArguments(): array
* @param array $expr
* @return mixed
*/
public function getExpression(array $expr)
public function getExpression(array $expr): mixed
{
}

Expand All @@ -87,7 +87,7 @@ public function getExpression(array $expr)
*
* @return string|null
*/
public function getName(): ?string
public function getName(): string|null
{
}

Expand All @@ -97,7 +97,7 @@ public function getName(): ?string
* @param string $name
* @return mixed|null
*/
public function getNamedArgument(string $name)
public function getNamedArgument(string $name): mixed
{
}

Expand All @@ -107,7 +107,7 @@ public function getNamedArgument(string $name)
* @param string $name
* @return mixed
*/
public function getNamedParameter(string $name)
public function getNamedParameter(string $name): mixed
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/Annotations/AnnotationsFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct(array $services = [])
* Factory to create an instance from a Config object
* @return mixed
*/
public function load($config)
public function load($config): mixed
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/Annotations/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function count(): int
*
* @return mixed
*/
public function current()
public function current(): mixed
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/Annotations/Reflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function __construct(array $reflectionData = [])
*
* @return Collection|null
*/
public function getClassAnnotations(): ?Collection
public function getClassAnnotations(): Collection|null
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Application/AbstractApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function getDefaultModule(): string
*
* @return ManagerInterface|null
*/
public function getEventsManager(): ?ManagerInterface
public function getEventsManager(): ManagerInterface|null
{
}

Expand All @@ -72,7 +72,7 @@ public function getEventsManager(): ?ManagerInterface
* @param string $name *
* @return array|mixed
*/
public function getModule(string $name)
public function getModule(string $name): object|array
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/Assets/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public function getType(): string
*
* @return string|null
*/
public function getVersion(): ?string
public function getVersion(): string|null
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/Assets/AssetInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function getAssetKey(): string;
*
* @return array|null
*/
public function getAttributes(): ?array;
public function getAttributes(): array|null;

/**
* Gets if the asset must be filtered or not.
Expand Down
2 changes: 1 addition & 1 deletion src/Assets/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public function has(string $name): bool
* @return string|null
* @throws Exception
*/
public function output(Collection $collection, string $type): ?string
public function output(Collection $collection, string $type): string|null
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Autoload/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function autoload(string $className): bool
*
* @return string|null
*/
public function getCheckedPath(): ?string
public function getCheckedPath(): string|null
{
}

Expand Down Expand Up @@ -209,7 +209,7 @@ public function getFiles(): array
*
* @return string|null
*/
public function getFoundPath(): ?string
public function getFoundPath(): string|null
{
}

Expand Down
7 changes: 5 additions & 2 deletions src/Cli/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
*/
class Dispatcher extends \Phalcon\Dispatcher\AbstractDispatcher implements \Phalcon\Cli\DispatcherInterface
{
/**
* @var string
*/
protected $defaultHandler = 'main';

/**
Expand All @@ -63,7 +66,7 @@ class Dispatcher extends \Phalcon\Dispatcher\AbstractDispatcher implements \Phal
* @param array $params
* @return mixed
*/
public function callActionMethod($handler, string $actionMethod, array $params = [])
public function callActionMethod($handler, string $actionMethod, array $params = []): mixed
{
}

Expand Down Expand Up @@ -93,7 +96,7 @@ public function getLastTask(): TaskInterface
* @param mixed $defaultValue
* @return mixed
*/
public function getOption($option, $filters = null, $defaultValue = null)
public function getOption($option, $filters = null, $defaultValue = null): mixed
{
}

Expand Down
6 changes: 3 additions & 3 deletions src/Cli/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function getActionName(): string
*
* @return RouteInterface|null
*/
public function getMatchedRoute(): ?RouteInterface
public function getMatchedRoute(): RouteInterface|null
{
}

Expand Down Expand Up @@ -182,7 +182,7 @@ public function getParameters(): array
* @param int $id
* @return bool|RouteInterface
*/
public function getRouteById($id)
public function getRouteById($id): RouteInterface|bool
{
}

Expand All @@ -192,7 +192,7 @@ public function getRouteById($id)
* @param string $name
* @return bool|RouteInterface
*/
public function getRouteByName(string $name)
public function getRouteByName(string $name): RouteInterface|bool
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Cli/Router/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public static function delimiter(string $delimiter = null): void
* @param string $pattern
* @return array|bool
*/
public function extractNamedParams(string $pattern)
public function extractNamedParams(string $pattern): bool|array
{
}

Expand All @@ -139,7 +139,7 @@ public function extractNamedParams(string $pattern)
*
* @return mixed
*/
public function getBeforeMatch()
public function getBeforeMatch(): mixed
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/Cli/RouterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function getActionName(): string;
*
* @return RouteInterface|null
*/
public function getMatchedRoute(): ?RouteInterface;
public function getMatchedRoute(): RouteInterface|null;

/**
* Return the sub expressions in the regular expression matched
Expand Down
2 changes: 1 addition & 1 deletion src/Cli/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ final public function __construct()
*
* @return ManagerInterface|null
*/
public function getEventsManager(): ?ManagerInterface
public function getEventsManager(): ManagerInterface|null
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Config/Adapter/Ini.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ public function __construct(string $filePath, int $mode = 1)
*
* @param mixed $ini
*
* @return array|float|int|mixed|string|null
* @return mixed
*/
protected function cast($ini)
protected function cast($ini): mixed
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function merge($toMerge): ConfigInterface
*
* @return mixed
*/
public function path(string $path, $defaultValue = null, string $delimiter = null)
public function path(string $path, $defaultValue = null, string $delimiter = null): mixed
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/Config/ConfigInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function merge($toMerge): ConfigInterface;
*
* @return mixed
*/
public function path(string $path, $defaultValue = null, string $delimiter = null);
public function path(string $path, $defaultValue = null, string $delimiter = null): mixed;

/**
* @param string|null $delimiter
Expand Down
Loading

0 comments on commit 6e3c59e

Please sign in to comment.