Skip to content

Commit

Permalink
Fix deprecations warning on PHP 8.4 (#282)
Browse files Browse the repository at this point in the history
* Add `nullable_type_declarations` rule

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <[email protected]>
  • Loading branch information
crynobone and StyleCIBot authored Dec 19, 2024
1 parent 4f0d5ec commit 65715f3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
php:
preset: laravel
enabled:
- nullable_type_declarations
js: true
css: true
2 changes: 1 addition & 1 deletion src/ParallelSSH.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ParallelSSH extends RemoteProcessor
* @param \Closure|null $callback
* @return int
*/
public function run(Task $task, Closure $callback = null)
public function run(Task $task, ?Closure $callback = null)
{
$processes = [];

Expand Down
2 changes: 1 addition & 1 deletion src/RemoteProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ abstract class RemoteProcessor
* @param \Closure|null $callback
* @return int
*/
abstract public function run(Task $task, Closure $callback = null);
abstract public function run(Task $task, ?Closure $callback = null);

/**
* Run the given script on the given host.
Expand Down
2 changes: 1 addition & 1 deletion src/SSH.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class SSH extends RemoteProcessor
* @param \Closure|null $callback
* @return int
*/
public function run(Task $task, Closure $callback = null)
public function run(Task $task, ?Closure $callback = null)
{
$processes = [];

Expand Down

0 comments on commit 65715f3

Please sign in to comment.