Commit d2fb43a8 authored by catch's avatar catch
Browse files

Issue #2719657 by quietone, andypost, Mile23, Spokje, ilya.no, xjm, alexpott,...

Issue #2719657 by quietone, andypost, Mile23, Spokje, ilya.no, xjm, alexpott, smustgrave: Fix 'Drupal.Commenting.InlineComment.NotCapital' coding standard

(cherry picked from commit 833aa93b)
parent 36c1fe66
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -419,7 +419,7 @@ protected function createExtensionChangelist() {
    //   'text' => -1,
    // );
    // @endcode
    // will result in the following sort order:
    // Will result in the following sort order:
    // 1. -2   options
    // 2. -1   text
    // 3.  0 0 ban
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ public function chmodJailed($path, $mode, $recursive) {
    if ($this->isDirectory($path) && $recursive) {
      $file_list = @ftp_nlist($this->connection, $path);
      if (!$file_list) {
        // empty directory - returns false
        // Empty directory - returns false
        return;
      }
      foreach ($file_list as $file) {
+1 −1
Original line number Diff line number Diff line
@@ -1271,7 +1271,7 @@ public function cleanValues() {
      // @code
      //   array('foo', 'bar', 'baz')
      // @endcode
      // then the corresponding self::getValues() part will look like this:
      // Then the corresponding self::getValues() part will look like this:
      // @code
      // array(
      //   'foo' => array(
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ public static function valueCallback(&$element, $input, FormStateInterface $form
        // in the same spot for its name, with '_x'.
        $input = $form_state->getUserInput();
        foreach (explode('[', $element['#name']) as $element_name) {
          // chop off the ] that may exist.
          // Chop off the ] that may exist.
          if (str_ends_with($element_name, ']')) {
            $element_name = substr($element_name, 0, -1);
          }
+4 −4
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ class UrlGenerator implements UrlGeneratorInterface {
   * @see \Symfony\Component\Routing\Generator\UrlGenerator
   */
  protected $decodedChars = [
    // the slash can be used to designate a hierarchical structure and we want allow using it with this meaning
    // The slash can be used to designate a hierarchical structure and we want allow using it with this meaning
    // some webservers don't allow the slash in encoded form in the path for security reasons anyway
    // see http://stackoverflow.com/questions/4069002/http-400-if-2f-part-of-get-url-in-jboss
    // Map from these encoded characters.
@@ -182,7 +182,7 @@ protected function doGenerate(array $variables, array $defaults, array $tokens,
    $variables = array_flip($variables);
    $mergedParams = array_replace($defaults, $this->context->getParameters(), $parameters);

    // all params must be given
    // All params must be given
    if ($diff = array_diff_key($variables, $mergedParams)) {
      throw new MissingMandatoryParametersException($name, array_keys($diff));
    }
@@ -203,7 +203,7 @@ protected function doGenerate(array $variables, array $defaults, array $tokens,
    foreach ($tokens as $token) {
      if ('variable' === $token[0]) {
        if (!$optional || !array_key_exists($token[3], $defaults) || (isset($mergedParams[$token[3]]) && (string) $mergedParams[$token[3]] !== (string) $defaults[$token[3]])) {
          // check requirement
          // Check requirement
          if (!preg_match('#^' . $token[2] . '$#', $mergedParams[$token[3]])) {
            $message = sprintf('Parameter "%s" for route "%s" must match "%s" ("%s" given) to generate a corresponding URL.', $token[3], $name, $token[2], $mergedParams[$token[3]]);
            throw new InvalidParameterException($message);
@@ -315,7 +315,7 @@ public function generateFromRoute($name, $parameters = [], $options = [], $colle

    // Drupal paths rarely include dots, so skip this processing if possible.
    if (str_contains($path, '/.')) {
      // the path segments "." and ".." are interpreted as relative reference when
      // The path segments "." and ".." are interpreted as relative reference when
      // resolving a URI; see http://tools.ietf.org/html/rfc3986#section-3.3
      // so we need to encode them as they are not used for this purpose here
      // otherwise we would generate a URI that, when followed by a user agent
Loading