for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Omatech\Mage\Core\Repositories\Users;
use Omatech\Mage\Core\Domains\Users\Contracts\UniqueUserInterface;
use Omatech\Mage\Core\Domains\Users\Contracts\UserInterface;
use Omatech\Mage\Core\Repositories\UserBaseRepository;
class UniqueUser extends UserBaseRepository implements UniqueUserInterface
{
/**
* @param UserInterface $user
* @return bool
*/
public function unique(UserInterface $user): bool
return $this->query()
exists()
Illuminate\Database\Eloquent\Builder
canUseExistsForExistenceCheck()
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.
->where('email', $user->getEmail())
->where('id', '!=', $user->getId())
->exists();
}
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.