Skip to content

Commit a40efe4

Browse files
committed
Improve code quality
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
1 parent 071a5ba commit a40efe4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Tools/ContextGenerator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
use function scandir;
2020
use function sort;
2121
use function sprintf;
22+
use function str_contains;
2223
use function str_repeat;
2324
use function str_replace;
2425
use function str_split;
2526
use function strlen;
26-
use function strstr;
2727
use function strtoupper;
2828
use function substr;
2929
use function trim;
@@ -170,7 +170,7 @@ public static function readWords(array $files): array
170170

171171
// Reserved, data types, keys, functions, etc. keywords.
172172
foreach (static::$labelsFlags as $label => $flags) {
173-
if (strstr($value, $label) === false) {
173+
if (! str_contains($value, $label)) {
174174
continue;
175175
}
176176

@@ -179,7 +179,7 @@ public static function readWords(array $files): array
179179
}
180180

181181
// Composed keyword.
182-
if (strstr($value, ' ') !== false) {
182+
if (str_contains($value, ' ')) {
183183
$type |= 2; // Reserved keyword.
184184
$type |= 4; // Composed keyword.
185185
}

0 commit comments

Comments
 (0)