for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Containers\User\Actions;
use App\Containers\Authentication\Tasks\GetAuthenticatedUserTask;
use App\Containers\User\Tasks\DeleteUserTask;
use App\Ship\Parents\Actions\Action;
/**
* Class DeleteUserAction.
*
* @author Mahmoud Zalt <[email protected]>
*/
class DeleteUserAction extends Action
{
* @param $userId
* @return bool
public function run($userId = null)
$userId = $userId ? : $this->call(GetAuthenticatedUserTask::class)->id;
$isDeleted = $this->call(DeleteUserTask::class, [$userId]);
return $isDeleted;
}