Skip to content

Commit 7060490

Browse files
committed
[refactor] update str helper
- updates to use new Str::startsWith helper instead of starts_with
1 parent 4901199 commit 7060490

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Task.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function compileParameters($console = false)
102102
if (count($param) > 1) {
103103
$trimmed_param = trim(trim($param[1], '"'), "'");
104104
if ($console) {
105-
if (starts_with($param[0], ['--', '-'])) {
105+
if (Str::startsWith($param[0], ['--', '-'])) {
106106
$carry = $duplicate_parameter_index($carry, $param, $trimmed_param);
107107
} else {
108108
$carry[$argument_index++] = $trimmed_param;
@@ -114,7 +114,7 @@ public function compileParameters($console = false)
114114
return $duplicate_parameter_index($carry, $param, $trimmed_param);
115115
}
116116

117-
starts_with($param[0], ['--', '-']) && ! $console ?
117+
Str::startsWith($param[0], ['--', '-']) && ! $console ?
118118
$carry[$param[0]] = true :
119119
$carry[$argument_index++] = $param[0];
120120

tests/Feature/AuthTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ function ($value) {
4444

4545
/**
4646
* @test
47-
* @expectedException \Symfony\Component\HttpKernel\Exception\HttpException
4847
*/
4948
public function auth_middleware_responds_with_403_on_failure()
5049
{
50+
$this->expectException('\Symfony\Component\HttpKernel\Exception\HttpException');
5151
Totem::auth(function () {
5252
return false;
5353
});

0 commit comments

Comments
 (0)