Skip to content

Commit

Permalink
pint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cradu committed Aug 28, 2024
1 parent b29d7c9 commit da3736a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
6 changes: 6 additions & 0 deletions phpinsights.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@
NunoMaduro\PhpInsights\Domain\Insights\ForbiddenTraits::class,
PHP_CodeSniffer\Standards\Generic\Sniffs\Commenting\TodoSniff::class,
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff::class,
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\ScopeClosingBraceSniff::class,
PHP_CodeSniffer\Standards\PEAR\Sniffs\WhiteSpace\ScopeClosingBraceSniff::class,
PHP_CodeSniffer\Standards\PSR12\Sniffs\Classes\ClassInstantiationSniff::class,
PhpCsFixer\Fixer\Basic\BracesFixer::class,
PhpCsFixer\Fixer\ClassNotation\ClassDefinitionFixer::class,
PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer::class,
PhpCsFixer\Fixer\Operator\NewWithBracesFixer::class,
],
'config' => [
// ExampleInsight::class => [
Expand Down
4 changes: 1 addition & 3 deletions src/Exceptions/HookFailException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@

use RuntimeException;

class HookFailException extends RuntimeException
{
}
class HookFailException extends RuntimeException {}
2 changes: 1 addition & 1 deletion src/GitHooksServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ public function register(): void
// Automatically apply the package configuration
$this->mergeConfigFrom(__DIR__.'/../config/git-hooks.php', 'laravel-git-hooks');

$this->app->singleton('laravel-git-hooks', fn () => new GitHooks());
$this->app->singleton('laravel-git-hooks', fn () => new GitHooks);
}
}
2 changes: 1 addition & 1 deletion src/Traits/WithPipelineFailCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ protected function markPipelineFailed(): void
{
$tmpFile = $this->getPipelineFailedTempFile();
if (touch($tmpFile) === false) {
throw new HookFailException();
throw new HookFailException;
}
}

Expand Down

0 comments on commit da3736a

Please sign in to comment.