Passed
Push — master ( 66b87a...6357af )
by
unknown
07:09 queued 01:54
created
app/Http/Controllers/Auth/RegisterController.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
     protected function validator(array $data)
50 50
     {
51 51
         return Validator::make($data, [
52
-            'name' => ['required', 'string', 'max:255'],
53
-            'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
54
-            'password' => ['required', 'string', 'min:8', 'confirmed'],
52
+            'name' => [ 'required', 'string', 'max:255' ],
53
+            'email' => [ 'required', 'string', 'email', 'max:255', 'unique:users' ],
54
+            'password' => [ 'required', 'string', 'min:8', 'confirmed' ],
55 55
         ]);
56 56
     }
57 57
 
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
     protected function create(array $data)
65 65
     {
66 66
         return User::create([
67
-            'name' => $data['name'],
68
-            'email' => $data['email'],
69
-            'password' => Hash::make($data['password']),
67
+            'name' => $data[ 'name' ],
68
+            'email' => $data[ 'email' ],
69
+            'password' => Hash::make($data[ 'password' ]),
70 70
         ]);
71 71
     }
72 72
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
 use Illuminate\Support\Facades\Validator;
9 9
 use Illuminate\Foundation\Auth\RegistersUsers;
10 10
 
11
-class RegisterController extends Controller
12
-{
11
+class RegisterController extends Controller {
13 12
     /*
14 13
     |--------------------------------------------------------------------------
15 14
     | Register Controller
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/AdminLoginController.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
             'password' => 'required|min:6'
35 35
         ]);
36 36
 
37
-        if($validate->fails()) {
37
+        if ($validate->fails()) {
38 38
             return redirect()->back()->withErrors($validate);
39 39
         }
40 40
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         ];
45 45
 
46 46
         // Attempt Login
47
-        if(Auth::guard('admin')->attempt($credentials, $request->remember)) {
47
+        if (Auth::guard('admin')->attempt($credentials, $request->remember)) {
48 48
             // If 'true' -> redirect to admin.index
49 49
             session([
50 50
                 'role' => 'Admin',
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     private function sendFailedLoginResponse(Request $request)
61 61
     {
62 62
         throw ValidationException::withMessages([
63
-            'email' => [trans('auth.failed')],
63
+            'email' => [ trans('auth.failed') ],
64 64
         ]);
65 65
     }
66 66
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
 use Illuminate\Support\Facades\Validator;
9 9
 use Illuminate\Validation\ValidationException;
10 10
 
11
-class AdminLoginController extends Controller
12
-{
11
+class AdminLoginController extends Controller {
13 12
 
14 13
     public function __construct()
15 14
     {
Please login to merge, or discard this patch.
app/Http/Controllers/SpecializationController.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         $specialty->name = $request->input('name');
52 52
         $specialty->detail = $request->input('detail');
53 53
 
54
-        if($specialty->save()) {
54
+        if ($specialty->save()) {
55 55
             return redirect(route('specialty.index'));
56 56
         }
57 57
     }
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         $specialty->name = $request->input('name');
101 101
         $specialty->detail = $request->input('detail');
102 102
 
103
-        if($specialty->save()) {
103
+        if ($specialty->save()) {
104 104
             return redirect(route('specialty.index'));
105 105
         }
106 106
     }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     public function destroy($id)
115 115
     {
116 116
         $specialty = DoctorSpecialization::find($id);
117
-        if($specialty->delete()) {
117
+        if ($specialty->delete()) {
118 118
             return redirect(route('specialty.index'));
119 119
         }
120 120
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,7 @@
 block discarded – undo
5 5
 use Illuminate\Http\Request;
6 6
 use App\DoctorSpecialization;
7 7
 
8
-class SpecializationController extends Controller
9
-{
8
+class SpecializationController extends Controller {
10 9
     /**
11 10
      * Display a listing of the resource.
12 11
      *
Please login to merge, or discard this patch.
app/Http/Controllers/HospitalController.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,12 +17,12 @@  discard block
 block discarded – undo
17 17
      */
18 18
     public function index()
19 19
     {
20
-        $hospital = Hospital::orderBy('city_id','asc')->paginate(10);
20
+        $hospital = Hospital::orderBy('city_id', 'asc')->paginate(10);
21 21
         $data = [
22 22
             'role' => session('role'),
23 23
             'hospital' => $hospital
24 24
         ];
25
-        return view('pages.hospital')->with('data',$data);
25
+        return view('pages.hospital')->with('data', $data);
26 26
     }
27 27
 
28 28
     /**
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         $hospital->cover_images_id = 1;
131 131
         $hospital->save();
132 132
 
133
-        return redirect (route('hospital.index'));
133
+        return redirect(route('hospital.index'));
134 134
     }
135 135
 
136 136
     /**
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         $hospital = Hospital::find($id);
145 145
         $rooms = $this->deleteRoomsAndRoomDetail($id);
146 146
 
147
-        if($hospital->delete() && $rooms) {
147
+        if ($hospital->delete() && $rooms) {
148 148
             return redirect(route('hospital.index'));
149 149
         }
150 150
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
             ->where('hospital_id', '=', $hospital_id)
165 165
             ->delete();
166 166
 
167
-        if($delroom && $deldetail) {
167
+        if ($delroom && $deldetail) {
168 168
             return true;
169 169
         }
170 170
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         $rooms = DB::table('rooms')
181 181
             ->selectRaw(DB::raw('rooms.*'))
182 182
             ->leftJoin('room_details', 'rooms.id', '=', 'room_details.room_id')
183
-            ->where('room_details.hospital_id','=',$hospital_id)
183
+            ->where('room_details.hospital_id', '=', $hospital_id)
184 184
             ->get();
185 185
 
186 186
         return $rooms;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
 use App\Hospital;
9 9
 use App\City;
10 10
 
11
-class HospitalController extends Controller
12
-{
11
+class HospitalController extends Controller {
13 12
     /**
14 13
      * Display a listing of the resource.
15 14
      *
Please login to merge, or discard this patch.
app/Http/Controllers/MemberController.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@
 block discarded – undo
15 15
 
16 16
     public function index()
17 17
     {
18
-        $user = User::orderBy('name','asc')->paginate(10);
18
+        $user = User::orderBy('name', 'asc')->paginate(10);
19 19
         $data = [
20 20
             'role' => session('role'),
21 21
             'user' => $user,
22 22
         ];
23
-        return view('pages.member')->with('data',$data);
23
+        return view('pages.member')->with('data', $data);
24 24
     }
25 25
 
26 26
     /**
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,7 @@
 block discarded – undo
5 5
 use Illuminate\Http\Request;
6 6
 use App\User;
7 7
 
8
-class MemberController extends Controller
9
-{
8
+class MemberController extends Controller {
10 9
     /**
11 10
      * Display a listing of the resource.
12 11
      *
Please login to merge, or discard this patch.
app/Http/Controllers/DoctorController.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
      */
19 19
     public function index()
20 20
     {
21
-        $doctor = Doctor::orderBy('name','asc')->paginate(10);
21
+        $doctor = Doctor::orderBy('name', 'asc')->paginate(10);
22 22
         $data = [
23 23
             'role' => session('role'),
24 24
             'doctor' => $doctor,
25 25
         ];
26
-        return view('pages.doctor')->with('data',$data);
26
+        return view('pages.doctor')->with('data', $data);
27 27
     }
28 28
 
29 29
     /**
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function store(Request $request)
47 47
     {
48
-        $this->validate($request,[
48
+        $this->validate($request, [
49 49
             'specialty' => 'required',
50 50
             'name' => 'required|min:3|max:50',
51 51
             'license' => 'required|min:3|max:191',
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $doctor->email = $request->input('email');
63 63
         $doctor->password = Hash::make($request->password);
64 64
 
65
-        if($doctor->save()) {
65
+        if ($doctor->save()) {
66 66
             return redirect(route('doctor.index'));
67 67
         }
68 68
     }
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      */
104 104
     public function update(Request $request, $id)
105 105
     {
106
-        $this->validate($request,[
106
+        $this->validate($request, [
107 107
             'name' => 'required|min:3|max:50',
108 108
             'password' => 'required_with:password_confirmation|same:password_confirmation|min:6',
109 109
             'password_confirmation' => 'min:6'
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         $doctor = Doctor::find($id);
129 129
         $doctor->delete();
130 130
 
131
-        return redirect (route('doctor.index'));
131
+        return redirect(route('doctor.index'));
132 132
     }
133 133
 
134 134
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@
 block discarded – undo
9 9
 use Illuminate\Support\Facades\Hash;
10 10
 
11 11
 
12
-class DoctorController extends Controller
13
-{
12
+class DoctorController extends Controller {
14 13
     /**
15 14
      * Display a listing of the resource.
16 15
      *
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     protected function mapWebRoutes()
53 53
     {
54 54
         Route::middleware('web')
55
-             ->namespace($this->namespace)
56
-             ->group(base_path('routes/web.php'));
55
+                ->namespace($this->namespace)
56
+                ->group(base_path('routes/web.php'));
57 57
     }
58 58
 
59 59
     /**
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
     protected function mapApiRoutes()
67 67
     {
68 68
         Route::prefix('api')
69
-             ->middleware('api')
70
-             ->namespace($this->namespace)
71
-             ->group(base_path('routes/api.php'));
69
+                ->middleware('api')
70
+                ->namespace($this->namespace)
71
+                ->group(base_path('routes/api.php'));
72 72
     }
73 73
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,7 @@
 block discarded – undo
5 5
 use Illuminate\Support\Facades\Route;
6 6
 use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
7 7
 
8
-class RouteServiceProvider extends ServiceProvider
9
-{
8
+class RouteServiceProvider extends ServiceProvider {
10 9
     /**
11 10
      * This namespace is applied to your controller routes.
12 11
      *
Please login to merge, or discard this patch.
app/Exceptions/Handler.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,7 @@
 block discarded – undo
6 6
 use Illuminate\Auth\AuthenticationException;
7 7
 use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
8 8
 
9
-class Handler extends ExceptionHandler
10
-{
9
+class Handler extends ExceptionHandler {
11 10
     /**
12 11
      * A list of the exception types that are not reported.
13 12
      *
Please login to merge, or discard this patch.
app/Providers/EventServiceProvider.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@
 block discarded – undo
7 7
 use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
8 8
 use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
9 9
 
10
-class EventServiceProvider extends ServiceProvider
11
-{
10
+class EventServiceProvider extends ServiceProvider {
12 11
     /**
13 12
      * The event listener mappings for the application.
14 13
      *
Please login to merge, or discard this patch.