|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +/* |
| 6 | + * This file is part of the Composer package "php-doc-block-header-fixer". |
| 7 | + * |
| 8 | + * Copyright (C) 2025 Konrad Michalik <hej@konradmichalik.dev> |
| 9 | + * |
| 10 | + * This program is free software: you can redistribute it and/or modify |
| 11 | + * it under the terms of the GNU General Public License as published by |
| 12 | + * the Free Software Foundation, either version 3 of the License, or |
| 13 | + * (at your option) any later version. |
| 14 | + * |
| 15 | + * This program is distributed in the hope that it will be useful, |
| 16 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | + * GNU General Public License for more details. |
| 19 | + * |
| 20 | + * You should have received a copy of the GNU General Public License |
| 21 | + * along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 22 | + */ |
| 23 | + |
| 24 | +use EliasHaeussler\PhpCsFixerConfig\Config; |
| 25 | +use EliasHaeussler\PhpCsFixerConfig\Package; |
| 26 | +use EliasHaeussler\PhpCsFixerConfig\Rules; |
| 27 | +use Symfony\Component\Finder; |
| 28 | + |
| 29 | +$header = Rules\Header::create( |
| 30 | + 'php-doc-block-header-fixer', |
| 31 | + Package\Type::ComposerPackage, |
| 32 | + Package\Author::create('Konrad Michalik', 'hej@konradmichalik.dev'), |
| 33 | + Package\CopyrightRange::from(2025), |
| 34 | + Package\License::GPL3OrLater, |
| 35 | +); |
| 36 | + |
| 37 | +return Config::create() |
| 38 | + ->withRule($header) |
| 39 | +// ->withRule( |
| 40 | +// RuleSet::fromArray( |
| 41 | +// DocBlockHeader::create( |
| 42 | +// [ |
| 43 | +// 'author' => 'Konrad Michalik <hej@konradmichalik.dev>', |
| 44 | +// 'license' => 'GPL-3.0-or-later', |
| 45 | +// 'package' => 'PhpDocBlockHeaderFixer', |
| 46 | +// ] |
| 47 | +// )->__toArray() |
| 48 | +// ) |
| 49 | +// ) |
| 50 | +// ->registerCustomFixers([new KonradMichalik\PhpDocBlockHeaderFixer\Rules\DocBlockHeaderFixer()]) // Temporarily disabled |
| 51 | + ->withFinder(static fn (Finder\Finder $finder) => $finder |
| 52 | + ->in(__DIR__) |
| 53 | + ->exclude('vendor'), |
| 54 | + ) |
| 55 | +; |
0 commit comments