Skip to content

Commit 039da97

Browse files
authored
Replaced get_called_class with static::class. (#7276)
1 parent 9db2c10 commit 039da97

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Searchable.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,15 @@ public function getScoutModelsByIds(Builder $builder, array $ids)
174174
*/
175175
public static function enableSearchSyncing(): void
176176
{
177-
ModelObserver::enableSyncingFor(get_called_class());
177+
ModelObserver::enableSyncingFor(static::class);
178178
}
179179

180180
/**
181181
* Disable search syncing for this model.
182182
*/
183183
public static function disableSearchSyncing(): void
184184
{
185-
ModelObserver::disableSyncingFor(get_called_class());
185+
ModelObserver::disableSyncingFor(static::class);
186186
}
187187

188188
/**
@@ -308,6 +308,6 @@ protected static function dispatchSearchableJob(callable $job): void
308308
*/
309309
protected static function usesSoftDelete(): bool
310310
{
311-
return in_array(SoftDeletes::class, class_uses_recursive(get_called_class()));
311+
return in_array(SoftDeletes::class, class_uses_recursive(static::class));
312312
}
313313
}

0 commit comments

Comments
 (0)