original_string: public function getImplements($class)
      {
          $interfaces = [];
          $classId = $this->getClassId($class);
          if (isset($classId)) {
              if (isset($this->implements[$classId])) {
                  foreach ($this->implements[$classId] as $interfaceId) {
                      $interfaces[$this->interfaces[$interfaceId]] = 1;
                  }
              }
              foreach ($this->getAncestors($class) as $parent) {
                  foreach ($this->getImplements($parent) as $interface) {
                      $interfaces[$interface] = 1;
                  }
              }
          }
          return array_keys($interfaces);
      }
code: public function getImplements($class)
      {
          $interfaces = [];
          $classId = $this->getClassId($class);
          if (isset($classId)) {
              if (isset($this->implements[$classId])) {
                  foreach ($this->implements[$classId] as $interfaceId) {
                      $interfaces[$this->interfaces[$interfaceId]] = 1;
                  }
              }
              foreach ($this->getAncestors($class) as $parent) {
                  foreach ($this->getImplements($parent) as $interface) {
                      $interfaces[$interface] = 1;
                  }
              }
          }
          return array_keys($interfaces);
      }
code_tokens: public function getImplements ( $ class ) { $ interfaces = [ ] ; $ classId = $ this -> getClassId ( $ class ) ; if ( isset ( $ classId ) ) { if ( isset ( $ this -> implements [ $ classId ] ) ) { foreach ( $ this -> implements [ $ classId ] as $ interfaceId ) { $ interfaces [ $ this -> interfaces [ $ interfaceId ] ] = 1 ; } } foreach ( $ this -> getAncestors ( $ class ) as $ parent ) { foreach ( $ this -> getImplements ( $ parent ) as $ interface ) { $ interfaces [ $ interface ] = 1 ; } } } return array_keys ( $ interfaces ) ; }
docstring: gets implemented interfaces
  
  @param string $class
  @return array|false
docstring_tokens: gets implemented interfaces