@@ -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 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | public function via($notifiable) |
| 44 | 44 | { |
| 45 | - return ['slack']; |
|
| 45 | + return [ 'slack' ]; |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
@@ -58,9 +58,9 @@ discard block |
||
| 58 | 58 | return (new SlackMessage) |
| 59 | 59 | ->from(config('app.url')) |
| 60 | 60 | ->content("*Security Check Report:* `{$this->composerLockPath}`") |
| 61 | - ->attachment(function ($attachment) { |
|
| 61 | + ->attachment(function($attachment) { |
|
| 62 | 62 | $attachment->content($this->textFormatter()) |
| 63 | - ->markdown(['pretext']); |
|
| 63 | + ->markdown([ 'pretext' ]); |
|
| 64 | 64 | }); |
| 65 | 65 | } |
| 66 | 66 | |
@@ -83,19 +83,19 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | if (0 !== $count) { |
| 85 | 85 | foreach ($this->vulnerabilities as $dependency => $issues) { |
| 86 | - $dependencyFullName = $dependency . ' (' . $issues['version'] . ')'; |
|
| 86 | + $dependencyFullName = $dependency.' ('.$issues[ 'version' ].')'; |
|
| 87 | 87 | $txt .= "\n"; |
| 88 | - $txt .= "*{$dependencyFullName}*" . "\n" . str_repeat('-', strlen($dependencyFullName)) . "\n"; |
|
| 88 | + $txt .= "*{$dependencyFullName}*"."\n".str_repeat('-', strlen($dependencyFullName))."\n"; |
|
| 89 | 89 | |
| 90 | - foreach ($issues['advisories'] as $issue => $details) { |
|
| 90 | + foreach ($issues[ 'advisories' ] as $issue => $details) { |
|
| 91 | 91 | $txt .= ' * '; |
| 92 | - if ($details['cve']) { |
|
| 93 | - $txt .= "{$details['cve']} "; |
|
| 92 | + if ($details[ 'cve' ]) { |
|
| 93 | + $txt .= "{$details[ 'cve' ]} "; |
|
| 94 | 94 | } |
| 95 | - $txt .= "{$details['title']} "; |
|
| 95 | + $txt .= "{$details[ 'title' ]} "; |
|
| 96 | 96 | |
| 97 | - if ('' !== $details['link']) { |
|
| 98 | - $txt .= "{$details['link']}"; |
|
| 97 | + if ('' !== $details[ 'link' ]) { |
|
| 98 | + $txt .= "{$details[ 'link' ]}"; |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | $txt .= "\n"; |
@@ -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()) { |