Skip to content
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ The format of this change log follows the advice given at [Keep a CHANGELOG](htt
- Automated fixes for the following sniffs were removed as they can cause unwanted changes:
- `moodle.NamingConventions.ValidFunctionName`
- `moodle.NamingConventions.ValidVariableName`
### Changed
- Dropped the following deprecated sniffs:
- `Squiz.Classes.DuplicateProperty` - JS only
- `Generic.Functions.CallTimePassByReference` - PHP support dropped in PHP 5.4
### Fixed
- Update incorrect use of legacy ruleset format.

## [v3.5.2] - 2025-08-14
### Fixed
Expand Down
25 changes: 0 additions & 25 deletions moodle/Tests/MoodleStandardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -716,31 +716,6 @@ public function testPHPCompatibilityFunctionUseRemovedFunctions() {
$this->verifyCsResults();
}

/**
* Test call time pass by reference.
*
* @covers \PHPCompatibility\Sniffs\Syntax\ForbiddenCallTimePassByReferenceSniff
*/
public function testPHPCompatibilitySyntaxForbiddenCallTimePassByReference() {

// Define the standard, sniff and fixture to use.
$this->setStandard('moodle');
$this->setSniff('PHPCompatibility.Syntax.ForbiddenCallTimePassByReference');
$this->setFixture(__DIR__ . '/fixtures/phpcompatibility_php_forbiddencalltimepassbyreference.php');

// Define expected results (errors and warnings). Format, array of:
// - line => number of problems, or
// - line => array of contents for message / source problem matching.
// - line => string of contents for message / source problem matching (only 1).
$this->setErrors([
6 => ['call-time pass-by-reference is deprecated'],
7 => ['@Source: PHPCompat']]);
$this->setWarnings([]);

// Let's do all the hard work!
$this->verifyCsResults();
}

/**
* Test variable naming standards
*
Expand Down
6 changes: 3 additions & 3 deletions moodle/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,18 @@

<rule ref="Generic.ControlStructures.InlineControlStructure"/>

<rule ref="Generic.Functions.CallTimePassByReference"/>
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie"/>

<rule ref="Generic.NamingConventions.ConstructorName"/>

<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="ignoreIndentationTokens" type="array" value="T_CLOSE_TAG"/>
<property name="ignoreIndentationTokens" type="array">
<element value="T_CLOSE_TAG"/>
</property>
</properties>
</rule>

<rule ref="Squiz.Classes.DuplicateProperty"/>
<rule ref="Squiz.Classes.LowercaseClassKeywords"/>
<rule ref="Squiz.Classes.SelfMemberReference"/>

Expand Down
Loading