Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDLSITE-6594 revert #44

Merged
merged 3 commits into from
Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
86 changes: 43 additions & 43 deletions moodle/Tests/MoodleStandardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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());

Expand Down
1 change: 0 additions & 1 deletion moodle/Tests/fixtures/squiz_whitespace_operatorspacing.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
phpcs:set Squiz.WhiteSpace.OperatorSpacing ignoreNewlines true
phpcs:set Squiz.WhiteSpace.OperatorSpacing ignoreSpacingBeforeAssignments false
<?php
defined('MOODLE_INTERNAL') || die(); // Make this always the 1st line in all CS fixtures.

Expand Down
1 change: 0 additions & 1 deletion moodle/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
<rule ref="Squiz.WhiteSpace.OperatorSpacing">
<properties>
<property name="ignoreNewlines" value="true"/>
<property name="ignoreSpacingBeforeAssignments" value="false" />
</properties>
</rule>
<rule ref="Squiz.WhiteSpace.ObjectOperatorSpacing">
Expand Down