Files
moko-platform/phpcs.xml
T
Jonathan Miller 240ae2f803
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Blocked by required conditions
Platform: moko-platform CI / Gate 4: Governance (push) Blocked by required conditions
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (pull_request) Blocked by required conditions
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (pull_request) Blocked by required conditions
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (pull_request) Blocked by required conditions
Platform: moko-platform CI / Gate 3: Self-Health Check (pull_request) Blocked by required conditions
Platform: moko-platform CI / Gate 4: Governance (pull_request) Blocked by required conditions
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Site Health (pull_request) Has been skipped
Generic: Repo Health / Access control (push) Successful in 2s
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Generic: Repo Health / Access control (pull_request) Successful in 2s
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Successful in 5s
Universal: PR Check / Validate PR (pull_request) Successful in 6s
Generic: Repo Health / Release configuration (pull_request) Successful in 5s
Generic: Repo Health / Scripts governance (pull_request) Successful in 5s
Generic: Repo Health / Release configuration (push) Successful in 9s
Generic: Repo Health / Scripts governance (push) Successful in 10s
Generic: Repo Health / Repository health (push) Successful in 18s
Generic: Repo Health / Repository health (pull_request) Successful in 18s
Platform: moko-platform CI / Gate 1: Code Quality (pull_request) Failing after 1m3s
Platform: moko-platform CI / Gate 1: Code Quality (push) Failing after 1m4s
Platform: moko-platform CI / Gate 5: Template Integrity (pull_request) Has been skipped
Platform: moko-platform CI / Gate 5: Template Integrity (push) Has been skipped
Platform: moko-platform CI / CI Summary (push) Has been cancelled
Platform: moko-platform CI / CI Summary (pull_request) Has been cancelled
fix: repair PHP syntax error in heredoc closers
Heredoc closers must use the same whitespace type (tabs) as the body
content per PHP 7.3+ flexible heredoc rules. Also exclude the
TabsUsedHeredocCloser PHPCS rule since it conflicts with PHP syntax.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-24 17:38:38 -05:00

71 lines
2.7 KiB
XML

<?xml version="1.0"?>
<!--
Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
This file is part of a Moko Consulting project.
SPDX-License-Identifier: GPL-3.0-or-later
-->
<ruleset name="MokoStandards PHP Coding Standards">
<description>PHP_CodeSniffer configuration for MokoStandards projects</description>
<!-- Files to check -->
<file>lib</file>
<file>validate</file>
<file>automation</file>
<file>cli</file>
<!-- Exclude vendor and other dependencies -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/.git/*</exclude-pattern>
<!-- Use PSR-12 as base standard -->
<rule ref="PSR12">
<!-- CLI scripts mix declarations and side effects by design -->
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols"/>
<!-- CLI scripts and utility files often lack namespaces -->
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace"/>
<!-- Multiple helper classes per file in lib/ is intentional -->
<exclude name="PSR1.Classes.ClassDeclaration.MultipleClasses"/>
<!-- File header ordering is advisory -->
<exclude name="PSR12.Files.FileHeader.IncorrectOrder"/>
<!-- Heredoc closers must match body indentation (tabs) per PHP 7.3+ -->
<exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsedHeredocCloser"/>
</rule>
<!-- Additional rules -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<rule ref="Generic.CodeAnalysis.EmptyStatement">
<!-- Allow empty catch blocks (used for intentional suppression) -->
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCatch"/>
</rule>
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120"/>
<property name="absoluteLineLimit" value="150"/>
</properties>
</rule>
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array">
<element key="eval" value="null"/>
<element key="create_function" value="null"/>
<element key="var_dump" value="null"/>
<element key="print_r" value="null"/>
</property>
</properties>
</rule>
<rule ref="Squiz.PHP.CommentedOutCode"/>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/>
<!-- Show progress and use colors -->
<arg value="p"/>
<arg name="colors"/>
<!-- Show sniff codes in all reports -->
<arg value="s"/>
</ruleset>