for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Omatech\Mage\Core\Repositories\Translations;
use Omatech\Mage\Core\Domains\Translations\Contracts\ExistsTranslationInterface;
use Omatech\Mage\Core\Domains\Translations\Contracts\TranslationInterface;
use Omatech\Mage\Core\Repositories\TranslationBaseRepository;
class ExistsTranslation extends TranslationBaseRepository implements ExistsTranslationInterface
{
/**
* @param TranslationInterface $translation
* @return bool
*/
public function exists(TranslationInterface $translation): 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(static function ($q) use ($translation) {
$q->where('group', $translation->getGroup())
->where('key', $translation->getKey());
})
->orWhere('id', $translation->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.