Skip to content

Fix the wp_parse_args function

e4ec5b7
Select commit
Loading
Failed to load commit list.
Draft

[WIP] Ajout des tests unitaires PHP #215

Fix the wp_parse_args function
e4ec5b7
Select commit
Loading
Failed to load commit list.
Codacy Production / Codacy Static Code Analysis required action Oct 22, 2025 in 0s

5 new issues (0 max.) of at least severity.

Codacy Here is an overview of what got changed by this pull request:

Issues
======
- Added 5
           

Complexity increasing per file
==============================
- tests/Services/SvgTest.php  9
- tests/Helpers/Formatting/EscapeTest.php  4
- tests/Tools/Template_Parts_Test.php  7
- tests/Helpers/Formatting/ImageTest.php  5
- tests/polyfills.php  6
- tests/Services/AssetsTest.php  15
- tests/Tools/Body_Class_Test.php  7
- tests/Helpers/Formatting/LinkTest.php  6
- tests/Tools/AssetsTest.php  6
- tests/Services/AcfTest.php  9
- tests/Helpers/Formatting/TextTest.php  7
- tests/FrameworkTest.php  5
         

See the complete overview on Codacy

Annotations

Check warning on line 39 in .github/workflows/php-quality.yml

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

.github/workflows/php-quality.yml#L39

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.

Check warning on line 33 in tests/Helpers/Formatting/LinkTest.php

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

tests/Helpers/Formatting/LinkTest.php#L33

The method testGetTheLinkTargetBlank() has 118 lines of code. Current threshold is set to 100. Avoid really long methods.

Check warning on line 16 in tests/Services/AssetsTest.php

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

tests/Services/AssetsTest.php#L16

The class AssetsTest has 14 non-getter- and setter-methods. Consider refactoring AssetsTest to keep number of methods under 10.

Check notice on line 21 in tests/Services/AssetsTest.php

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

tests/Services/AssetsTest.php#L21

Avoid excessively long variable names like $runTestInSeparateProcess. Keep variable name length under 20.

Check notice on line 12 in tests/polyfills.php

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

tests/polyfills.php#L12

The method wp_parse_args uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.