Completed
Pull Request — master (#84)
by Johnny
12:52
created
database/migrations/2017_03_17_080010_create_roles_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('roles', function (Blueprint $table) {
16
+        Schema::create('roles', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->text('name');
19 19
             $table->timestamps();
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function down()
29 29
     {
30
-        Schema::table('roles', function (Blueprint $table) {
30
+        Schema::table('roles', function(Blueprint $table) {
31 31
             Schema::drop('roles');
32 32
         });
33 33
     }
Please login to merge, or discard this patch.
database/migrations/2017_03_14_184704_create_hits_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('hits', function (Blueprint $table) {
16
+        Schema::create('hits', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->integer('link_id')->unsigned()->nullable();
19 19
             $table->string('ip')->nullable();
Please login to merge, or discard this patch.
database/migrations/2017_03_20_230022_add_activation_flag_to_user_table.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::table('users', function (Blueprint $table) {
16
+        Schema::table('users', function(Blueprint $table) {
17 17
             $table->integer('activated')->default(0);
18 18
         });
19 19
 
20
-        Schema::table('users', function (Blueprint $table) {
20
+        Schema::table('users', function(Blueprint $table) {
21 21
             $table->string('email_token')->nullable();
22 22
         });
23 23
     }
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function down()
31 31
     {
32
-        Schema::table('users', function (Blueprint $table) {
32
+        Schema::table('users', function(Blueprint $table) {
33 33
             $table->dropColumn('activated');
34 34
         });
35 35
 
36
-        Schema::table('users', function (Blueprint $table) {
36
+        Schema::table('users', function(Blueprint $table) {
37 37
             $table->dropColumn('email_token');
38 38
         });
39 39
     }
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     public function boot()
27 27
     {
28 28
         //
29
-        Route::bind('linkHash', function ($hash) {
29
+        Route::bind('linkHash', function($hash) {
30 30
             try {
31 31
                 return Link::where('hash', $hash)->firstOrFail();
32 32
             } catch (ModelNotFoundException $e) {
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/LinksController.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      *
42 42
      * @param Link $link
43 43
      *
44
-     * @return \Illuminate\Http\Response
44
+     * @return \Illuminate\Http\RedirectResponse
45 45
      * @internal param int $id
46 46
      */
47 47
     public function destroy(Link $link)
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/UsersController.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      *
42 42
      * @param UserRequest|Request $request
43 43
      *
44
-     * @return \Illuminate\Http\Response
44
+     * @return \Illuminate\Http\RedirectResponse
45 45
      */
46 46
     public function store(UserRequest $request)
47 47
     {
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      * @param UserRequest|Request $request
95 95
      * @param User $user
96 96
      *
97
-     * @return \Illuminate\Http\Response
97
+     * @return \Illuminate\Http\RedirectResponse
98 98
      * @internal param int $id
99 99
      */
100 100
     public function update(UserRequest $request, User $user)
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      *
125 125
      * @param User $user
126 126
      *
127
-     * @return \Illuminate\Http\Response
127
+     * @return \Illuminate\Http\RedirectResponse
128 128
      * @internal param int $id
129 129
      */
130 130
     public function destroy(User $user)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
     {
96 96
         $user->fill(['name' => $request->name, 'email' => $request->email, 'activated' => $request->activated])->save();
97 97
 
98
-        if (! empty($request->password)) {
98
+        if ( ! empty($request->password)) {
99 99
             $user->password = Hash::make($request->password);
100 100
         }
101 101
 
Please login to merge, or discard this patch.
app/Http/Middleware/SecureAdmin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     public function handle($request, Closure $next)
31 31
     {
32 32
         // If the auth user is null, redirect to home page
33
-        if (is_null($this->auth->user()) || (! $this->auth->user()->hasRole('Administrator'))) {
33
+        if (is_null($this->auth->user()) || ( ! $this->auth->user()->hasRole('Administrator'))) {
34 34
             abort(404, 'Page not found');
35 35
         }
36 36
 
Please login to merge, or discard this patch.
routes/web.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 Route::get('/logout', ['as' => 'user.logout', 'uses' => 'Auth\LoginController@logout']);
21 21
 
22
-Route::get('/home', function () {
22
+Route::get('/home', function() {
23 23
     return redirect()->route('url_create');
24 24
 })->middleware('auth')->name('home');
25 25
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 Route::group([
30 30
     'prefix' => '/admin',
31 31
     'middleware' => ['auth.admin'],
32
-], function () {
32
+], function() {
33 33
     Route::resource('links', 'Admin\LinksController', [
34 34
         'names' => [
35 35
             'index' => 'admin.links.index',
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 Route::group([
57 57
     'prefix' => '/dashboard',
58 58
     'middleware' => ['auth'],
59
-], function () {
59
+], function() {
60 60
     Route::resource('links', 'UserDashboardController');
61 61
 });
62 62
 
Please login to merge, or discard this patch.