Skip to content

Commit 66d408a

Browse files
authored
Merge pull request #369 from jeremykenedy/shift-34004
Namespace Models
2 parents d1122eb + 8e62c3f commit 66d408a

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

app/Http/Middleware/CheckIsUserActivated.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function handle($request, Closure $next)
3939
'welcome',
4040
];
4141

42-
if (!in_array($currentRoute, $routesAllowed)) {
42+
if (! in_array($currentRoute, $routesAllowed)) {
4343
if ($user && $user->activated != 1) {
4444
Log::info('Non-activated user attempted to visit '.$currentRoute.'. ', [$user]);
4545

@@ -72,7 +72,7 @@ public function handle($request, Closure $next)
7272
return redirect('home');
7373
}
7474

75-
if (!$user) {
75+
if (! $user) {
7676
Log::info('Non registered visit to '.$currentRoute.'. ');
7777

7878
return redirect()->route('welcome');

app/Logic/Macros/HtmlMacros.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
return $link;
2424
});
2525

26-
/**
26+
/*
2727
* Render an icon with an anchor tag around it.
2828
*
2929
* @var string url
@@ -44,7 +44,7 @@
4444
return $link;
4545
});
4646

47-
/**
47+
/*
4848
* Render an button with an icon with an anchor tag around it.
4949
*
5050
* @var string url
@@ -65,7 +65,7 @@
6565
return $link;
6666
});
6767

68-
/**
68+
/*
6969
* Show Username.
7070
*
7171
* @return string

app/Models/Activation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,6 @@ class Activation extends Model
7878
*/
7979
public function user()
8080
{
81-
return $this->belongsTo('App\Models\User');
81+
return $this->belongsTo(\App\Models\User::class);
8282
}
8383
}

app/Models/Profile.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class Profile extends Model
4949
*/
5050
public function user()
5151
{
52-
return $this->belongsTo('App\Models\User');
52+
return $this->belongsTo(\App\Models\User::class);
5353
}
5454

5555
/**
@@ -59,6 +59,6 @@ public function user()
5959
*/
6060
public function theme()
6161
{
62-
return $this->hasOne('App\Models\Theme');
62+
return $this->hasOne(\App\Models\Theme::class);
6363
}
6464
}

app/Models/Social.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,6 @@ class Social extends Model
7474
*/
7575
public function user()
7676
{
77-
return $this->belongsTo('App\Models\User');
77+
return $this->belongsTo(\App\Models\User::class);
7878
}
7979
}

app/Models/Theme.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,6 @@ public static function rules($id = 0, $merge = [])
106106
*/
107107
public function profile()
108108
{
109-
return $this->hasMany('App\Models\Profile');
109+
return $this->hasMany(\App\Models\Profile::class);
110110
}
111111
}

app/Models/User.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,23 +107,23 @@ class User extends Authenticatable
107107
*/
108108
public function social()
109109
{
110-
return $this->hasMany('App\Models\Social');
110+
return $this->hasMany(\App\Models\Social::class);
111111
}
112112

113113
/**
114114
* Get the profile associated with the user.
115115
*/
116116
public function profile()
117117
{
118-
return $this->hasOne('App\Models\Profile');
118+
return $this->hasOne(\App\Models\Profile::class);
119119
}
120120

121121
/**
122122
* The profiles that belong to the user.
123123
*/
124124
public function profiles()
125125
{
126-
return $this->belongsToMany('App\Models\Profile')->withTimestamps();
126+
return $this->belongsToMany(\App\Models\Profile::class)->withTimestamps();
127127
}
128128

129129
/**

app/Providers/ComposerServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function boot()
1616
{
1717
View::composer(
1818
'layouts.app',
19-
'App\Http\ViewComposers\ThemeComposer'
19+
\App\Http\ViewComposers\ThemeComposer::class
2020
);
2121
}
2222

routes/web.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
// User Profile and Account Routes
7070
Route::resource(
7171
'profile',
72-
'App\Http\Controllers\ProfilesController',
72+
\App\Http\Controllers\ProfilesController::class,
7373
[
7474
'only' => [
7575
'show',
@@ -103,13 +103,13 @@
103103

104104
// Registered, activated, and is admin routes.
105105
Route::group(['middleware' => ['auth', 'activated', 'role:admin', 'activity', 'twostep', 'checkblocked']], function () {
106-
Route::resource('/users/deleted', 'App\Http\Controllers\SoftDeletesController', [
106+
Route::resource('/users/deleted', \App\Http\Controllers\SoftDeletesController::class, [
107107
'only' => [
108108
'index', 'show', 'update', 'destroy',
109109
],
110110
]);
111111

112-
Route::resource('users', 'App\Http\Controllers\UsersManagementController', [
112+
Route::resource('users', \App\Http\Controllers\UsersManagementController::class, [
113113
'names' => [
114114
'index' => 'users',
115115
'destroy' => 'user.destroy',
@@ -120,7 +120,7 @@
120120
]);
121121
Route::post('search-users', 'App\Http\Controllers\UsersManagementController@search')->name('search-users');
122122

123-
Route::resource('themes', 'App\Http\Controllers\ThemesManagementController', [
123+
Route::resource('themes', \App\Http\Controllers\ThemesManagementController::class, [
124124
'names' => [
125125
'index' => 'themes',
126126
'destroy' => 'themes.destroy',

0 commit comments

Comments
 (0)