Indents inside anonymous functions used as argument in a function.

Created on 25 November 2023, 7 months ago

Problem/Motivation

No warning or error on this code:

array_map(function ($i) {
  if ($i == 1) {
                // No warning.
            $result = 'changed';
          return $result;
  }
              // No warning.
                  return $i;
}, [1, 2, 3, 4]);

usort($values, function ($a, $b) {
  if ($a > $b) {
              echo 4;
              return 5;
  }
     return SortArray::sortByKeyInt($a, $b, '_weight');
});

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

8.3

Component

Coder Sniffer

Created by

πŸ‡·πŸ‡ΊRussia zniki.ru

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024