original_string: public final function drawSingleBorder( $borderColor, bool $internal = true )
        : IImage
     {
  
        $borderColor = $this->getGdColorObject( $borderColor, 'bordercolor' );
  
        if ( $internal )
        {
  
           \imagerectangle( $this->r, 1, 1, $this->getWidth() - 2, $this->getHeight() - 2, $borderColor->getGdValue() );
  
           return $this;
  
        }
  
        $res = clone $this;
        \imagerectangle( $res->r, 1, 1, $this->getWidth() - 2, $this->getHeight() - 2, $borderColor->getGdValue() );
  
        return $res;
  
     }
code: public final function drawSingleBorder( $borderColor, bool $internal = true )
        : IImage
     {
  
        $borderColor = $this->getGdColorObject( $borderColor, 'bordercolor' );
  
        if ( $internal )
        {
  
           \imagerectangle( $this->r, 1, 1, $this->getWidth() - 2, $this->getHeight() - 2, $borderColor->getGdValue() );
  
           return $this;
  
        }
  
        $res = clone $this;
        \imagerectangle( $res->r, 1, 1, $this->getWidth() - 2, $this->getHeight() - 2, $borderColor->getGdValue() );
  
        return $res;
  
     }
code_tokens: public final function drawSingleBorder ( $ borderColor , bool $ internal = true ) : IImage { $ borderColor = $ this -> getGdColorObject ( $ borderColor , 'bordercolor' ) ; if ( $ internal ) { \ imagerectangle ( $ this -> r , 1 , 1 , $ this -> getWidth ( ) - 2 , $ this -> getHeight ( ) - 2 , $ borderColor -> getGdValue ( ) ) ; return $ this ; } $ res = clone $ this ; \ imagerectangle ( $ res -> r , 1 , 1 , $ this -> getWidth ( ) - 2 , $ this -> getHeight ( ) - 2 , $ borderColor -> getGdValue ( ) ) ; return $ res ; }
docstring: Draws a single border with defined color around the image.
  
  @param  string|array|\Beluga\Drawing\ColorGD|\Beluga\Drawing\Color $borderColor
  @param  bool                                                       $internal    Do not create a new instance?
  @return \Beluga\Drawing\Image\IImage
docstring_tokens: Draws a single border with defined color around the image .