Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion system/API/TransformerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function transform(array|object|null $resource): array;
/**
* Transforms a collection of resources using $this->transform() on each item.
*
* @param array<int|string, mixed> $resources
* @param array<array-key, mixed> $resources
*
* @return array<int, array<string, mixed>>
*/
Expand Down
4 changes: 2 additions & 2 deletions system/BaseModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -1855,7 +1855,7 @@ protected function objectToRawArray($object, bool $onlyChanged = true, bool $rec
*
* @param object|row_array|null $row
*
* @return array<int|string, mixed>
* @return array<array-key, mixed>
*
* @throws DataException
* @throws InvalidArgumentException
Expand Down Expand Up @@ -1947,7 +1947,7 @@ public function __isset(string $name): bool
/**
* Provides direct access to method in the database connection.
*
* @param array<int|string, mixed> $params
* @param array<array-key, mixed> $params
*
* @return mixed
*/
Expand Down
4 changes: 2 additions & 2 deletions system/CLI/BaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function __construct(LoggerInterface $logger, Commands $commands)
/**
* Actually execute a command.
*
* @param array<int|string, string|null> $params
* @param array<array-key, string|null> $params
*
* @return int|void
*/
Expand All @@ -108,7 +108,7 @@ abstract public function run(array $params);
/**
* Can be used by a command to run other commands.
*
* @param array<int|string, string|null> $params
* @param array<array-key, string|null> $params
*
* @return int|void
*
Expand Down
24 changes: 12 additions & 12 deletions system/CLI/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@ public static function prompt(string $field, $options = null, $validation = null
/**
* prompt(), but based on the option's key
*
* @param list<string>|string $text Output "field" text or an one or two value array where the first value is the text before listing the options
* and the second value the text before asking to select one option. Provide empty string to omit
* @param array<int|string, string> $options A list of options (array(key => description)), the first option will be the default value
* @param list<string>|string|null $validation Validation rules
* @param list<string>|string $text Output "field" text or an one or two value array where the first value is the text before listing the options
* and the second value the text before asking to select one option. Provide empty string to omit
* @param array<array-key, string> $options A list of options (array(key => description)), the first option will be the default value
* @param list<string>|string|null $validation Validation rules
*
* @return string The selected key of $options
*/
Expand All @@ -302,11 +302,11 @@ public static function promptByKey($text, array $options, $validation = null): s
/**
* This method is the same as promptByKey(), but this method supports multiple keys, separated by commas.
*
* @param string $text Output "field" text or an one or two value array where the first value is the text before listing the options
* and the second value the text before asking to select one option. Provide empty string to omit
* @param array<int|string, string> $options A list of options (array(key => description)), the first option will be the default value
* @param string $text Output "field" text or an one or two value array where the first value is the text before listing the options
* and the second value the text before asking to select one option. Provide empty string to omit
* @param array<array-key, string> $options A list of options (array(key => description)), the first option will be the default value
*
* @return array<int|string, string> The selected key(s) and value(s) of $options
* @return array<array-key, string> The selected key(s) and value(s) of $options
*/
public static function promptByMultipleKeys(string $text, array $options): array
{
Expand Down Expand Up @@ -376,7 +376,7 @@ public static function promptByMultipleKeys(string $text, array $options): array
/**
* Validation for $options in promptByKey() and promptByMultipleKeys(). Return an error if $options is an empty array.
*
* @param array<int|string, string> $options
* @param array<array-key, string> $options
*/
private static function isZeroOptions(array $options): void
{
Expand All @@ -388,7 +388,7 @@ private static function isZeroOptions(array $options): void
/**
* Print each key and value one by one
*
* @param array<int|string, string> $options
* @param array<array-key, string> $options
*/
private static function printKeysAndValues(array $options): void
{
Expand Down Expand Up @@ -1029,8 +1029,8 @@ public static function getOptionString(bool $useLongOpts = false, bool $trim = f
/**
* Returns a well formatted table
*
* @param list<array<int|string, mixed>> $tbody List of rows
* @param list<string> $thead List of columns
* @param list<array<array-key, mixed>> $tbody List of rows
* @param list<string> $thead List of columns
*
* @return void
*/
Expand Down
2 changes: 1 addition & 1 deletion system/CLI/Commands.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __construct($logger = null)
/**
* Runs a command given
*
* @param array<int|string, string|null> $params
* @param array<array-key, string|null> $params
*
* @return int Exit code
*/
Expand Down
4 changes: 2 additions & 2 deletions system/CLI/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ public function showHeader(bool $suppress = false)
* We'll remove that as an option from `$params` and
* unshift it as argument instead.
*
* @param array<int|string, string|null> $params
* @param array<array-key, string|null> $params
*
* @return array<int|string, string|null>
* @return array<array-key, string|null>
*/
private function parseParamsForHelpOption(array $params): array
{
Expand Down
10 changes: 5 additions & 5 deletions system/CLI/GeneratorTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ trait GeneratorTrait
*
* @internal
*
* @var array<int|string, string|null>
* @var array<array-key, string|null>
*/
private $params = [];

/**
* Execute the command.
*
* @param array<int|string, string|null> $params
* @param array<array-key, string|null> $params
*
* @deprecated use generateClass() instead
*/
Expand All @@ -115,7 +115,7 @@ protected function execute(array $params): void
/**
* Generates a class file from an existing template.
*
* @param array<int|string, string|null> $params
* @param array<array-key, string|null> $params
*/
protected function generateClass(array $params): void
{
Expand All @@ -138,8 +138,8 @@ protected function generateClass(array $params): void
/**
* Generate a view file from an existing template.
*
* @param string $view namespaced view name that is generated
* @param array<int|string, string|null> $params
* @param string $view namespaced view name that is generated
* @param array<array-key, string|null> $params
*/
protected function generateView(string $view, array $params): void
{
Expand Down
2 changes: 1 addition & 1 deletion system/Commands/Database/MigrateRefresh.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class MigrateRefresh extends BaseCommand
*/
public function run(array $params)
{
$params['b'] = 0;
$params['b'] = '0';

if (ENVIRONMENT === 'production') {
// @codeCoverageIgnoreStart
Expand Down
2 changes: 0 additions & 2 deletions system/Commands/Database/MigrateStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ class MigrateStatus extends BaseCommand

/**
* Displays a list of all migrations and whether they've been run or not.
*
* @param array<string, mixed> $params
*/
public function run(array $params)
{
Expand Down
4 changes: 2 additions & 2 deletions system/Commands/Encryption/GenerateKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ protected function generateRandomKey(string $prefix, int $length): string
/**
* Sets the new encryption key in your .env file.
*
* @param array<int|string, string|null> $params
* @param array<array-key, string|null> $params
*/
protected function setNewEncryptionKey(string $key, array $params): bool
{
Expand All @@ -144,7 +144,7 @@ protected function setNewEncryptionKey(string $key, array $params): bool
/**
* Checks whether to overwrite existing encryption key.
*
* @param array<int|string, string|null> $params
* @param array<array-key, string|null> $params
*/
protected function confirmOverwrite(array $params): bool
{
Expand Down
2 changes: 1 addition & 1 deletion system/Commands/Utilities/FilterCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function run(array $params)
}

/**
* @param array<int|string, string|null> $params
* @param array<array-key, string|null> $params
*/
private function checkParams(array $params): bool
{
Expand Down
14 changes: 7 additions & 7 deletions system/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function command(string $command)
$cursor += strlen($match[0]);
}

/** @var array<int|string, string|null> */
/** @var array<array-key, string|null> */
$params = [];
$command = array_shift($args);
$optionValue = false;
Expand Down Expand Up @@ -450,13 +450,13 @@ function env(string $key, $default = null)
* If $data is an array, then it loops over it, escaping each
* 'value' of the key/value pairs.
*
* @param array<int|string, array<int|string, mixed>|string>|string $data
* @param 'attr'|'css'|'html'|'js'|'raw'|'url' $context
* @param string|null $encoding Current encoding for escaping.
* If not UTF-8, we convert strings from this encoding
* pre-escaping and back to this encoding post-escaping.
* @param array<array-key, array<array-key, mixed>|string>|string $data
* @param 'attr'|'css'|'html'|'js'|'raw'|'url' $context
* @param string|null $encoding Current encoding for escaping.
* If not UTF-8, we convert strings from this encoding
* pre-escaping and back to this encoding post-escaping.
*
* @return ($data is string ? string : array<int|string, array<int|string, mixed>|string>)
* @return ($data is string ? string : array<array-key, array<array-key, mixed>|string>)
*
* @throws InvalidArgumentException
*/
Expand Down
2 changes: 1 addition & 1 deletion system/Config/BaseConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ protected function parseEncryptionKey(string $key): string
/**
* Initialization an environment-specific configuration setting
*
* @param array<int|string, mixed>|bool|float|int|string|null $property
* @param array<array-key, mixed>|bool|float|int|string|null $property
*
* @return void
*/
Expand Down
2 changes: 1 addition & 1 deletion system/Database/BaseBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2813,7 +2813,7 @@ public function getCompiledDelete(bool $reset = true): string
/**
* Compiles a delete string and runs the query
*
* @param array<int|string, mixed>|RawSql|string $where
* @param array<array-key, mixed>|RawSql|string $where
*
* @return bool|string Returns a SQL string if in test mode.
*
Expand Down
2 changes: 1 addition & 1 deletion system/Database/BaseConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ abstract protected function execute(string $sql);
* Should automatically handle different connections for read/write
* queries if needed.
*
* @param array<int|string, mixed>|string|null $binds
* @param array<array-key, mixed>|string|null $binds
*
* @return BaseResult<TConnection, TResult>|bool|Query
*
Expand Down
2 changes: 1 addition & 1 deletion system/Database/ConnectionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function getVersion(): string;
* Should automatically handle different connections for read/write
* queries if needed.
*
* @param array<int|string, mixed>|string|null $binds
* @param array<array-key, mixed>|string|null $binds
*
* @return BaseResult<TConnection, TResult>|bool|Query
*/
Expand Down
2 changes: 1 addition & 1 deletion system/Database/OCI8/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ protected function _truncate(string $table): string
/**
* Compiles a delete string and runs the query
*
* @param array<int|string, mixed>|RawSql|string $where
* @param array<array-key, mixed>|RawSql|string $where
*
* @return bool|string
*
Expand Down
2 changes: 1 addition & 1 deletion system/Database/Postgre/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ protected function _insertBatch(string $table, array $keys, array $values): stri
/**
* Compiles a delete string and runs the query
*
* @param array<int|string, mixed>|RawSql|string $where
* @param array<array-key, mixed>|RawSql|string $where
*
* @return bool|string
*
Expand Down
2 changes: 1 addition & 1 deletion system/Database/SQLSRV/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ protected function _delete(string $table): string
/**
* Compiles a delete string and runs the query
*
* @param array<int|string, mixed>|RawSql|string $where
* @param array<array-key, mixed>|RawSql|string $where
*
* @return bool|string
*
Expand Down
2 changes: 1 addition & 1 deletion system/Encryption/Handlers/BaseHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected static function substr($str, $start, $length = null)
*
* @param string $key Property name
*
* @return array<int|string, mixed>|bool|int|string|null
* @return array<array-key, mixed>|bool|int|string|null
*/
public function __get($key)
{
Expand Down
2 changes: 1 addition & 1 deletion system/Encryption/KeyRotationDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function decrypt($data, #[SensitiveParameter] $params = null)
/**
* Delegate property access to the inner handler.
*
* @return array<int|string, mixed>|bool|int|string|null
* @return array<array-key, mixed>|bool|int|string|null
*/
public function __get(string $key)
{
Expand Down
2 changes: 1 addition & 1 deletion system/Entity/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ public function hasChanged(?string $key = null): bool
* Checks if an array contains only Entity instances.
* This allows optimization for per-entity change tracking.
*
* @param array<int|string, mixed> $data
* @param array<array-key, mixed> $data
*/
private function containsOnlyEntities(array $data): bool
{
Expand Down
10 changes: 5 additions & 5 deletions system/HTTP/Header.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ class Header implements Stringable
* 'baz' => 'buzz',
* ]
*
* @var array<int|string, array<string, string>|string>|string
* @var array<array-key, array<string, string>|string>|string
*/
protected $value;

/**
* Header constructor. name is mandatory, if a value is provided, it will be set.
*
* @param array<int|string, array<string, string>|string>|string|null $value
* @param array<array-key, array<string, string>|string>|int|string|null $value
*/
public function __construct(string $name, $value = null)
{
Expand All @@ -71,7 +71,7 @@ public function getName(): string
* Gets the raw value of the header. This may return either a string
* or an array, depending on whether the header has multiple values or not.
*
* @return array<int|string, array<string, string>|string>|string
* @return array<array-key, array<string, string>|string>|string
*/
public function getValue()
{
Expand All @@ -96,7 +96,7 @@ public function setName(string $name)
/**
* Sets the value of the header, overwriting any previous value(s).
*
* @param array<int|string, array<string, string>|string>|string|null $value
* @param array<array-key, array<string, string>|int|string>|int|string|null $value
*
* @return $this
*
Expand Down Expand Up @@ -235,7 +235,7 @@ private function validateName(string $name): void
*
* @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2
*
* @param array<int|string, array<string, string>|string>|int|string $value
* @param array<array-key, array<string, string>|int|string>|int|string $value
*
* @throws InvalidArgumentException
*/
Expand Down
6 changes: 3 additions & 3 deletions system/HTTP/IncomingRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ public function getDefaultLocale(): string
* @param int|null $filter Filter constant
* @param array|int|null $flags
*
* @return array<int|string, mixed>|bool|float|int|stdClass|string|null
* @return array<array-key, mixed>|bool|float|int|stdClass|string|null
*/
public function getVar($index = null, $filter = null, $flags = null)
{
Expand All @@ -394,7 +394,7 @@ public function getVar($index = null, $filter = null, $flags = null)
*
* @see http://php.net/manual/en/function.json-decode.php
*
* @return array<int|string, mixed>|bool|float|int|stdClass|null
* @return array<array-key, mixed>|bool|float|int|stdClass|null
*
* @throws HTTPException When the body is invalid as JSON.
*/
Expand All @@ -421,7 +421,7 @@ public function getJSON(bool $assoc = false, int $depth = 512, int $options = 0)
* @param int|null $filter Filter Constant
* @param array|int|null $flags Option
*
* @return array<int|string, mixed>|bool|float|int|stdClass|string|null
* @return array<array-key, mixed>|bool|float|int|stdClass|string|null
*/
public function getJsonVar($index = null, bool $assoc = false, ?int $filter = null, $flags = null)
{
Expand Down
Loading
Loading