Skip to content

Commit

Permalink
minor #1453 CS Update (kbond)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.x branch.

Discussion
----------

CS Update

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| Issues        | n/a
| License       | MIT

Updates to the latest Symfony CS rules.

Refs: PHP-CS-Fixer/PHP-CS-Fixer#7773 & symfony/symfony#53612

Commits
-------

aad4e17d minor: update cs
  • Loading branch information
weaverryan committed Feb 7, 2024
2 parents 683042e + 3dc8650 commit 47fc162
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Dto/StimulusAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function addController(string $controllerName, array $controllerValues =
/**
* @param array $parameters Parameters to pass to the action. Optional.
*/
public function addAction(string $controllerName, string $actionName, string $eventName = null, array $parameters = []): void
public function addAction(string $controllerName, string $actionName, ?string $eventName = null, array $parameters = []): void
{
$controllerName = $this->normalizeControllerName($controllerName);
$this->actions[] = [
Expand All @@ -90,7 +90,7 @@ public function addAction(string $controllerName, string $actionName, string $ev
* @param string $controllerName the Stimulus controller name
* @param string|null $targetNames The space-separated list of target names if a string is passed to the 1st argument. Optional.
*/
public function addTarget(string $controllerName, string $targetNames = null): void
public function addTarget(string $controllerName, ?string $targetNames = null): void
{
if (null === $targetNames) {
return;
Expand Down
8 changes: 4 additions & 4 deletions src/Twig/StimulusTwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function appendStimulusController(StimulusAttributes $stimulusAttributes,
/**
* @param array $parameters Parameters to pass to the action. Optional.
*/
public function renderStimulusAction(string $controllerName, string $actionName = null, string $eventName = null, array $parameters = []): StimulusAttributes
public function renderStimulusAction(string $controllerName, ?string $actionName = null, ?string $eventName = null, array $parameters = []): StimulusAttributes
{
$stimulusAttributes = $this->stimulusHelper->createStimulusAttributes();
$stimulusAttributes->addAction($controllerName, $actionName, $eventName, $parameters);
Expand All @@ -81,7 +81,7 @@ public function renderStimulusAction(string $controllerName, string $actionName
/**
* @param array $parameters Parameters to pass to the action. Optional.
*/
public function appendStimulusAction(StimulusAttributes $stimulusAttributes, string $controllerName, string $actionName, string $eventName = null, array $parameters = []): StimulusAttributes
public function appendStimulusAction(StimulusAttributes $stimulusAttributes, string $controllerName, string $actionName, ?string $eventName = null, array $parameters = []): StimulusAttributes
{
$stimulusAttributes->addAction($controllerName, $actionName, $eventName, $parameters);

Expand All @@ -92,7 +92,7 @@ public function appendStimulusAction(StimulusAttributes $stimulusAttributes, str
* @param string $controllerName the Stimulus controller name
* @param string|null $targetNames The space-separated list of target names if a string is passed to the 1st argument. Optional.
*/
public function renderStimulusTarget(string $controllerName, string $targetNames = null): StimulusAttributes
public function renderStimulusTarget(string $controllerName, ?string $targetNames = null): StimulusAttributes
{
$stimulusAttributes = $this->stimulusHelper->createStimulusAttributes();
$stimulusAttributes->addTarget($controllerName, $targetNames);
Expand All @@ -104,7 +104,7 @@ public function renderStimulusTarget(string $controllerName, string $targetNames
* @param string $controllerName the Stimulus controller name
* @param string|null $targetNames The space-separated list of target names if a string is passed to the 1st argument. Optional.
*/
public function appendStimulusTarget(StimulusAttributes $stimulusAttributes, string $controllerName, string $targetNames = null): StimulusAttributes
public function appendStimulusTarget(StimulusAttributes $stimulusAttributes, string $controllerName, ?string $targetNames = null): StimulusAttributes
{
$stimulusAttributes->addTarget($controllerName, $targetNames);

Expand Down

0 comments on commit 47fc162

Please sign in to comment.