original_string: public static function validate(string $key) : bool
      {
          $le = strlen($key);
          if ($le < static::VALID_LENGTH_MIN || $le > static::VALID_LENGTH_MAX) {
              return false;
          }
          if ($key{0} === '-') {
              return false;
          }
          // Faster than a regular expression.
          // Prefix letter to make key without any alphanum pass.
          return !!ctype_alnum('A' . str_replace(static::VALID_NON_ALPHANUM, '', $key));
      }
code: public static function validate(string $key) : bool
      {
          $le = strlen($key);
          if ($le < static::VALID_LENGTH_MIN || $le > static::VALID_LENGTH_MAX) {
              return false;
          }
          if ($key{0} === '-') {
              return false;
          }
          // Faster than a regular expression.
          // Prefix letter to make key without any alphanum pass.
          return !!ctype_alnum('A' . str_replace(static::VALID_NON_ALPHANUM, '', $key));
      }
code_tokens: public static function validate ( string $ key ) : bool { $ le = strlen ( $ key ) ; if ( $ le < static :: VALID_LENGTH_MIN || $ le > static :: VALID_LENGTH_MAX ) { return false ; } if ( $ key { 0 } === '-' ) { return false ; } // Faster than a regular expression. // Prefix letter to make key without any alphanum pass. return ! ! ctype_alnum ( 'A' . str_replace ( static :: VALID_NON_ALPHANUM , '' , $ key ) ) ; }
docstring: Checks that length and content is legal.
  
  First char cannot be hyphen, because that could break CLI interaction.
  
  @param string $key
  
  @return bool
docstring_tokens: Checks that length and content is legal .