Skip to content

Commit

Permalink
Merge pull request #615 from radimvaculik/nette-utils-4
Browse files Browse the repository at this point in the history
nette/utils:~4.0
  • Loading branch information
hrach committed Mar 13, 2023
2 parents 0c4190d + 6bb2ece commit 58764ef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions composer.json
Expand Up @@ -23,16 +23,15 @@
"ext-json": "*",
"ext-ctype": "*",
"nette/caching": "~3.2 || ~3.1.3",
"nette/utils": "~3.0",
"nette/utils": "~4.0",
"nette/tokenizer": "~3.0",
"nextras/dbal": "~5.0@dev"
},
"require-dev": {
"nette/bootstrap": "~3.1",
"nette/di": "~3.0",
"nette/finder": "~2.4",
"nette/di": "^3.1",
"nette/neon": "~3.0",
"nette/tester": "~2.4",
"nette/tester": "~2.5",
"marc-mabe/php-enum": "~4.6",
"mockery/mockery": ">=1.5.1",
"phpstan/extension-installer": "1.2.0",
Expand Down
4 changes: 2 additions & 2 deletions src/Collection/Functions/CompareLikeFunction.php
Expand Up @@ -98,10 +98,10 @@ protected function evaluateInPhp(int $mode, $sourceValue, $targetValue): bool
return Strings::match($sourceValue, $regexp) !== null;

} elseif ($mode === LikeExpression::MODE_STARTS_WITH) {
return Strings::startsWith($sourceValue, $targetValue);
return str_starts_with($sourceValue, $targetValue);

} elseif ($mode === LikeExpression::MODE_ENDS_WITH) {
return Strings::endsWith($sourceValue, $targetValue);
return str_ends_with($sourceValue, $targetValue);

} elseif ($mode === LikeExpression::MODE_CONTAINS) {
$regexp = '~^.*' . preg_quote($targetValue, '~') . '.*$~';
Expand Down
2 changes: 1 addition & 1 deletion tests/inc/Helper.php
Expand Up @@ -31,6 +31,6 @@ public static function getSection(array $config): ?string

public static function isRunByRunner(): bool
{
return getenv(Environment::RUNNER) === '1';
return getenv(Environment::VariableRunner) === '1';
}
}

0 comments on commit 58764ef

Please sign in to comment.