Skip to content

Commit

Permalink
Update test badge
Browse files Browse the repository at this point in the history
split: 39dd7c399e46a9a22490c061a2c91d3ef1579af6
  • Loading branch information
kylekatarnls authored Aug 17, 2023
1 parent 2beb4bb commit 75ba738
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Phug/Cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,21 +152,21 @@ protected function convertToKebabCase($string)
{
return preg_replace_callback('/[A-Z]/', function ($match) {
return '-'.strtolower($match[0]);
}, $string);
}, (string) $string);
}

protected function convertToCamelCase($string)
{
return preg_replace_callback('/-([a-z])/', function ($match) {
return strtoupper($match[1]);
}, $string);
}, (string) $string);
}

protected function execute($facade, $method, $arguments, $outputFile)
{
$callable = [$facade, $method];
$arguments = array_map(function ($argument) {
return in_array(substr($argument, 0, 1), ['[', '{'])
return in_array(substr((string) $argument, 0, 1), ['[', '{'])
? json_decode($argument, true)
: $argument;
}, $arguments);
Expand Down Expand Up @@ -206,7 +206,7 @@ protected function getNamedArgumentBySpaceDelimiter(array &$arguments, $index, $

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

return $match[1];
Expand Down

0 comments on commit 75ba738

Please sign in to comment.