original_string: public static function ensure($binary)
      {
          if ($binary === null || is_string($binary)) {
              $binary  = new static($binary);
          }
          if (!($binary instanceof static)) {
              throw new \InvalidArgumentException(
                  sprintf(
                      'The $binary argument must either be a TQ\Vcs\Binary
                      instance or a path to the VCS binary (%s given)',
                      (is_object($binary)) ? get_class($binary) : gettype($binary)
                  )
              );
          }
          return $binary;
      }
code: public static function ensure($binary)
      {
          if ($binary === null || is_string($binary)) {
              $binary  = new static($binary);
          }
          if (!($binary instanceof static)) {
              throw new \InvalidArgumentException(
                  sprintf(
                      'The $binary argument must either be a TQ\Vcs\Binary
                      instance or a path to the VCS binary (%s given)',
                      (is_object($binary)) ? get_class($binary) : gettype($binary)
                  )
              );
          }
          return $binary;
      }
code_tokens: public static function ensure ( $ binary ) { if ( $ binary === null || is_string ( $ binary ) ) { $ binary = new static ( $ binary ) ; } if ( ! ( $ binary instanceof static ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The $binary argument must either be a TQ\Vcs\Binary
                      instance or a path to the VCS binary (%s given)' , ( is_object ( $ binary ) ) ? get_class ( $ binary ) : gettype ( $ binary ) ) ) ; } return $ binary ; }
docstring: Ensures that the given arguments is a valid VCS binary
  
  @param   Binary|string|null          $binary     The VCS binary
  @return  static
  @throws  \InvalidArgumentException               If $binary is not a valid VCS binary
docstring_tokens: Ensures that the given arguments is a valid VCS binary