@@ -55,7 +55,7 @@ |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | // get the recipients and filter out any configuration mistakes |
58 | - $recipients = collect(config('laravel-security-checker.recipients', []))->filter(function ($recipient) { |
|
58 | + $recipients = collect(config('laravel-security-checker.recipients', [ ]))->filter(function($recipient) { |
|
59 | 59 | return !is_null($recipient) && !empty($recipient); |
60 | 60 | }); |
61 | 61 |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | */ |
23 | 23 | public function register() |
24 | 24 | { |
25 | - $configPath = __DIR__ . '/../config/laravel-security-checker.php'; |
|
25 | + $configPath = __DIR__.'/../config/laravel-security-checker.php'; |
|
26 | 26 | $this->mergeConfigFrom($configPath, 'laravel-security-checker'); |
27 | 27 | } |
28 | 28 | |
@@ -34,19 +34,19 @@ discard block |
||
34 | 34 | public function boot() |
35 | 35 | { |
36 | 36 | // configuration |
37 | - $configPath = __DIR__ . '/../config/laravel-security-checker.php'; |
|
38 | - $this->publishes([$configPath => $this->getConfigPath()], 'config'); |
|
37 | + $configPath = __DIR__.'/../config/laravel-security-checker.php'; |
|
38 | + $this->publishes([ $configPath => $this->getConfigPath() ], 'config'); |
|
39 | 39 | |
40 | 40 | // views |
41 | - $this->loadViewsFrom(__DIR__ . '/../resources/views', 'laravel-security-checker'); |
|
41 | + $this->loadViewsFrom(__DIR__.'/../resources/views', 'laravel-security-checker'); |
|
42 | 42 | $this->publishes([ |
43 | - __DIR__ . '/../resources/views' => resource_path('views/vendor/laravel-security-checker'), |
|
43 | + __DIR__.'/../resources/views' => resource_path('views/vendor/laravel-security-checker'), |
|
44 | 44 | ], 'views'); |
45 | 45 | |
46 | 46 | // translations |
47 | - $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'laravel-security-checker'); |
|
47 | + $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'laravel-security-checker'); |
|
48 | 48 | $this->publishes([ |
49 | - __DIR__ . '/../resources/lang' => resource_path('lang/vendor/laravel-security-checker'), |
|
49 | + __DIR__.'/../resources/lang' => resource_path('lang/vendor/laravel-security-checker'), |
|
50 | 50 | ], 'translations'); |
51 | 51 | |
52 | 52 | if ($this->app->runningInConsole()) { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function via() |
44 | 44 | { |
45 | - return ['slack']; |
|
45 | + return [ 'slack' ]; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -55,9 +55,9 @@ discard block |
||
55 | 55 | return (new SlackMessage) |
56 | 56 | ->from(config('app.url')) |
57 | 57 | ->content("*Security Check Report:* `{$this->composerLockPath}`") |
58 | - ->attachment(function ($attachment) { |
|
58 | + ->attachment(function($attachment) { |
|
59 | 59 | $attachment->content($this->textFormatter()) |
60 | - ->markdown(['pretext']); |
|
60 | + ->markdown([ 'pretext' ]); |
|
61 | 61 | }); |
62 | 62 | } |
63 | 63 | |
@@ -82,19 +82,19 @@ discard block |
||
82 | 82 | |
83 | 83 | if (0 !== $count) { |
84 | 84 | foreach ($this->vulnerabilities as $dependency => $issues) { |
85 | - $dependencyFullName = $dependency . ' (' . $issues['version'] . ')'; |
|
85 | + $dependencyFullName = $dependency.' ('.$issues[ 'version' ].')'; |
|
86 | 86 | $txt .= "\n"; |
87 | - $txt .= "*{$dependencyFullName}*" . "\n" . str_repeat('-', strlen($dependencyFullName)) . "\n"; |
|
87 | + $txt .= "*{$dependencyFullName}*"."\n".str_repeat('-', strlen($dependencyFullName))."\n"; |
|
88 | 88 | |
89 | - foreach ($issues['advisories'] as $issue => $details) { |
|
89 | + foreach ($issues[ 'advisories' ] as $issue => $details) { |
|
90 | 90 | $txt .= ' * '; |
91 | - if ($details['cve']) { |
|
92 | - $txt .= "{$details['cve']} "; |
|
91 | + if ($details[ 'cve' ]) { |
|
92 | + $txt .= "{$details[ 'cve' ]} "; |
|
93 | 93 | } |
94 | - $txt .= "{$details['title']} "; |
|
94 | + $txt .= "{$details[ 'title' ]} "; |
|
95 | 95 | |
96 | - if ('' !== $details['link']) { |
|
97 | - $txt .= "{$details['link']}"; |
|
96 | + if ('' !== $details[ 'link' ]) { |
|
97 | + $txt .= "{$details[ 'link' ]}"; |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | $txt .= "\n"; |