Passed
Pull Request — master (#67)
by Faiq
09:13
created
app/City.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 City extends Model
8
-{
7
+class City extends Model {
9 8
     /**
10 9
      * @var string
11 10
      */
@@ -37,7 +36,8 @@  discard block
 block discarded – undo
37 36
         return $this->hasMany('App\Hospital');
38 37
     }
39 38
 
40
-    public function doctor() {
39
+    public function doctor()
40
+    {
41 41
         return $this->belongsTo('App\Doctor');
42 42
     }
43 43
 }
Please login to merge, or discard this patch.
app/ThreadTopic.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 ThreadTopic extends Model
8
-{
7
+class ThreadTopic extends Model {
9 8
     protected $table = 'thread_topics';
10 9
 
11 10
     protected $dates = [
Please login to merge, or discard this patch.
app/User.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@  discard block
 block discarded – undo
8 8
 use Illuminate\Foundation\Auth\User as Authenticatable;
9 9
 use Illuminate\Support\Facades\Auth;
10 10
 
11
-class User extends Authenticatable
12
-{
11
+class User extends Authenticatable {
13 12
     use Notifiable;
14 13
 
15 14
     /**
@@ -47,14 +46,16 @@  discard block
 block discarded – undo
47 46
         'updated_at'
48 47
     ];
49 48
 
50
-    public function thread() {
49
+    public function thread()
50
+    {
51 51
         return $this->hasMany('App\Thread', 'user_id');
52 52
     }
53 53
 
54 54
     /**
55 55
      * @return int
56 56
      */
57
-    public function threadAnswered() {
57
+    public function threadAnswered()
58
+    {
58 59
         return count(
59 60
             Thread::where('status', true)
60 61
                 ->where('user_id', Auth::guard('web')
Please login to merge, or discard this patch.
app/Thread.php 1 patch
Braces   +9 added lines, -6 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 Thread extends Model
8
-{
7
+class Thread extends Model {
9 8
     protected $table = 'threads';
10 9
 
11 10
     protected $dates = [
@@ -13,19 +12,23 @@  discard block
 block discarded – undo
13 12
         'updated_at'
14 13
     ];
15 14
 
16
-    public function topic() {
15
+    public function topic()
16
+    {
17 17
         return $this->belongsTo('App\ThreadTopic', 'id_topic');
18 18
     }
19 19
 
20
-    public function user() {
20
+    public function user()
21
+    {
21 22
         return $this->belongsTo('App\User');
22 23
     }
23 24
 
24
-    public function doctor() {
25
+    public function doctor()
26
+    {
25 27
         return $this->belongsTo('App\Doctor');
26 28
     }
27 29
 
28
-    public function trimStr(string $string) {
30
+    public function trimStr(string $string)
31
+    {
29 32
         if(strlen($string) > 200) {
30 33
             return substr($string, 0, 200).'...';
31 34
         }
Please login to merge, or discard this patch.
app/Doctor.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@  discard block
 block discarded – undo
9 9
 use Illuminate\Contracts\Auth\MustVerifyEmail;
10 10
 use Illuminate\Foundation\Auth\User as Authenticatable;
11 11
 
12
-class Doctor extends Authenticatable
13
-{
12
+class Doctor extends Authenticatable {
14 13
     use Notifiable;
15 14
 
16 15
     protected $guard = 'doctor';
@@ -74,11 +73,13 @@  discard block
 block discarded – undo
74 73
         return $this->belongsTo('App\DoctorSpecialization', 'specialization_id');
75 74
     }
76 75
 
77
-    public function city() {
76
+    public function city()
77
+    {
78 78
         return $this->belongsTo('App\City', 'city_id');
79 79
     }
80 80
 
81
-    public function thread() {
81
+    public function thread()
82
+    {
82 83
         return $this->hasMany('App\Thread', 'doctor_id');
83 84
     }
84 85
 
Please login to merge, or discard this patch.
app/Http/Controllers/ThreadAskController.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 App\Thread;
8 8
 use App\ThreadTopic;
9 9
 
10
-class ThreadAskController extends Controller
11
-{
10
+class ThreadAskController extends Controller {
12 11
     public function __construct()
13 12
     {
14 13
         $this->middleware('auth', ['except' => [
Please login to merge, or discard this patch.
app/Http/Controllers/ThreadController.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\ThreadTopic;
7 7
 use Illuminate\Support\Facades\Auth;
8 8
 
9
-class ThreadController extends Controller
10
-{
9
+class ThreadController extends Controller {
11 10
     public function __construct()
12 11
     {
13 12
         $this->middleware('auth:admin', ['except' => [
Please login to merge, or discard this patch.
app/Http/Controllers/ThreadAnswerController.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\Http\Request;
7 7
 use Illuminate\Support\Facades\Auth;
8 8
 
9
-class ThreadAnswerController extends Controller
10
-{
9
+class ThreadAnswerController extends Controller {
11 10
     public function __construct()
12 11
     {
13 12
         $this->middleware('auth:doctor');
Please login to merge, or discard this patch.