All checks were successful
CI / Coding Standards (push) Successful in 44s
CI / PHPStan (push) Successful in 49s
CI / Tests (PHP 8.1) (push) Successful in 54s
CI / Tests (PHP 8.2) (push) Successful in 51s
CI / Tests (PHP 8.3) (push) Successful in 39s
CI / No Debug Code (push) Successful in 3s
- Add phpcs.xml.dist: excludes PSR-4 file naming, camelCase naming, short array syntax, and redundant per-method/property docblocks - Fix wp_unslash() on all $_POST reads (LoginPage, AvailabilityController) - Add phpcs:ignore for password field (must not be sanitized) - Fix Yoda conditions throughout (AvailabilityRepository, AvailabilityEndpoint, BookingEndpoint, AvailabilityController) - Fix inline comments to end with full stops (AdminMenu) - Replace short ternary ?: with explicit full ternary (BookingEndpoint) - Rename $namespace param to $route_namespace (reserved keyword warning) - Add short descriptions to doc blocks that had tag-only blocks - Add nonce suppression comment in handleFormAction (nonce verified by caller) - Update composer.json and CI to use phpcs.xml.dist Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
51 lines
1.9 KiB
XML
51 lines
1.9 KiB
XML
<?xml version="1.0"?>
|
|
<ruleset name="Unsupervised Scheduler">
|
|
<description>WordPress coding standards with PSR-4 naming accommodations.</description>
|
|
|
|
<file>src</file>
|
|
|
|
<rule ref="WordPress">
|
|
<!--
|
|
PSR-4 requires PascalCase filenames. WordPress expects lowercase-hyphenated.
|
|
We follow PSR-4 because Composer autoloading depends on it.
|
|
-->
|
|
<exclude name="WordPress.Files.FileName"/>
|
|
|
|
<!--
|
|
We use camelCase for class method names and property names per PSR-1.
|
|
WordPress snake_case naming is excluded for class-based OOP code.
|
|
-->
|
|
<exclude name="WordPress.NamingConventions.ValidFunctionName"/>
|
|
<exclude name="WordPress.NamingConventions.ValidVariableName"/>
|
|
|
|
<!--
|
|
Short array syntax [] is preferred in modern PHP and is now accepted
|
|
in the WordPress handbook for code targeting PHP 5.4+.
|
|
-->
|
|
<exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
|
|
|
|
<!--
|
|
PHP 8.1 typed properties, constructor promotion, and return types make
|
|
per-property and per-method docblocks largely redundant. We document
|
|
non-obvious behaviour in method docblocks where it adds real value.
|
|
-->
|
|
<exclude name="Squiz.Commenting.FunctionComment"/>
|
|
<exclude name="Squiz.Commenting.VariableComment"/>
|
|
<exclude name="Squiz.Commenting.FileComment"/>
|
|
<exclude name="Squiz.Commenting.ClassComment"/>
|
|
</rule>
|
|
|
|
<!-- Enforce our text domain. -->
|
|
<rule ref="WordPress.WP.I18n">
|
|
<properties>
|
|
<property name="text_domain" type="array">
|
|
<element value="unsupervised-schedular"/>
|
|
</property>
|
|
</properties>
|
|
</rule>
|
|
|
|
<!-- PHP 8.1+ minimum — allow modern syntax. -->
|
|
<config name="minimum_supported_wp_version" value="6.0"/>
|
|
<config name="testVersion" value="8.1-"/>
|
|
</ruleset>
|