Skip to content

Commit 30646e6

Browse files
fox91claude
andcommitted
feat!: remove Fox91CodingStandardStrict standard
The strict variant has been removed. Only Fox91CodingStandard remains. Updates documentation and test suite accordingly. πŸ€– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d502ee2 commit 30646e6

File tree

354 files changed

+10
-10387
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

354 files changed

+10
-10387
lines changed

β€ŽCLAUDE.mdβ€Ž

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
44

55
## Project Overview
66

7-
This is a PHP_CodeSniffer coding standard package that provides two rulesets: `Fox91CodingStandard` (standard) and `Fox91CodingStandardStrict` (strict). The project is distributed as a Composer package and integrates multiple PHP coding standard tools.
7+
This is a PHP_CodeSniffer coding standard package that provides the `Fox91CodingStandard` ruleset. The project is distributed as a Composer package and integrates multiple PHP coding standard tools.
88

99
**Supported PHP Versions**: 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5
1010

@@ -20,12 +20,8 @@ composer install
2020
# Check code against Fox91CodingStandard
2121
./vendor/bin/phpcs --standard=Fox91CodingStandard <path>
2222

23-
# Check code against Fox91CodingStandardStrict
24-
./vendor/bin/phpcs --standard=Fox91CodingStandardStrict <path>
25-
2623
# Auto-fix code style issues
2724
./vendor/bin/phpcbf --standard=Fox91CodingStandard <path>
28-
./vendor/bin/phpcbf --standard=Fox91CodingStandardStrict <path>
2925

3026
# List installed coding standards
3127
./vendor/bin/phpcs -i
@@ -58,21 +54,13 @@ composer validate --strict --with-dependencies
5854

5955
### Ruleset Structure
6056

61-
The project defines two coding standards as PHP_CodeSniffer rulesets:
62-
63-
1. **Fox91CodingStandard** (`Fox91CodingStandard/ruleset.xml`): The base standard
64-
- Imports rules from Generic, PSR1, PSR2, PSR12, Squiz, PHPCompatibility, SlevomatCodingStandard, and VariableAnalysis
65-
- Configures forbidden functions (e.g., forbids `compact`, `extract`, `create_function`)
66-
- Enforces strict types declaration
67-
- Requires type hints for parameters, properties, and return values
68-
- Enforces trailing commas in arrays and function calls
69-
- Several sniffs set to "warning" level for flexibility
70-
71-
2. **Fox91CodingStandardStrict** (`Fox91CodingStandardStrict/ruleset.xml`): Extends the base standard
72-
- References `Fox91CodingStandard` and adds stricter rules
73-
- Includes full PSR2 compliance
74-
- Enables nearly all SlevomatCodingStandard sniffs with specific exclusions
75-
- Promotes variable naming warnings to errors
57+
The project defines **Fox91CodingStandard** (`Fox91CodingStandard/ruleset.xml`):
58+
- Imports rules from Generic, PSR1, PSR2, PSR12, Squiz, PHPCompatibility, SlevomatCodingStandard, and VariableAnalysis
59+
- Configures forbidden functions (e.g., forbids `compact`, `extract`, `create_function`)
60+
- Enforces strict types declaration
61+
- Requires type hints for parameters, properties, and return values
62+
- Enforces trailing commas in arrays and function calls
63+
- Several sniffs set to "warning" level for flexibility
7664

7765
### Dependencies
7866

@@ -94,7 +82,7 @@ Optional:
9482
**Type Hints**: Array type hints disallowed (use specific types like `array<string>` in docblocks)
9583
**Trailing Commas**: Required in arrays and function calls
9684
**Yoda Conditions**: Disallowed
97-
**Function Length**: Warning at 40 lines (standard only)
85+
**Function Length**: Warning at 40 lines
9886

9987
## CI/CD
10088

@@ -108,5 +96,4 @@ GitHub Actions workflow (`.github/workflows/php-ci.yml`) tests against:
10896

10997
- The test suite requires multiple PHP versions installed locally (php7.4, php8.0, etc.)
11098
- PHPCompatibility checks require setting `testVersion` config (e.g., `--runtime-set testVersion 7.4-`)
111-
- The strict standard is significantly more opinionated and may require substantial code changes
112-
- When modifying rulesets, test against all PHP versions using `./tests/run.sh`
99+
- When modifying the ruleset, test against all PHP versions using `./tests/run.sh`

β€ŽFox91CodingStandardStrict/ruleset.xmlβ€Ž

Lines changed: 0 additions & 83 deletions
This file was deleted.

β€ŽREADME.mdβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,5 @@ Create a file named `.phpcs.xml.dist` in the root of your project:
5353
<!-- <config name="testVersion" value="7.4"/> -->
5454

5555
<rule ref="Fox91CodingStandard"/>
56-
<!-- <rule ref="Fox91CodingStandardStrict"/> -->
5756
</ruleset>
5857
```

β€Žtests/fixed/php-7.4/Fox91CodingStandardStrict/ClassPropertySpacing.phpβ€Ž

Lines changed: 0 additions & 19 deletions
This file was deleted.

β€Žtests/fixed/php-7.4/Fox91CodingStandardStrict/ControlStructures.phpβ€Ž

Lines changed: 0 additions & 139 deletions
This file was deleted.

β€Žtests/fixed/php-7.4/Fox91CodingStandardStrict/EarlyReturn.phpβ€Ž

Lines changed: 0 additions & 43 deletions
This file was deleted.

β€Žtests/fixed/php-7.4/Fox91CodingStandardStrict/ExampleBackedEnum.phpβ€Ž

Lines changed: 0 additions & 8 deletions
This file was deleted.

β€Žtests/fixed/php-7.4/Fox91CodingStandardStrict/Exceptions.phpβ€Ž

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
Β (0)