Skip to content

Commit de5f626

Browse files
committed
new: add dependabot.yml for detect deps update
1 parent a386f06 commit de5f626

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: composer
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10

src/Cmd/CmdBuilder.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace Toolkit\Sys\Cmd;
1111

1212
use Toolkit\Stdlib\Str;
13+
use function sprintf;
1314
use function strpos;
1415

1516
/**
@@ -79,6 +80,18 @@ public function add($arg): self
7980
return $this;
8081
}
8182

83+
/**
84+
* @param string $format
85+
* @param mixed ...$a
86+
*
87+
* @return $this
88+
*/
89+
public function addf(string $format, ...$a): self
90+
{
91+
$this->args[] = sprintf($format, ...$a);
92+
return $this;
93+
}
94+
8295
/**
8396
* @param string|int $arg
8497
* @param bool $isOk

0 commit comments

Comments
 (0)