File tree Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 19
19
20
20
class ConsoleOutput extends AbstractOutput
21
21
{
22
- public function __construct (protected string $ method = 'warn ' ) {}
22
+ public function __construct (private string $ method = 'warn ' ) {}
23
23
24
24
/**
25
25
* @noinspection PhpMissingParentCallCommonInspection
Original file line number Diff line number Diff line change 22
22
class DebugBarOutput extends AbstractOutput
23
23
{
24
24
public function __construct (
25
- protected string $ name = 'Soar Scores ' ,
26
- protected string $ label = 'warning '
25
+ private string $ name = 'Soar Scores ' ,
26
+ private string $ label = 'warning '
27
27
) {}
28
28
29
29
/**
30
30
* @noinspection PhpMissingParentCallCommonInspection
31
31
*/
32
32
public function shouldOutput (CommandFinished |Response $ outputter ): bool
33
33
{
34
- // app(LaravelDebugbar::class)->isEnabled()
35
34
return class_exists (LaravelDebugbar::class)
36
35
&& app ()->has (LaravelDebugbar::class)
36
+ && resolve (LaravelDebugbar::class)->isEnabled ()
37
37
&& $ this ->isHtmlResponse ($ outputter );
38
38
}
39
39
Original file line number Diff line number Diff line change 21
21
22
22
class JsonOutput extends AbstractOutput
23
23
{
24
- public function __construct (protected string $ key = 'soar_scores ' ) {}
24
+ public function __construct (private string $ key = 'soar_scores ' ) {}
25
25
26
26
/**
27
27
* @noinspection PhpMissingParentCallCommonInspection
Original file line number Diff line number Diff line change 21
21
class LogOutput extends AbstractOutput
22
22
{
23
23
public function __construct (
24
- protected string $ channel = 'daily ' ,
25
- protected string $ level = 'warning '
24
+ private string $ channel = 'daily ' ,
25
+ private string $ level = 'warning '
26
26
) {}
27
27
28
28
/**
29
29
* @throws \JsonException
30
30
*/
31
31
public function output (Collection $ scores , CommandFinished |Response $ outputter ): CommandFinished |Response
32
32
{
33
- $ scores ->each (fn (array $ score ) => Log::channel ($ this ->channel )->log (
33
+ $ scores ->each (fn (array $ score ): mixed => Log::channel ($ this ->channel )->log (
34
34
$ this ->level ,
35
35
$ this ->hydrateScore ($ score )
36
36
));
Original file line number Diff line number Diff line change 19
19
20
20
class RayOutput extends AbstractOutput
21
21
{
22
- public function __construct (protected string $ label = 'Soar Scores ' ) {}
22
+ public function __construct (private string $ label = 'Soar Scores ' ) {}
23
23
24
24
/**
25
25
* @noinspection PhpMissingParentCallCommonInspection
You can’t perform that action at this time.
0 commit comments