Skip to content

Commit

Permalink
Fix CS v3.17.0 (#1101)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek authored May 22, 2023
1 parent 6b02f2a commit 60ddb9a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
4 changes: 1 addition & 3 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
->setRules([
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@PHP74Migration:risky' => true,
'@PHP74Migration' => true,
'@PHP74Migration:risky' => true,

// required by PSR-12
'concat_space' => [
Expand Down Expand Up @@ -53,8 +53,6 @@
// fn => without curly brackets is less readable,
// also prevent bounding of unwanted variables for GC
'use_arrow_functions' => false,

'php_unit_test_case_static_method_calls' => ['call_type' => 'self'], // remove once PHP CS Fixer is upgraded to v3.17
])
->setFinder($finder)
->setCacheFile(sys_get_temp_dir() . '/php-cs-fixer.' . md5(__DIR__) . '.cache');
4 changes: 2 additions & 2 deletions src/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ public function addCteModel(string $name, self $model, bool $recursive = false)
* Set order for model records. Multiple calls are allowed.
*
* @param string|array<int, string|array{string, 1?: 'asc'|'desc'}>|array<string, 'asc'|'desc'> $field
* @param 'asc'|'desc' $direction
* @param 'asc'|'desc' $direction
*
* @return $this
*/
Expand Down Expand Up @@ -1195,7 +1195,7 @@ private function remapIdLoadToPersistence($id)

/**
* @param ($fromTryLoad is true ? false : bool) $fromReload
* @param mixed $id
* @param mixed $id
*
* @return ($fromTryLoad is true ? static|null : static)
*/
Expand Down
8 changes: 3 additions & 5 deletions src/Model/Join.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ public function hasMany(string $link, array $defaults = [])
return $this->getOwner()->hasMany($link, $defaults);
}

/*
/**
* Wrapper for ContainsOne that will associate field with join.
*
Expand All @@ -377,15 +378,13 @@ public function hasMany(string $link, array $defaults = [])
* @param array<string, mixed> $defaults
*
* @return Reference\ContainsOne
*/
/*
*X/
public function containsOne(string $link, array $defaults = []) // : Reference
{
$defaults['joinName'] = $this->getJoinNameFromShortName();
return $this->getOwner()->containsOne($link, $defaults);
}
*/
/**
* Wrapper for ContainsMany that will associate field with join.
Expand All @@ -395,8 +394,7 @@ public function containsOne(string $link, array $defaults = []) // : Reference
* @param array<string, mixed> $defaults
*
* @return Reference\ContainsMany
*/
/*
*X/
public function containsMany(string $link, array $defaults = []) // : Reference
{
return $this->getOwner()->containsMany($link, $defaults);
Expand Down
2 changes: 1 addition & 1 deletion src/Reference/HasOneSql.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class HasOneSql extends HasOne
{
/**
* @param ($theirFieldIsTitle is true ? null : string) $theirFieldName
* @param array<string, mixed> $defaults
* @param array<string, mixed> $defaults
*/
private function _addField(string $fieldName, bool $theirFieldIsTitle, ?string $theirFieldName, array $defaults): SqlExpressionField
{
Expand Down

0 comments on commit 60ddb9a

Please sign in to comment.