original_string: public function getFolderParent()
      {
          if ($this->isRootFolder()) {
              return null;
          }
  
          $parents = $this->getParents($this->getSession()->getDefaultContext());
  
          // return the first element of the array
          $parent = reset($parents);
  
          if (!$parent instanceof FolderInterface) {
              return null;
          }
  
          return $parent;
      }
code: public function getFolderParent()
      {
          if ($this->isRootFolder()) {
              return null;
          }
  
          $parents = $this->getParents($this->getSession()->getDefaultContext());
  
          // return the first element of the array
          $parent = reset($parents);
  
          if (!$parent instanceof FolderInterface) {
              return null;
          }
  
          return $parent;
      }
code_tokens: public function getFolderParent ( ) { if ( $ this -> isRootFolder ( ) ) { return null ; } $ parents = $ this -> getParents ( $ this -> getSession ( ) -> getDefaultContext ( ) ) ; // return the first element of the array $ parent = reset ( $ parents ) ; if ( ! $ parent instanceof FolderInterface ) { return null ; } return $ parent ; }
docstring: Gets the parent folder object.
  
  @return FolderInterface|null the parent folder object or <code>null</code> if the folder is the root folder.
docstring_tokens: Gets the parent folder object .