Fenos\Notifynder\Senders\SendOne::hasCategory PHP Méthode

hasCategory() protected méthode

Check if the category of the notification has been specified in the array of information.
protected hasCategory ( ) : boolean
Résultat boolean
    protected function hasCategory()
    {
        if (!array_key_exists('category_id', $this->infoNotification)) {
            $error = 'Category not found please provide one,
                     you can not store a notification without category id';
            throw new CategoryNotFoundException($error);
        }
        return true;
    }