Skip to content

Commit

Permalink
Add types to ViewInterface::setParameter() and `ViewInterface::addT…
Browse files Browse the repository at this point in the history
…oParameter()` parameters
  • Loading branch information
vjik committed May 27, 2024
1 parent e454355 commit b494b63
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- New #242: Add `View::getLocale()` and `WebView::getLocale()` methods (@Tigrov)
- Enh #250: Make event dispatcher in `View` and `WebView` optional (@vjik)
- Enh #251: Make base path in `View` and `WebView` optional (@vjik)
- Enh #248: Add types to `ViewInterface::setParameter()` and `ViewInterface::addToParameter()` parameters (@vjik)

## 8.0.0 February 16, 2023

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"require-dev": {
"maglnet/composer-require-checker": "^4.2",
"phpunit/phpunit": "^9.5",
"rector/rector": "^1.0",
"rector/rector": "1.0.*",
"roave/infection-static-analysis-plugin": "^1.25",
"spatie/phpunit-watcher": "^1.23",
"vimeo/psalm": "^4.30|^5.20",
Expand Down
1 change: 0 additions & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
]);

$rectorConfig->skip([
MixedTypeRector::class,
RemoveExtraParametersRector::class => [__DIR__ . '/src/PhpTemplateRenderer.php'],
]);
};
4 changes: 2 additions & 2 deletions src/ViewInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public function setParameters(array $parameters): static;
* @param string $id The unique identifier of the parameter.
* @param mixed $value The value of the parameter.
*/
public function setParameter(string $id, $value): static;
public function setParameter(string $id, mixed $value): static;

/**
* Add values to end of common array parameter. If specified parameter does not exist or him is not array,
Expand All @@ -167,7 +167,7 @@ public function setParameter(string $id, $value): static;
*
* @throws InvalidArgumentException When specified parameter already exists and is not an array.
*/
public function addToParameter(string $id, ...$value): static;
public function addToParameter(string $id, mixed ...$value): static;

/**
* Removes a common parameter.
Expand Down

0 comments on commit b494b63

Please sign in to comment.