original_string: protected function is_valid_type( Icon_Picker_Type $type ) {
  		foreach ( array( 'id', 'controller' ) as $var ) {
  			$value = $type->$var;
  
  			if ( empty( $value ) ) {
  				trigger_error( esc_html( sprintf( 'Icon Picker: "%s" cannot be empty.', $var ) ) );
  				return false;
  			}
  		}
  
  		if ( isset( $this->types[ $type->id ] ) ) {
  			trigger_error( esc_html( sprintf( 'Icon Picker: Icon type %s is already registered. Please use a different ID.', $type->id ) ) );
  			return false;
  		}
  
  		return true;
  	}
code: protected function is_valid_type( Icon_Picker_Type $type ) {
  		foreach ( array( 'id', 'controller' ) as $var ) {
  			$value = $type->$var;
  
  			if ( empty( $value ) ) {
  				trigger_error( esc_html( sprintf( 'Icon Picker: "%s" cannot be empty.', $var ) ) );
  				return false;
  			}
  		}
  
  		if ( isset( $this->types[ $type->id ] ) ) {
  			trigger_error( esc_html( sprintf( 'Icon Picker: Icon type %s is already registered. Please use a different ID.', $type->id ) ) );
  			return false;
  		}
  
  		return true;
  	}
code_tokens: protected function is_valid_type ( Icon_Picker_Type $ type ) { foreach ( array ( 'id' , 'controller' ) as $ var ) { $ value = $ type -> $ var ; if ( empty ( $ value ) ) { trigger_error ( esc_html ( sprintf ( 'Icon Picker: "%s" cannot be empty.' , $ var ) ) ) ; return false ; } } if ( isset ( $ this -> types [ $ type -> id ] ) ) { trigger_error ( esc_html ( sprintf ( 'Icon Picker: Icon type %s is already registered. Please use a different ID.' , $ type -> id ) ) ) ; return false ; } return true ; }
docstring: Check if icon type is valid
  
  @since  0.1.0
  @param  Icon_Picker_Type $type Icon type.
  @return bool
docstring_tokens: Check if icon type is valid