Skip to content

Commit

Permalink
PHP 8.4 compatibility: implicitly nullable parameter declarations dep…
Browse files Browse the repository at this point in the history
…recated

Ref drush-ops/drush#6069
  • Loading branch information
andypost committed Jul 23, 2024
1 parent 1e830ba commit 8cf729e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/State/StateHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class StateHelper
* @param OutputInterface $output
* @return State
*/
public static function injectIntoCallbackObject($callback, InputInterface $input, OutputInterface $output = null)
public static function injectIntoCallbackObject($callback, InputInterface $input, ?OutputInterface $output = null)
{
return static::inject(static::recoverCallbackObject($callback), $input, $output);
}
Expand All @@ -29,7 +29,7 @@ public static function injectIntoCallbackObject($callback, InputInterface $input
* @param OutputInterface $output
* @return State
*/
public static function inject($target, InputInterface $input, OutputInterface $output = null)
public static function inject($target, InputInterface $input, ?OutputInterface $output = null)
{
// Do not allow injection unless the target can save its state
if (!$target || !($target instanceof SavableState)) {
Expand Down

0 comments on commit 8cf729e

Please sign in to comment.