-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
444868a
commit 787bdf1
Showing
6 changed files
with
94 additions
and
2 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
Binary file not shown.
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,40 @@ | ||
<?php | ||
|
||
namespace Tests\Fixtures\custom; | ||
|
||
use PhpCsFixer\Fixer\FixerInterface; | ||
use PhpCsFixer\FixerDefinition\FixerDefinition; | ||
use PhpCsFixer\FixerDefinition\FixerDefinitionInterface; | ||
use PhpCsFixer\Tokenizer\Tokens; | ||
|
||
class CustomFixer implements FixerInterface { | ||
|
||
public function getName(): string { | ||
return 'My/CustomFixer'; | ||
} | ||
|
||
public function getDefinition(): FixerDefinitionInterface { | ||
return new FixerDefinition('A custom fixer', []); | ||
} | ||
|
||
public function fix(\SplFileInfo $file, Tokens $tokens): void { | ||
// | ||
} | ||
|
||
public function isCandidate(Tokens $tokens): bool { | ||
return true; | ||
} | ||
|
||
public function supports(\SplFileInfo $file): bool { | ||
return true; | ||
} | ||
|
||
public function isRisky(): bool { | ||
return false; | ||
} | ||
|
||
public function getPriority(): int { | ||
return 0; | ||
} | ||
|
||
} |
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,5 @@ | ||
{ | ||
"custom-fixers": [ | ||
"tests/Fixtures/custom/CustomFixer.php" | ||
] | ||
} |
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