original_string: public static function isValidDestination($destination, $exclude = [])
      {
          self::$error = 0;
          self::$target = $destination;
  
          if (is_link($destination)) {
              self::$error = self::IS_LINK;
          } elseif (file_exists($destination)) {
              self::$error = self::EXISTS;
          } elseif (!file_exists($destination)) {
              self::$error = self::NOT_FOUND;
          } elseif (!is_dir($destination)) {
              self::$error = self::NOT_DIRECTORY;
          }
  
          if (\count($exclude) && \in_array(self::$error, $exclude, true)) {
              return true;
          }
  
          return !self::$error;
      }
code: public static function isValidDestination($destination, $exclude = [])
      {
          self::$error = 0;
          self::$target = $destination;
  
          if (is_link($destination)) {
              self::$error = self::IS_LINK;
          } elseif (file_exists($destination)) {
              self::$error = self::EXISTS;
          } elseif (!file_exists($destination)) {
              self::$error = self::NOT_FOUND;
          } elseif (!is_dir($destination)) {
              self::$error = self::NOT_DIRECTORY;
          }
  
          if (\count($exclude) && \in_array(self::$error, $exclude, true)) {
              return true;
          }
  
          return !self::$error;
      }
code_tokens: public static function isValidDestination ( $ destination , $ exclude = [ ] ) { self :: $ error = 0 ; self :: $ target = $ destination ; if ( is_link ( $ destination ) ) { self :: $ error = self :: IS_LINK ; } elseif ( file_exists ( $ destination ) ) { self :: $ error = self :: EXISTS ; } elseif ( ! file_exists ( $ destination ) ) { self :: $ error = self :: NOT_FOUND ; } elseif ( ! is_dir ( $ destination ) ) { self :: $ error = self :: NOT_DIRECTORY ; } if ( \ count ( $ exclude ) && \ in_array ( self :: $ error , $ exclude , true ) ) { return true ; } return ! self :: $ error ; }
docstring: Runs a set of checks on the destination and sets the Error if any
  
  @param  string $destination The directory to run validations at
  @param  array  $exclude     An array of constants to exclude from the validation
  
  @return bool True if validation passed. False otherwise
docstring_tokens: Runs a set of checks on the destination and sets the Error if any