diff --git a/system/CLI/InputOutput.php b/system/CLI/InputOutput.php index 5b6c1da02f4d..b69c19e2eee1 100644 --- a/system/CLI/InputOutput.php +++ b/system/CLI/InputOutput.php @@ -21,7 +21,7 @@ class InputOutput /** * Is the readline library on the system? */ - private bool $readlineSupport; + private readonly bool $readlineSupport; public function __construct() { diff --git a/system/Commands/Utilities/Routes/SampleURIGenerator.php b/system/Commands/Utilities/Routes/SampleURIGenerator.php index 4c4cf0c9112e..c0832a382eff 100644 --- a/system/Commands/Utilities/Routes/SampleURIGenerator.php +++ b/system/Commands/Utilities/Routes/SampleURIGenerator.php @@ -52,7 +52,7 @@ public function get(string $routeKey): string { $sampleUri = $routeKey; - if (strpos($routeKey, '{locale}') !== false) { + if (str_contains($routeKey, '{locale}')) { $sampleUri = str_replace( '{locale}', config(App::class)->defaultLocale, diff --git a/system/Validation/StrictRules/Rules.php b/system/Validation/StrictRules/Rules.php index a077625bb366..d7dd799f140b 100644 --- a/system/Validation/StrictRules/Rules.php +++ b/system/Validation/StrictRules/Rules.php @@ -43,7 +43,7 @@ public function differs( ?string $error = null, ?string $field = null ): bool { - if (strpos($otherField, '.') !== false) { + if (str_contains($otherField, '.')) { return $str !== dot_array_search($otherField, $data); } @@ -274,7 +274,7 @@ public function matches( ?string $error = null, ?string $field = null ): bool { - if (strpos($otherField, '.') !== false) { + if (str_contains($otherField, '.')) { return $str === dot_array_search($otherField, $data); }