Skip to content

Commit 824f4a2

Browse files
authored
Merge pull request #102 from nickvergessen/bugfix/noid/php-8.4-compatibility
fix: Make $context explicitly nullable
2 parents 154770d + 778a5cc commit 824f4a2

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/CompletionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class CompletionHandler
4040
*/
4141
private $commandWordIndex;
4242

43-
public function __construct(Application $application, CompletionContext $context = null)
43+
public function __construct(Application $application, ?CompletionContext $context = null)
4444
{
4545
$this->application = $application;
4646
$this->context = $context;

src/HookFactory.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ public static function getShellTypes()
126126
/**
127127
* Return a completion hook for the specified shell type
128128
*
129-
* @param string $type - a key from self::$hooks
130-
* @param string $programPath
131-
* @param string $programName
132-
* @param bool $multiple
129+
* @param string $type - a key from self::$hooks
130+
* @param string $programPath
131+
* @param ?string $programName
132+
* @param bool $multiple
133133
*
134134
* @return string
135135
*/

tests/Stecman/Component/Symfony/Console/BashCompletion/Common/CompletionHandlerTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected function setUp(): void
4747
* Create a handler set up with the given commandline and cursor position
4848
*
4949
* @param $commandLine
50-
* @param int $cursorIndex
50+
* @param ?int $cursorIndex
5151
* @return CompletionHandler
5252
*/
5353
protected function createHandler($commandLine, $cursorIndex = null)

0 commit comments

Comments
 (0)