for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Transmissor\Models\Messenger;
use Auth;
use Cmgmyr\Messenger\Models\Thread as MessengerThread;
class Thread extends MessengerThread
{
public function participant()
return $this->participants()->where('actorable_type', '=', User::class)->where('actorable_id', '!=', Auth::id())->first()->user;
}
public static function participateBy($user_id)
$user_id
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$user_id = Auth::id();
$thread_ids = array_unique(Participant::byWhom($user_id)->pluck('messageable_id')->toArray());
byWhom()
Transmissor\Models\Messenger\Participant
scopeByWhom()
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.
return Thread::whereIn('id', $thread_ids)->orderBy('updated_at', 'desc')->paginate(15);
public function scopeRecent($query)
return $query->orderBy('created_at', 'desc');
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.