generated from ergebnis/php-cs-fixer-config-template
-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #239 from ergebnis/feature/fixture
Enhancement: Extract concrete class
- Loading branch information
Showing
3 changed files
with
78 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* Copyright (c) 2019-2020 Andreas Möller | ||
* | ||
* For the full copyright and license information, please view | ||
* the LICENSE.md file that was distributed with this source code. | ||
* | ||
* @see https://github.com/ergebnis/php-cs-fixer-config | ||
*/ | ||
|
||
namespace Ergebnis\PhpCsFixer\Config\Test\Fixture\Config\RuleSet; | ||
|
||
use Ergebnis\PhpCsFixer\Config; | ||
|
||
final class DummyRuleSet implements Config\RuleSet | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
private $name; | ||
|
||
/** | ||
* @var array<string, array|bool> | ||
*/ | ||
private $rules; | ||
|
||
/** | ||
* @var int | ||
*/ | ||
private $phpVersion; | ||
|
||
/** | ||
* @param array<string, array|bool> $rules | ||
*/ | ||
public function __construct(string $name, array $rules, int $phpVersion) | ||
{ | ||
$this->name = $name; | ||
$this->rules = $rules; | ||
$this->phpVersion = $phpVersion; | ||
} | ||
|
||
public function name(): string | ||
{ | ||
return $this->name; | ||
} | ||
|
||
public function rules(): array | ||
{ | ||
return $this->rules; | ||
} | ||
|
||
public function targetPhpVersion(): int | ||
{ | ||
return $this->phpVersion; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters