Skip to content

Commit 93df4b3

Browse files
author
Bastian Schwarz
committed
Added doc to method so psalm knows the specific return value with int keyed array
1 parent 1cf9081 commit 93df4b3

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/Task/AbstractCrontabCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ public function __construct(
2222
public readonly iRunner $commandRunner = new WithDeployerFunctions()
2323
) {}
2424

25+
/**
26+
* Checks for the HasOptionsInterface and if it's implemented the return value is used as base. Then adds the user option if it is set.
27+
*
28+
* @return array<int, string> The options to pass to the crontab command
29+
*/
2530
final public function getOptionsWithUser() : array {
2631
$options = $this instanceof HasOptionsInterface ? $this->getOptions() : [];
2732
!$this->user ?: $options[] = "-u $this->user";

0 commit comments

Comments
 (0)