File tree 4 files changed +17
-17
lines changed
4 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public static function getLaravelLogFiles()
18
18
$ files = [];
19
19
20
20
foreach (self ::getHandlers () as $ handler ) {
21
- if ($ handler instanceof StreamHandler && !$ handler instanceof RotatingFileHandler) {
21
+ if ($ handler instanceof StreamHandler && ! $ handler instanceof RotatingFileHandler) {
22
22
$ files [] = $ handler ->getUrl ();
23
23
}
24
24
}
@@ -29,7 +29,7 @@ public static function getLaravelLogFiles()
29
29
public static function closeHandlers ()
30
30
{
31
31
foreach (self ::getHandlers () as $ handler ) {
32
- if ($ handler instanceof StreamHandler && !$ handler instanceof RotatingFileHandler) {
32
+ if ($ handler instanceof StreamHandler && ! $ handler instanceof RotatingFileHandler) {
33
33
if (method_exists ($ handler , 'close ' )) {
34
34
$ handler ->close ();
35
35
}
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ public function itCanRotateFileMax()
61
61
{
62
62
$ file = $ this ->tmpDir .'/file1 ' ;
63
63
64
- for ($ n = 0 ; $ n < 5 ; ++ $ n ) {
64
+ for ($ n = 0 ; $ n < 5 ; $ n ++ ) {
65
65
file_put_contents ($ file , 'test ' );
66
66
67
67
$ resultCode = Artisan::call ('rotate:files ' , [
@@ -76,7 +76,7 @@ public function itCanRotateFileMax()
76
76
77
77
$ this ->assertEquals (filesize ($ file ), 0 );
78
78
79
- for ($ n = 1 ; $ n < 4 ; ++ $ n ) {
79
+ for ($ n = 1 ; $ n < 4 ; $ n ++ ) {
80
80
$ this ->assertFileExists ($ file .'. ' .$ n .'.gz ' );
81
81
}
82
82
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ public function testItCanRotateLogsWithMaxfiles()
54
54
55
55
$ this ->app ['config ' ]->set ('rotate.log_compress_files ' , true );
56
56
57
- for ($ n = 0 ; $ n < 10 ; ++ $ n ) {
57
+ for ($ n = 0 ; $ n < 10 ; $ n ++ ) {
58
58
$ this ->writeLog ();
59
59
60
60
$ this ->assertGreaterThan (0 , filesize (app ()->storagePath ().'/logs/laravel.log ' ));
Original file line number Diff line number Diff line change @@ -103,12 +103,12 @@ public function testItNotRotateLogsDaily()
103
103
public function testItCanRotateLogsCustomStreamFile ()
104
104
{
105
105
$ this ->app ['config ' ]->set ('logging.channels.custom ' , [
106
- 'driver ' => 'monolog ' ,
107
- 'handler ' => StreamHandler::class,
108
- 'with ' => [
109
- 'stream ' => app ()->storagePath ().'/logs/custom.log ' ,
110
- ],
111
- ]);
106
+ 'driver ' => 'monolog ' ,
107
+ 'handler ' => StreamHandler::class,
108
+ 'with ' => [
109
+ 'stream ' => app ()->storagePath ().'/logs/custom.log ' ,
110
+ ],
111
+ ]);
112
112
113
113
$ this ->app ['config ' ]->set ('logging.default ' , 'custom ' );
114
114
@@ -129,12 +129,12 @@ public function testItCanRotateLogsCustomStreamFile()
129
129
public function testItNotRotateLogsCustomStreamStd ()
130
130
{
131
131
$ this ->app ['config ' ]->set ('logging.channels.custom ' , [
132
- 'driver ' => 'monolog ' ,
133
- 'handler ' => StreamHandler::class,
134
- 'with ' => [
135
- 'stream ' => 'php://stdout ' ,
136
- ],
137
- ]);
132
+ 'driver ' => 'monolog ' ,
133
+ 'handler ' => StreamHandler::class,
134
+ 'with ' => [
135
+ 'stream ' => 'php://stdout ' ,
136
+ ],
137
+ ]);
138
138
139
139
$ this ->app ['config ' ]->set ('logging.default ' , 'custom ' );
140
140
You can’t perform that action at this time.
0 commit comments