Skip to content

Commit 7a9ed39

Browse files
committed
styleci conflicts
2 parents 4b2162f + 461f50e commit 7a9ed39

File tree

7 files changed

+17
-19
lines changed

7 files changed

+17
-19
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![GitHub issues](https://img.shields.io/github/issues/Spargon/Laravel-Auth-Logger.svg?style=for-the-badge)](https://github.com/Spargon/Laravel-Auth-Logger/issues)
55
[![Software License](https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge&&colorB=F27E40)](license.md)
66
[![Total Downloads](https://img.shields.io/packagist/dt/spargon/laravel-auth-logger.svg?style=for-the-badge)](https://packagist.org/packages/spargon/laravel-auth-logger)
7-
7+
![StyleCI](https://github.styleci.io/repos/314730871/shield?branch=main)
88

99
Laravel Auth Logger stores user authentication logs and sends out notifications whenever a user logs in from a new system.
1010

resources/lang/en/messages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@
2424
'platform' => 'Platform',
2525
'device' => 'Device',
2626
'ignore' => 'If this was you, you can ignore this alert. If you suspect any suspicious activity on your account, please change your password.',
27-
];
27+
];

src/AuthLoggerServiceProvider.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ public function boot()
1212
{
1313
if ($this->app->runningInConsole()) {
1414
$this->publishes([
15-
__DIR__ . '/../config/auth-logger.php' => config_path('auth-logger.php'),
15+
__DIR__.'/../config/auth-logger.php' => config_path('auth-logger.php'),
1616
], 'config');
1717

1818
$this->publishes([
19-
__DIR__ . '/../resources/views' => base_path('resources/views/vendor/auth-logger'),
19+
__DIR__.'/../resources/views' => base_path('resources/views/vendor/auth-logger'),
2020
], 'views');
2121

2222
$this->publishes([
23-
__DIR__ . '/../resources/lang' => base_path('resources/lang/vendor/auth-logger'),
23+
__DIR__.'/../resources/lang' => base_path('resources/lang/vendor/auth-logger'),
2424
],
2525
'lang'
2626
);
2727

2828
$migrationFileName = 'create_auth_logs_table.php';
2929
if (! $this->migrationFileExists($migrationFileName)) {
3030
$this->publishes([
31-
__DIR__ . "/../database/migrations/{$migrationFileName}.stub" => database_path('migrations/' . date('Y_m_d_His', time()) . '_' . $migrationFileName),
31+
__DIR__."/../database/migrations/{$migrationFileName}.stub" => database_path('migrations/'.date('Y_m_d_His', time()).'_'.$migrationFileName),
3232
], 'migrations');
3333
}
3434

@@ -37,21 +37,21 @@ public function boot()
3737
]);
3838
}
3939

40-
$this->loadViewsFrom(__DIR__ . '/../resources/views', 'auth-logger');
40+
$this->loadViewsFrom(__DIR__.'/../resources/views', 'auth-logger');
4141

42-
$this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'auth-logger');
42+
$this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'auth-logger');
4343
}
4444

4545
public function register()
4646
{
47-
$this->mergeConfigFrom(__DIR__ . '/../config/auth-logger.php', 'auth-logger');
47+
$this->mergeConfigFrom(__DIR__.'/../config/auth-logger.php', 'auth-logger');
4848
$this->app->register(EventServiceProvider::class);
4949
}
5050

5151
public static function migrationFileExists(string $migrationFileName): bool
5252
{
5353
$len = strlen($migrationFileName);
54-
foreach (glob(database_path("migrations/*.php")) as $filename) {
54+
foreach (glob(database_path('migrations/*.php')) as $filename) {
5555
if ((substr($filename, -$len) === $migrationFileName)) {
5656
return true;
5757
}

src/Commands/AuthLoggerCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function handle()
3939
if (! $logsDeleted) {
4040
$this->info('Could not find any old authentication logs to delete.');
4141
} else {
42-
$this->info('Authentication logs have been cleared successfully. Total Logs Deleted : ' . $logsDeleted);
42+
$this->info('Authentication logs have been cleared successfully. Total Logs Deleted : '.$logsDeleted);
4343
}
4444
}
4545
}

src/Listeners/LogOtherDevicesLogout.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ public function handle(OtherDeviceLogout $event)
5656
}
5757
}
5858
}
59-
}
59+
}

src/Notifications/NewDeviceAlert.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,11 @@ class NewDeviceAlert extends Notification implements ShouldQueue
3131

3232
/**
3333
* User's browser retrived from the user agent.
34-
*
3534
*/
3635
public $browser;
3736

3837
/**
3938
* User's platform retrived from the user agent.
40-
*
4139
*/
4240
public $platform;
4341

@@ -60,7 +58,7 @@ class NewDeviceAlert extends Notification implements ShouldQueue
6058
public function __construct(AuthLogger $authLogger)
6159
{
6260
$this->authLogger = $authLogger;
63-
61+
6462
// Parsing the user agent
6563
$this->agent = new Agent();
6664
$this->agent->setUserAgent($authLogger->user_agent);
@@ -129,8 +127,8 @@ public function toSlack($notifiable)
129127
'Account' => $notifiable->email,
130128
'Time' => $this->authLogger->login_at->toCookieString(),
131129
'IP Address' => $this->authLogger->ip_address,
132-
'Browser' => $this->browser . ' (' . $this->agent->version($this->browser) . ')' ,
133-
'Platform' => $this->platform . ' (' . $this->agent->version($this->platform) . ')',
130+
'Browser' => $this->browser.' ('.$this->agent->version($this->browser).')',
131+
'Platform' => $this->platform.' ('.$this->agent->version($this->platform).')',
134132
]);
135133
});
136134
}

src/Providers/EventServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
use Illuminate\Auth\Events\Logout;
77
use Illuminate\Auth\Events\OtherDeviceLogout;
88
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
9+
use Spargon\AuthLogger\Listeners\LogOtherDevicesLogout;
910
use Spargon\AuthLogger\Listeners\LogSuccessfulLogin;
1011
use Spargon\AuthLogger\Listeners\LogSuccessfulLogout;
11-
use Spargon\AuthLogger\Listeners\LogOtherDevicesLogout;
1212

1313
class EventServiceProvider extends ServiceProvider
1414
{
1515
protected $listen = [
1616
Login::class => [
1717
LogSuccessfulLogin::class,
1818
],
19-
19+
2020
Logout::class => [
2121
LogSuccessfulLogout::class,
2222
],

0 commit comments

Comments
 (0)