Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1e44c13

Browse files
committed
up: update the cmd.addIf param type
1 parent de5f626 commit 1e44c13

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

‎src/Cmd/CmdBuilder.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
use Toolkit\Stdlib\Str;
1313
use function sprintf;
14-
use function strpos;
1514

1615
/**
1716
* class CmdBuilder
@@ -93,14 +92,14 @@ public function addf(string $format, ...$a): self
9392
}
9493

9594
/**
96-
* @param string|int $arg
97-
* @param bool $isOk
95+
* @param string|int $arg
96+
* @param bool|int|string $ifExpr
9897
*
9998
* @return $this
10099
*/
101-
public function addIf($arg, bool$isOk): self
100+
public function addIf($arg, $ifExpr): self
102101
{
103-
if ($isOk) {
102+
if ($ifExpr) {
104103
$this->args[] = $arg;
105104
}
106105

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /