Skip to content

Commit

Permalink
Revert "Apply Rector changes (CI)"
Browse files Browse the repository at this point in the history
This reverts commit 00c8377.
  • Loading branch information
Tigrov committed Jun 22, 2024
1 parent 99306f6 commit f7613d9
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Cache/SchemaCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public function __construct(private CacheInterface $psrCache)
/**
* Remove a value with the specified key from cache.
*
* @param mixed $key A key identifying the value to delete from cache.
*
* @throws InvalidArgumentException
*/
Expand All @@ -60,6 +61,7 @@ public function remove(mixed $key): void
/**
* Retrieve value from cache.
*
* @param mixed $key The key identifying the value to cache.
* @throws InvalidArgumentException
* @return mixed Cache value.
*/
Expand All @@ -72,7 +74,10 @@ public function get(mixed $key): mixed
/**
* Persists data in the cache, uniquely referenced by a key with an optional tag.
*
* @param mixed $key The key of the item to store.
* @param mixed $value The value of the item to store.
* @param string|null $tag Cache tag.
*
* @throws InvalidArgumentException If the $key string isn't a legal value.
* @throws RuntimeException If cache value isn't set.
*/
Expand Down Expand Up @@ -185,8 +190,10 @@ public function setExclude(array $value): void
*
* @link https://www.php-fig.org/psr/psr-16/#12-definitions
*
* @param mixed $key A key to normalize.
*
* @throws InvalidArgumentException For invalid key.
*
* @return string The normalized cache key.
*/
private function normalize(mixed $key): string
Expand Down
4 changes: 4 additions & 0 deletions src/Command/CommandInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public function addCommentOnTable(string $table, string $comment): static;
* @param string $table The name of the table to add constraint to.
* @param string $name The name of the default value constraint.
* @param string $column The name of the column to add constraint to.
* @param mixed $value Default value.
*
* @throws Exception
* @throws NotSupportedException
Expand Down Expand Up @@ -206,10 +207,12 @@ public function insertBatch(string $table, iterable $rows, array $columns = []):
* @param int|string $name The parameter identifier. For a prepared statement using named placeholders, this will be
* a parameter name of the form `:name`. For a prepared statement using question mark placeholders, this will be the
* 1-indexed position of the parameter.
* @param mixed $value The PHP variable to bind to the SQL statement parameter (passed by reference).
* @param int|null $dataType The {@see DataType SQL data type} of the parameter. If `null`, the type is determined
* by the PHP type of the value.
* @param int|null $length The length of the data type.
* @param mixed|null $driverOptions The driver-specific options.
*
* @throws Exception
*/
public function bindParam(
Expand Down Expand Up @@ -238,6 +241,7 @@ public function addUnique(string $table, string $name, array|string $columns): s
* @param int|string $name Parameter identifier. For a prepared statement using named placeholders, this will be a
* parameter name of the form `:name`. For a prepared statement using question mark placeholders, this will be the
* 1-indexed position of the parameter.
* @param mixed $value The value to bind to the parameter.
* @param int|null $dataType The {@see DataType SQL data type} of the parameter. If null, the type is determined
* by the PHP type of the value.
*/
Expand Down
1 change: 1 addition & 0 deletions src/Command/ParamInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
interface ParamInterface
{
/**
* @param mixed $value The value to bind to the parameter.
* @param int $type The SQL data type of the parameter.
* If `null`, the type is determined by the PHP type of the value.
*/
Expand Down
2 changes: 2 additions & 0 deletions src/Constraint/DefaultValueConstraint.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public function getValue(): mixed

/**
* Set the default value as returned by the DBMS.
*
* @param mixed $value The default value as returned by the DBMS.
*/
public function value(mixed $value): self
{
Expand Down
6 changes: 6 additions & 0 deletions src/Expression/ArrayExpression.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ public function getDimension(): int
*
* @link https://php.net/manual/en/arrayaccess.offsetexists.php
*
* @param mixed $offset An offset to check for.
*
* @throws InvalidConfigException If offset isn't an integer.
*
* @return bool Its `true` on success or `false` on failure. The return value will be cast to boolean if non-boolean
* was returned.
*/
Expand All @@ -86,8 +88,10 @@ public function offsetExists(mixed $offset): bool
*
* @link https://php.net/manual/en/arrayaccess.offsetget.php
*
* @param mixed $offset The offset to retrieve.
*
* @throws InvalidConfigException If offset isn't an integer.
*
* @return mixed Can return all value types.
*/
public function offsetGet(mixed $offset): mixed
Expand All @@ -102,6 +106,8 @@ public function offsetGet(mixed $offset): mixed
*
* @link https://php.net/manual/en/arrayaccess.offsetset.php
*
* @param mixed $offset The offset to assign the value to.
* @param mixed $value The value to set.
*
* @throws InvalidConfigException If offset isn't an integer.
*/
Expand Down
1 change: 1 addition & 0 deletions src/Query/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,7 @@ private function filterCondition(array|string $condition): array|string
* - a string containing only space characters,
* - or an empty array.
*
* @param mixed $value The value to check.
*
* @return bool If the value is empty.
*/
Expand Down
2 changes: 2 additions & 0 deletions src/QueryBuilder/AbstractDQLQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@ protected function extractAlias(string $table): array|bool
/**
* Checks to see if the given limit is effective.
*
* @param mixed $limit The given limit.
*
* @return bool Whether the limit is effective.
*/
Expand All @@ -555,6 +556,7 @@ protected function hasLimit(mixed $limit): bool
/**
* Checks to see if the given offset is effective.
*
* @param mixed $offset The given offset.
*
* @return bool Whether the offset is effective.
*/
Expand Down
2 changes: 2 additions & 0 deletions src/QueryBuilder/DDLQueryBuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ public function addCommentOnTable(string $table, string $comment): string;
* @param string $table The table toi add the default value constraint to.
* @param string $name The name of the default value constraint.
* @param string $column The name of the column to add constraint on.
* @param mixed $value The default value to set for the column.
*
* @throws Exception
* @throws NotSupportedException If this isn't supported by the underlying DBMS.
*
* @return string the SQL statement for adding a default value constraint to an existing table.
*
* Note: The method will quote the `name`, `table`, and `column` parameters before using them in the generated SQL.
Expand Down
3 changes: 3 additions & 0 deletions src/Schema/AbstractSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,9 @@ protected function findTableNames(string $schema): array
* This method may be overridden by child classes to create a DBMS-specific column schema.
*
* @param string $type The abstract data type.
* @param mixed ...$info The column information.
* @psalm-param array{unsigned?: bool} $info The set of parameters may be different for a specific DBMS.
*
* @return ColumnSchemaInterface
*/
protected function createColumnSchema(string $type, mixed ...$info): ColumnSchemaInterface
Expand Down Expand Up @@ -567,6 +569,7 @@ protected function resolveTableName(string $name): TableSchemaInterface
*
* @param string $name The table name.
* @param string $type The metadata type.
* @param mixed $data The metadata to set.
*/
protected function setTableMetadata(string $name, string $type, mixed $data): void
{
Expand Down
2 changes: 2 additions & 0 deletions src/Schema/Builder/ColumnInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ public function defaultExpression(string $sql): self;

/**
* Specify the default value for the column.
*
* @param mixed $default The default value to use.
*/
public function defaultValue(mixed $default): self;

Expand Down
1 change: 1 addition & 0 deletions src/Schema/QuoterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ public function quoteTableName(string $name): string;
* Attention: The usage of this method isn't safe.
* Use prepared statements.
*
* @param mixed $value The value to quote.
*
* @return mixed The quoted value.
*/
Expand Down
2 changes: 2 additions & 0 deletions src/Schema/SchemaInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,10 @@ public function getDefaultSchema(): string|null;
/**
* Determines the SQL data type for the given PHP data value.
*
* @param mixed $data The data to find a type for.
*
* @return int The type.
*
* @see DataType
*/
public function getDataType(mixed $data): int;
Expand Down
1 change: 1 addition & 0 deletions tests/Support/Assert.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public static function getInaccessibleProperty(object $object, string $propertyN
*
* @param object $object The object to set the property on.
* @param string $propertyName The name of the property to set.
* @param mixed $value The value to set.
*/
public static function setInaccessibleProperty(object $object, string $propertyName, mixed $value): void
{
Expand Down

0 comments on commit f7613d9

Please sign in to comment.