Passed
Push — master ( 14ba86...1ea504 )
by Faiq
04:32
created
app/Http/Controllers/RoomController.php 1 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\Room;
10 10
 
11
-class RoomController extends Controller
12
-{
11
+class RoomController extends Controller {
13 12
     /**
14 13
      * Show the form for creating a new resource.
15 14
      *
Please login to merge, or discard this patch.
app/Http/Kernel.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Illuminate\Foundation\Http\Kernel as HttpKernel;
6 6
 
7
-class Kernel extends HttpKernel
8
-{
7
+class Kernel extends HttpKernel {
9 8
     /**
10 9
      * The application's global HTTP middleware stack.
11 10
      *
Please login to merge, or discard this patch.
app/Hospital.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Illuminate\Database\Eloquent\Model;
6 6
 
7
-class Hospital extends Model
8
-{
7
+class Hospital extends Model {
9 8
     /**
10 9
      * @var string
11 10
      */
Please login to merge, or discard this patch.
app/DoctorDetail.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Illuminate\Database\Eloquent\Model;
6 6
 
7
-class DoctorDetail extends Model
8
-{
7
+class DoctorDetail extends Model {
9 8
     /**
10 9
      * @var string
11 10
      */
Please login to merge, or discard this patch.
app/Http/Controllers/DocController.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,7 @@
 block discarded – undo
10 10
 use Illuminate\Support\Facades\Hash;
11 11
 use Illuminate\Support\Facades\Storage;
12 12
 
13
-class DocController extends Controller
14
-{
13
+class DocController extends Controller {
15 14
     /**
16 15
      * Create a new controller instance
17 16
      *
Please login to merge, or discard this patch.
app/Http/Controllers/SpecializationController.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 App\City;
7 7
 use App\DoctorSpecialization;
8 8
 
9
-class SpecializationController extends Controller
10
-{
9
+class SpecializationController extends Controller {
11 10
     /**
12 11
      * Display a listing of the resource.
13 12
      *
Please login to merge, or discard this patch.
app/DoctorSpecialization.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,8 +4,7 @@  discard block
 block discarded – undo
4 4
 
5 5
 use Illuminate\Database\Eloquent\Model;
6 6
 
7
-class DoctorSpecialization extends Model
8
-{
7
+class DoctorSpecialization extends Model {
9 8
     /**
10 9
      * @var string
11 10
      */
@@ -29,7 +28,8 @@  discard block
 block discarded – undo
29 28
         'updated_at'
30 29
     ];
31 30
 
32
-    public function doctor() {
31
+    public function doctor()
32
+    {
33 33
         return $this->hasOne('App\Doctor', 'specialization_id');
34 34
     }
35 35
 
Please login to merge, or discard this patch.
app/Http/Controllers/DoctorController.php 1 patch
Braces   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@  discard block
 block discarded – undo
11 11
 use Psy\Exception\ErrorException;
12 12
 
13 13
 
14
-class DoctorController extends Controller
15
-{
14
+class DoctorController extends Controller {
16 15
     /**
17 16
      * Returning view with data resource
18 17
      *
@@ -146,11 +145,11 @@  discard block
 block discarded – undo
146 145
 
147 146
     public function searchDoctor(Request $request)
148 147
     {
149
-        if($request->nama == null AND $request->location != null){
148
+        if($request->nama == null AND $request->location != null) {
150 149
             $doctor = Doctor::where('city_id',$request->location)->orderBy('name','asc')->paginate(5);
151
-        }elseif ($request->location == null AND $request->nama != null){
150
+        } elseif ($request->location == null AND $request->nama != null) {
152 151
             $doctor = Doctor::where('name','LIKE','%'.$request->nama.'%')->orderBy('name','asc')->paginate(5);
153
-        }else{
152
+        } else {
154 153
             $doctor = Doctor::where('name','LIKE','%'.$request->nama.'%')->where('city_id',$request->location)->orderBy('name','asc')->paginate(5);
155 154
         }
156 155
         $location = City::orderBy('name','asc')->pluck('name','id');
Please login to merge, or discard this patch.
app/Articles.php 1 patch
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,8 +5,7 @@  discard block
 block discarded – undo
5 5
 use App\Doctor;
6 6
 use Illuminate\Database\Eloquent\Model;
7 7
 
8
-class Articles extends Model
9
-{
8
+class Articles extends Model {
10 9
     /**
11 10
      * @var string
12 11
      */
@@ -33,7 +32,8 @@  discard block
 block discarded – undo
33 32
     /**
34 33
      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
35 34
      */
36
-    public function admin() {
35
+    public function admin()
36
+    {
37 37
         return $this->belongsTo('App\Admin');
38 38
     }
39 39
 
@@ -41,7 +41,8 @@  discard block
 block discarded – undo
41 41
     /**
42 42
      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
43 43
      */
44
-    public function doctor() {
44
+    public function doctor()
45
+    {
45 46
         return $this->belongsTo('App\Doctor');
46 47
     }
47 48
 
@@ -49,7 +50,8 @@  discard block
 block discarded – undo
49 50
      * @param $id
50 51
      * @return array
51 52
      */
52
-    public function writer() {
53
+    public function writer()
54
+    {
53 55
         $adminId = $this->getAttributeValue('admin_id');
54 56
         $doctorId = $this->getAttributeValue('doctor_id');
55 57
 
@@ -72,7 +74,7 @@  discard block
 block discarded – undo
72 74
      */
73 75
     public function cutStr($str)
74 76
     {
75
-        if (strlen($str) > 200){
77
+        if (strlen($str) > 200) {
76 78
             return substr($str,0,200) . "...";
77 79
         }
78 80
         return $str;
Please login to merge, or discard this patch.