original_string: public function isUserAllowedNewsCategory($categoryId)
      {
          if (null === ($roots = $this->getUserAllowedRoots())) {
              return true;
          }
  
          /** @var Database $db */
          $db = $this->framework->createInstance(Database::class);
  
          $ids = $db->getChildRecords($roots, 'tl_news_category', false, $roots);
          $ids = \array_map('intval', $ids);
  
          return \in_array((int) $categoryId, $ids, true);
      }
code: public function isUserAllowedNewsCategory($categoryId)
      {
          if (null === ($roots = $this->getUserAllowedRoots())) {
              return true;
          }
  
          /** @var Database $db */
          $db = $this->framework->createInstance(Database::class);
  
          $ids = $db->getChildRecords($roots, 'tl_news_category', false, $roots);
          $ids = \array_map('intval', $ids);
  
          return \in_array((int) $categoryId, $ids, true);
      }
code_tokens: public function isUserAllowedNewsCategory ( $ categoryId ) { if ( null === ( $ roots = $ this -> getUserAllowedRoots ( ) ) ) { return true ; } /** @var Database $db */ $ db = $ this -> framework -> createInstance ( Database :: class ) ; $ ids = $ db -> getChildRecords ( $ roots , 'tl_news_category' , false , $ roots ) ; $ ids = \ array_map ( 'intval' , $ ids ) ; return \ in_array ( ( int ) $ categoryId , $ ids , true ) ; }
docstring: Return if the user is allowed to manage the news category.
  
  @param int $categoryId
  
  @return bool
docstring_tokens: Return if the user is allowed to manage the news category .