code: public function isCategoriesValid(array $categoriesCode)
      {
          foreach ($categoriesCode as $category) {
              if (! in_array($category, $this->availableCategories)) {
  
                  return false;
              }
          }
  
          return true;
      }
docs: @param array $categoriesCode
  
  @return bool