diff --git a/CHANGELOG.md b/CHANGELOG.md index 02a7b19..82206cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). The format of this change log follows the advice given at [Keep a CHANGELOG](http://keepachangelog.com). ## [Unreleased] +### Revert +- Revert the check for the only one-space rule before the assignment operator @ `Squiz.WhiteSpace.OperatorSpacing` as an interim solution while we revisit MDLSITE-6594. ## [v3.3.2] - 2023-02-13 ### Added diff --git a/moodle/Tests/MoodleStandardTest.php b/moodle/Tests/MoodleStandardTest.php index b4ba78e..e4d940a 100644 --- a/moodle/Tests/MoodleStandardTest.php +++ b/moodle/Tests/MoodleStandardTest.php @@ -704,49 +704,50 @@ public function test_squiz_operator_spacing() { // - line => array of contents for message / source problem matching. // - line => string of contents for message / source problem matching (only 1). $this->set_errors(array( - 7 => 0, - 8 => 'Expected 1 space before', - 9 => 'Expected 1 space after', - 10 => array('Expected 1 space before', 'Expected 1 space after'), - 11 => 'Expected 1 space before "=>"; 3 found', - 12 => 'Expected 1 space after "=>"; 3 found', + 6 => 0, + 7 => 'Expected 1 space before', + 8 => 'Expected 1 space after', + 9 => array('Expected 1 space before', 'Expected 1 space after'), + 10 => 0, + 11 => 'Expected 1 space after "=>"; 3 found', + 12 => 0, 13 => 0, - 14 => 0, - 15 => 'Expected 1 space before', - 16 => 'Expected 1 space after', - 17 => array('Expected 1 space before', 'Expected 1 space after'), - 18 => 0, - 19 => 'Expected 1 space after "="; 2 found', - 20 => 'Expected 1 space before "="; 2 found', + 14 => 'Expected 1 space before', + 15 => 'Expected 1 space after', + 16 => array('Expected 1 space before', 'Expected 1 space after'), + 17 => 0, + 18 => 'Expected 1 space after "="; 2 found', + 19 => 0, + 20 => 0, 21 => 0, - 22 => 0, - 23 => 'Expected 1 space before', - 24 => 'Expected 1 space after', - 25 => array('Expected 1 space before', 'Expected 1 space after'), - 26 => 0, - 27 => 'Expected 1 space after "+"; 2 found', - 28 => 'Expected 1 space before "+"; 2 found', - 29 => 0, - 30 => 'Expected 1 space before', - 31 => 'Expected 1 space after', - 32 => array('Expected 1 space before', 'Expected 1 space after'), - 33 => 0, - 34 => 'Expected 1 space after "-"; 2 found', - 35 => 'Expected 1 space before "-"; 2 found', - 36 => 0, - 37 => 'Expected 1 space before', - 38 => 'Expected 1 space after', - 39 => array('Expected 1 space before', 'Expected 1 space after'), - 40 => 0, - 41 => 'Expected 1 space after "*"; 2 found', - 42 => 'Expected 1 space before "*"; 2 found', - 43 => 0, - 44 => 'Expected 1 space before', - 45 => 'Expected 1 space after', - 46 => array('Expected 1 space before', 'Expected 1 space after'), - 47 => 0, - 48 => 'Expected 1 space after "/"; 2 found', - 49 => 'Expected 1 space before "/"; 2 found', + 22 => 'Expected 1 space before', + 23 => 'Expected 1 space after', + 24 => array('Expected 1 space before', 'Expected 1 space after'), + 25 => 0, + 26 => 'Expected 1 space after "+"; 2 found', + 27 => 'Expected 1 space before "+"; 2 found', + 28 => 0, + 29 => 'Expected 1 space before', + 30 => 'Expected 1 space after', + 31 => array('Expected 1 space before', 'Expected 1 space after'), + 32 => 0, + 33 => 'Expected 1 space after "-"; 2 found', + 34 => 'Expected 1 space before "-"; 2 found', + 35 => 0, + 36 => 'Expected 1 space before', + 37 => 'Expected 1 space after', + 38 => array('Expected 1 space before', 'Expected 1 space after'), + 39 => 0, + 40 => 'Expected 1 space after "*"; 2 found', + 41 => 'Expected 1 space before "*"; 2 found', + 42 => 0, + 43 => 'Expected 1 space before', + 44 => 'Expected 1 space after', + 45 => array('Expected 1 space before', 'Expected 1 space after'), + 46 => 0, + 47 => 'Expected 1 space after "/"; 2 found', + 48 => 'Expected 1 space before "/"; 2 found', + 49 => 0, 50 => 0, 51 => 0, 52 => 0, @@ -760,8 +761,7 @@ public function test_squiz_operator_spacing() { 60 => 0, 61 => 0, 62 => 0, - 63 => 0, - 64 => 0 + 63 => 0 )); $this->set_warnings(array()); diff --git a/moodle/Tests/fixtures/squiz_whitespace_operatorspacing.php b/moodle/Tests/fixtures/squiz_whitespace_operatorspacing.php index 0a0937e..50db622 100644 --- a/moodle/Tests/fixtures/squiz_whitespace_operatorspacing.php +++ b/moodle/Tests/fixtures/squiz_whitespace_operatorspacing.php @@ -1,5 +1,4 @@ phpcs:set Squiz.WhiteSpace.OperatorSpacing ignoreNewlines true -phpcs:set Squiz.WhiteSpace.OperatorSpacing ignoreSpacingBeforeAssignments false -