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
1 change: 0 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository
github: D3strukt0r
patreon: d3strukt0r
open_collective: d3strukt0r
buy_me_a_coffee: d3strukt0r
50 changes: 0 additions & 50 deletions .github/ISSUE_TEMPLATE/1-bug-report.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/ISSUE_TEMPLATE/2-feature-request.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

Empty file.
25 changes: 0 additions & 25 deletions .github/feature-or-bug.md

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches:
- main
branches: [main, develop]
pull_request:
branches: [main, develop]

permissions:
contents: read
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ name: Labeler

on: [pull_request]

permissions:
contents: read
pull-requests: write # Adding Existing Labels
issues: write # Creating New Labels

jobs:
label:
name: Label PR
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write # Adding Existing Labels
issues: write # Creating New Labels
steps:
- name: Label PR
uses: actions/labeler@v6
Expand Down
19 changes: 9 additions & 10 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

require_once __DIR__.'/vendor/autoload.php';

use IWF\CodingStandard\IWFRiskySet;
use IWF\CodingStandard\IWFSet;
use IWFWeb\CodingStandard\IWFWebStandardRiskySet;
use IWFWeb\CodingStandard\IWFWebStandardSet;
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;

$year = date('Y');
$header = <<<EOF
Expand All @@ -23,24 +22,24 @@
// https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/doc/rules/index.rst
return (new Config())
->registerCustomRuleSets([
new IWFSet(),
new IWFRiskySet(),
new IWFWebStandardSet(),
new IWFWebStandardRiskySet(),
])
->setFinder(Finder::create()
->in(__DIR__)
->ignoreDotFiles(false)
->ignoreVCSIgnored(true)
->notPath('.php-cs-fixer.dist.php')
->ignoreVCSIgnored(true),
)
->setParallelConfig(ParallelConfigFactory::detect())
->setUnsupportedPhpVersionAllowed(true)
->setRiskyAllowed(true)
->setRules([
'@IWF/standard' => true,
'@IWF/standard:risky' => true,
'@IWFWeb/standard' => true,
'@IWFWeb/standard:risky' => true,
'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => $header,
],
])
;

// @php-cs-fixer-ignore header_comment
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"editor.formatOnSave": true,
"editor.formatOnSave": false,
"[php]": {
"editor.tabSize": 4,
"editor.defaultFormatter": "junstyle.php-cs-fixer"
Expand Down
5 changes: 0 additions & 5 deletions ACKNOWLEDGMENTS.md

This file was deleted.

5 changes: 0 additions & 5 deletions AUTHORS.md

This file was deleted.

24 changes: 14 additions & 10 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
## Project Overview

This is a Composer package (`iwf-web/php-coding-standard`) that provides custom PHP-CS-Fixer rule sets for IWF Web Solutions projects. It defines two rule sets:
- `@IWF/standard` - Non-risky formatting rules
- `@IWF/standard:risky` - Risky rules that may alter code behavior
- `@IWFWeb/standard` - Non-risky formatting rules
- `@IWFWeb/standard:risky` - Risky rules that may alter code behavior

## Commands

Expand All @@ -30,30 +30,34 @@ No test suite exists - this is a configuration library.

The package contains two source files in `src/`:

- **IWFSet.php** - Extends `AbstractRuleSetDefinition`, returns `@IWF/standard`. Builds on `@PhpCsFixer` with customizations: no Yoda style, strict types at file top (no blank line), trailing commas everywhere, preserved single-line DocBlocks.
- **IWFWebStandardSet.php** - Extends `AbstractRuleSetDefinition`, returns `@IWFWeb/standard`. Builds on `@PhpCsFixer` with customizations: no Yoda style, strict types at file top (no blank line), trailing commas everywhere, preserved single-line DocBlocks.

- **IWFRiskySet.php** - Extends `AbstractRuleSetDefinition`, returns `@IWF/standard:risky`. Builds on `@PhpCsFixer:risky` with customizations: PHPUnit uses `self::` instead of `$this->`, flexible data provider naming.
- **IWFWebStandardRiskySet.php** - Extends `AbstractRuleSetDefinition`, returns `@IWFWeb/standard:risky`. Builds on `@PhpCsFixer:risky` with customizations: PHPUnit uses `self::` instead of `$this->`, flexible data provider naming.

- **IWFSet.php** - Deprecated wrapper for `IWFWebStandardSet`. Will be removed in v2.0.

- **IWFRiskySet.php** - Deprecated wrapper for `IWFWebStandardRiskySet`. Will be removed in v2.0.

## Usage in Other Projects

```php
<?php declare(strict_types=1);

use IWF\CodingStandard\IWFRiskySet;
use IWF\CodingStandard\IWFSet;
use IWFWeb\CodingStandard\IWFWebStandardRiskySet;
use IWFWeb\CodingStandard\IWFWebStandardSet;
use PhpCsFixer\Config;
use PhpCsFixer\Finder;

return new Config()
->registerCustomRuleSets([
new IWFSet(),
new IWFRiskySet(),
new IWFWebStandardSet(),
new IWFWebStandardRiskySet(),
])
->setFinder(Finder::create()->in(__DIR__))
->setRiskyAllowed(true)
->setRules([
'@IWF/standard' => true,
'@IWF/standard:risky' => true,
'@IWFWeb/standard' => true,
'@IWFWeb/standard:risky' => true,
]);
```

Expand Down
83 changes: 0 additions & 83 deletions CODE_OF_CONDUCT.md

This file was deleted.

Loading
Loading