diff --git a/src/Checks/ComposerWithDevDependenciesIsUpToDate.php b/src/Checks/ComposerWithDevDependenciesIsUpToDate.php index e7f9871..8adf408 100644 --- a/src/Checks/ComposerWithDevDependenciesIsUpToDate.php +++ b/src/Checks/ComposerWithDevDependenciesIsUpToDate.php @@ -4,6 +4,7 @@ use BeyondCode\SelfDiagnosis\Composer; use Illuminate\Support\Arr; +use Illuminate\Support\Str; class ComposerWithDevDependenciesIsUpToDate implements Check { @@ -42,7 +43,7 @@ public function check(array $config): bool $this->output = $this->composer->installDryRun($additionalOptions); - return str_contains($this->output, 'Nothing to install or update'); + return Str::contains($this->output, 'Nothing to install or update'); } /** diff --git a/src/Checks/ComposerWithoutDevDependenciesIsUpToDate.php b/src/Checks/ComposerWithoutDevDependenciesIsUpToDate.php index 141c108..855bebf 100644 --- a/src/Checks/ComposerWithoutDevDependenciesIsUpToDate.php +++ b/src/Checks/ComposerWithoutDevDependenciesIsUpToDate.php @@ -4,6 +4,7 @@ use BeyondCode\SelfDiagnosis\Composer; use Illuminate\Support\Arr; +use Illuminate\Support\Str; class ComposerWithoutDevDependenciesIsUpToDate implements Check { @@ -42,7 +43,7 @@ public function check(array $config): bool $this->output = $this->composer->installDryRun('--no-dev ' . $additionalOptions); - return str_contains($this->output, 'Nothing to install or update'); + return Str::contains($this->output, 'Nothing to install or update'); } /** diff --git a/src/Checks/PhpExtensionsAreInstalled.php b/src/Checks/PhpExtensionsAreInstalled.php index 6f37bf7..d0f1617 100644 --- a/src/Checks/PhpExtensionsAreInstalled.php +++ b/src/Checks/PhpExtensionsAreInstalled.php @@ -5,6 +5,7 @@ use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Arr; use Illuminate\Support\Collection; +use Illuminate\Support\Str; class PhpExtensionsAreInstalled implements Check { @@ -77,10 +78,10 @@ public function getExtensionsRequiredInComposerFile() $extensions = []; foreach ($installedPackages as $installedPackage) { $filtered = Arr::where(array_keys(Arr::get($installedPackage, 'require', [])), function ($value, $key) { - return starts_with($value, self::EXT); + return Str::startsWith($value, self::EXT); }); foreach ($filtered as $extension) { - $extensions[] = str_replace_first(self::EXT, '', $extension); + $extensions[] = Str::replaceFirst(self::EXT, '', $extension); } } return array_unique($extensions); diff --git a/src/Checks/ServersArePingable.php b/src/Checks/ServersArePingable.php index 011f788..5338111 100644 --- a/src/Checks/ServersArePingable.php +++ b/src/Checks/ServersArePingable.php @@ -88,10 +88,10 @@ private function parseConfiguredServers(array $servers): Collection foreach ($servers as $server) { if (is_array($server)) { - if (!empty(array_except($server, ['host', 'port', 'timeout']))) { + if (!empty(Arr::except($server, ['host', 'port', 'timeout']))) { throw new InvalidConfigurationException('Servers in array notation may only contain a host, port and timeout parameter.'); } - if (!array_has($server, 'host')) { + if (!Arr::has($server, 'host')) { throw new InvalidConfigurationException('For servers in array notation, the host parameter is required.'); }