original_string: public function getTrailIds(NewsCategoryModel $category)
      {
          static $ids;
  
          if (!\is_array($ids)) {
              /** @var Database $db */
              $db = $this->framework->createInstance(Database::class);
  
              $ids = $db->getParentRecords($category->id, $category->getTable());
              $ids = \array_map('intval', \array_unique($ids));
  
              // Remove the current category
              unset($ids[\array_search($category->id, $ids, true)]);
          }
  
          return $ids;
      }
code: public function getTrailIds(NewsCategoryModel $category)
      {
          static $ids;
  
          if (!\is_array($ids)) {
              /** @var Database $db */
              $db = $this->framework->createInstance(Database::class);
  
              $ids = $db->getParentRecords($category->id, $category->getTable());
              $ids = \array_map('intval', \array_unique($ids));
  
              // Remove the current category
              unset($ids[\array_search($category->id, $ids, true)]);
          }
  
          return $ids;
      }
code_tokens: public function getTrailIds ( NewsCategoryModel $ category ) { static $ ids ; if ( ! \ is_array ( $ ids ) ) { /** @var Database $db */ $ db = $ this -> framework -> createInstance ( Database :: class ) ; $ ids = $ db -> getParentRecords ( $ category -> id , $ category -> getTable ( ) ) ; $ ids = \ array_map ( 'intval' , \ array_unique ( $ ids ) ) ; // Remove the current category unset ( $ ids [ \ array_search ( $ category -> id , $ ids , true ) ] ) ; } return $ ids ; }
docstring: Get the category trail IDs.
  
  @param NewsCategoryModel $category
  
  @return array
docstring_tokens: Get the category trail IDs .