original_string: public function hasComponentType($class_name) {
      /** @var \ChapterThree\AppleNewsAPI\Document\Components\Component $comp */
      foreach ($this->components as $comp) {
        if ($comp instanceof $class_name) {
          return TRUE;
        }
        if ($comp instanceof ComponentNested) {
          /** @var \ChapterThree\AppleNewsAPI\Document\Components\ComponentNested $comp */
          if ($comp->hasComponentType($class_name)) {
            return TRUE;
          }
        }
      }
      return FALSE;
    }
code: public function hasComponentType($class_name) {
      /** @var \ChapterThree\AppleNewsAPI\Document\Components\Component $comp */
      foreach ($this->components as $comp) {
        if ($comp instanceof $class_name) {
          return TRUE;
        }
        if ($comp instanceof ComponentNested) {
          /** @var \ChapterThree\AppleNewsAPI\Document\Components\ComponentNested $comp */
          if ($comp->hasComponentType($class_name)) {
            return TRUE;
          }
        }
      }
      return FALSE;
    }
code_tokens: public function hasComponentType ( $ class_name ) { /** @var \ChapterThree\AppleNewsAPI\Document\Components\Component $comp */ foreach ( $ this -> components as $ comp ) { if ( $ comp instanceof $ class_name ) { return TRUE ; } if ( $ comp instanceof ComponentNested ) { /** @var \ChapterThree\AppleNewsAPI\Document\Components\ComponentNested $comp */ if ( $ comp -> hasComponentType ( $ class_name ) ) { return TRUE ; } } } return FALSE ; }
docstring: Component has a child of a certain type.
docstring_tokens: Component has a child of a certain type .