Skip to content

Commit 75ba738

Browse files
authored
Update test badge
split: 39dd7c399e46a9a22490c061a2c91d3ef1579af6
1 parent 2beb4bb commit 75ba738

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Phug/Cli.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,21 +152,21 @@ protected function convertToKebabCase($string)
152152
{
153153
return preg_replace_callback('/[A-Z]/', function ($match) {
154154
return '-'.strtolower($match[0]);
155-
}, $string);
155+
}, (string) $string);
156156
}
157157

158158
protected function convertToCamelCase($string)
159159
{
160160
return preg_replace_callback('/-([a-z])/', function ($match) {
161161
return strtoupper($match[1]);
162-
}, $string);
162+
}, (string) $string);
163163
}
164164

165165
protected function execute($facade, $method, $arguments, $outputFile)
166166
{
167167
$callable = [$facade, $method];
168168
$arguments = array_map(function ($argument) {
169-
return in_array(substr($argument, 0, 1), ['[', '{'])
169+
return in_array(substr((string) $argument, 0, 1), ['[', '{'])
170170
? json_decode($argument, true)
171171
: $argument;
172172
}, $arguments);
@@ -206,7 +206,7 @@ protected function getNamedArgumentBySpaceDelimiter(array &$arguments, $index, $
206206

207207
protected function getNamedArgumentByEqualOperator(array &$arguments, $index, $name)
208208
{
209-
if (preg_match('/^'.preg_quote($name).'=(.*)$/', $arguments[$index], $match)) {
209+
if (preg_match('/^'.preg_quote($name).'=(.*)$/', (string) $arguments[$index], $match)) {
210210
array_splice($arguments, $index, 1);
211211

212212
return $match[1];

0 commit comments

Comments
 (0)