Skip to content

Commit eddbd6e

Browse files
staudenmeirtaylorotwell
authored andcommitted
Simplify class_uses_recursive() uses (#24931)
1 parent ca7126e commit eddbd6e

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,7 @@ public function getQualifiedParentKeyName()
135135
*/
136136
public function throughParentSoftDeletes()
137137
{
138-
return in_array(SoftDeletes::class, class_uses_recursive(
139-
get_class($this->throughParent)
140-
));
138+
return in_array(SoftDeletes::class, class_uses_recursive($this->throughParent));
141139
}
142140

143141
/**

src/Illuminate/Events/CallQueuedListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function handle(Container $container)
9696
*/
9797
protected function setJobInstanceIfNecessary(Job $job, $instance)
9898
{
99-
if (in_array(InteractsWithQueue::class, class_uses_recursive(get_class($instance)))) {
99+
if (in_array(InteractsWithQueue::class, class_uses_recursive($instance))) {
100100
$instance->setJob($job);
101101
}
102102

src/Illuminate/Queue/CallQueuedHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ protected function resolveHandler($job, $command)
8585
*/
8686
protected function setJobInstanceIfNecessary(Job $job, $instance)
8787
{
88-
if (in_array(InteractsWithQueue::class, class_uses_recursive(get_class($instance)))) {
88+
if (in_array(InteractsWithQueue::class, class_uses_recursive($instance))) {
8989
$instance->setJob($job);
9090
}
9191

0 commit comments

Comments
 (0)