@@ -28,10 +28,10 @@ public function handle(ChangedFiles $files, Closure $next)
28
28
return $ next ($ files );
29
29
}
30
30
31
- if (!$ this ->isPintInstalled ()) {
31
+ if (! $ this ->isPintInstalled ()) {
32
32
$ this ->newLine (2 );
33
33
$ this ->output ->writeln (
34
- sprintf (" <bg=red;fg=white> ERROR </> %s " ,
34
+ sprintf (' <bg=red;fg=white> ERROR </> %s ' ,
35
35
'Pint is not installed. Please run <info>composer require laravel/pint --dev</info> to install it. ' )
36
36
);
37
37
$ this ->newLine ();
@@ -40,18 +40,18 @@ public function handle(ChangedFiles $files, Closure $next)
40
40
41
41
$ errorFiles = [];
42
42
foreach ($ stagedFilePaths as $ stagedFilePath ) {
43
- $ isPintProperlyFormatted = $ this ->runCommands ('./vendor/bin/pint --test --config ./pint.json ' . $ stagedFilePath ,
43
+ $ isPintProperlyFormatted = $ this ->runCommands ('./vendor/bin/pint --test --config ./pint.json ' . $ stagedFilePath ,
44
44
[
45
45
'cwd ' => base_path (),
46
46
])->isSuccessful ();
47
47
48
- if (!$ isPintProperlyFormatted ) {
48
+ if (! $ isPintProperlyFormatted ) {
49
49
if (empty ($ errorFiles )) {
50
50
$ this ->newLine ();
51
51
}
52
52
53
53
$ this ->output ->writeln (
54
- sprintf (" <fg=red> Pint Failed:</> %s " , "$ stagedFilePath " )
54
+ sprintf (' <fg=red> Pint Failed:</> %s ' , "$ stagedFilePath " )
55
55
);
56
56
$ errorFiles [] = $ stagedFilePath ;
57
57
}
@@ -63,16 +63,16 @@ public function handle(ChangedFiles $files, Closure $next)
63
63
64
64
$ this ->newLine ();
65
65
$ this ->output ->writeln (
66
- sprintf (" <bg=red;fg=white> COMMIT FAILED </> %s " ,
66
+ sprintf (' <bg=red;fg=white> COMMIT FAILED </> %s ' ,
67
67
'Your commit contains files that should pass Pint but do not. Please fix the Pint errors in the files above and try again. ' )
68
68
);
69
69
70
- if ($ this ->confirm (" Would you like to attempt to correct files automagically? " , false )) {
70
+ if ($ this ->confirm (' Would you like to attempt to correct files automagically? ' , false )) {
71
71
$ errorFilesString = implode (' ' , $ errorFiles );
72
72
$ this ->runCommands (
73
73
[
74
- './vendor/bin/pint --config ./pint.json ' . $ errorFilesString ,
75
- 'git add ' . $ errorFilesString ,
74
+ './vendor/bin/pint --config ./pint.json ' . $ errorFilesString ,
75
+ 'git add ' . $ errorFilesString ,
76
76
],
77
77
['cwd ' => base_path ()]
78
78
);
0 commit comments