From 683a8db8cd058e428be1ad76a1c3d9c8f807d90b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20Ionit=CC=A6a=CC=86?= Date: Tue, 20 Apr 2021 14:03:39 +0100 Subject: [PATCH] replace class_uses with class_uses_recursive --- src/Commands/IndexCommand.php | 2 +- src/Commands/UnIndexCommand.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Commands/IndexCommand.php b/src/Commands/IndexCommand.php index ac65b30..60c2465 100644 --- a/src/Commands/IndexCommand.php +++ b/src/Commands/IndexCommand.php @@ -42,7 +42,7 @@ public function handle(): void { $modelClass = $this->argument('model_class'); - if (!in_array(SearchableTrait::class, class_uses($modelClass), true)) { + if (!in_array(SearchableTrait::class, class_uses_recursive($modelClass), true)) { $this->error('Model not using ' . SearchableTrait::class); return; } diff --git a/src/Commands/UnIndexCommand.php b/src/Commands/UnIndexCommand.php index 221784a..eeecbaf 100644 --- a/src/Commands/UnIndexCommand.php +++ b/src/Commands/UnIndexCommand.php @@ -42,7 +42,7 @@ public function handle(): void /** @var string $modelClass */ $modelClass = $this->argument('model_class'); - if (!in_array(SearchableTrait::class, class_uses($modelClass), true)) { + if (!in_array(SearchableTrait::class, class_uses_recursive($modelClass), true)) { $this->error('Model not using ' . SearchableTrait::class); return; }