Completed
Push — master ( bcb82e...80085e )
by vijay
07:39
created
app/Plugins/ServiceDesk/Model/Problem/SdStatusTypes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 class SdStatusTypes extends Model
8 8
 {
9 9
     protected $table = 'sd_status_types';
10
-    protected $fillable = ['id','name','created_at','updated_at',
10
+    protected $fillable = ['id', 'name', 'created_at', 'updated_at',
11 11
         
12 12
     ];
13 13
 }
Please login to merge, or discard this patch.
app/Plugins/ServiceDesk/Model/Problem/Location.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 class Location extends Model
10 10
 {
11 11
     protected $table = 'sd_locations';
12
-    protected $fillable = ['id','name','created_at','updated_at',
12
+    protected $fillable = ['id', 'name', 'created_at', 'updated_at',
13 13
         
14 14
     ];
15 15
 }
Please login to merge, or discard this patch.
app/Plugins/ServiceDesk/Model/Problem/TicketType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 class TicketType extends Model
8 8
 {
9 9
     protected $table = 'ticket_status';
10
-    protected $fillable = ['id','name','created_at','updated_at',
10
+    protected $fillable = ['id', 'name', 'created_at', 'updated_at',
11 11
         
12 12
     ];
13 13
 }
Please login to merge, or discard this patch.
app/Plugins/ServiceDesk/Model/Problem/Impact.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 class Impact extends Model
8 8
 {
9 9
     protected $table = 'sd_impact_types';
10
-    protected $fillable = ['id','saved','created_at','updated_at',
10
+    protected $fillable = ['id', 'saved', 'created_at', 'updated_at',
11 11
         
12 12
     ];
13 13
 }
Please login to merge, or discard this patch.
app/Plugins/ServiceDesk/Model/Products/SdProductstatus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,5 +5,5 @@
 block discarded – undo
5 5
 class SdProductstatus extends Model
6 6
 {
7 7
     protected $table = 'sd_product_status';
8
-    protected $fillable = ['id','name','created_at','updated_at'];
8
+    protected $fillable = ['id', 'name', 'created_at', 'updated_at'];
9 9
 }
10 10
\ No newline at end of file
Please login to merge, or discard this patch.
app/Plugins/ServiceDesk/Model/Products/SdProducts.php 3 patches
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -103,59 +103,59 @@
 block discarded – undo
103 103
         }
104 104
         return $value;
105 105
     }
106
-   public function vendorRelation(){
107
-      return  $this->hasMany("App\Plugins\ServiceDesk\Model\Common\ProductVendorRelation",'product_id');
108
-   }
106
+    public function vendorRelation(){
107
+        return  $this->hasMany("App\Plugins\ServiceDesk\Model\Common\ProductVendorRelation",'product_id');
108
+    }
109 109
    
110
-   public function vendors(){
111
-       $vendorids = $this->vendorRelation()->lists('vendor_id')->toArray();
112
-       $vendor = new \App\Plugins\ServiceDesk\Model\Vendor\SdVendors();
113
-       $vendors = $vendor->whereIn('id',$vendorids)->get();
114
-       return $vendors;
110
+    public function vendors(){
111
+        $vendorids = $this->vendorRelation()->lists('vendor_id')->toArray();
112
+        $vendor = new \App\Plugins\ServiceDesk\Model\Vendor\SdVendors();
113
+        $vendors = $vendor->whereIn('id',$vendorids)->get();
114
+        return $vendors;
115 115
        
116
-   }
116
+    }
117 117
    
118
-   public function assetRelation(){
119
-       return $this->hasMany('App\Plugins\ServiceDesk\Model\Assets\SdAssets','product_id');
120
-   }
121
-   public function assets(){
122
-       $relation = $this->assetRelation();
123
-       $assets = $relation->get();
124
-       return $assets;
125
-   }
118
+    public function assetRelation(){
119
+        return $this->hasMany('App\Plugins\ServiceDesk\Model\Assets\SdAssets','product_id');
120
+    }
121
+    public function assets(){
122
+        $relation = $this->assetRelation();
123
+        $assets = $relation->get();
124
+        return $assets;
125
+    }
126 126
    
127
-   public function deleteProductInAsset(){
128
-       $asset = $this->assetRelation()->first();
129
-       if($asset){
130
-           $asset->product_id = NULL;
131
-           $asset->save();
132
-       }
133
-   }
127
+    public function deleteProductInAsset(){
128
+        $asset = $this->assetRelation()->first();
129
+        if($asset){
130
+            $asset->product_id = NULL;
131
+            $asset->save();
132
+        }
133
+    }
134 134
    
135
-   public function contractRelation(){
136
-       return $this->hasMany('App\Plugins\ServiceDesk\Model\Contract\SdContract','product_id');
137
-   }
138
-   public function deleteProductInContract(){
139
-       $contract = $this->contractRelation()->first();
140
-       if($contract){
141
-           $contract->product_id = NULL;
142
-           $contract->save();
143
-       }
144
-   }
135
+    public function contractRelation(){
136
+        return $this->hasMany('App\Plugins\ServiceDesk\Model\Contract\SdContract','product_id');
137
+    }
138
+    public function deleteProductInContract(){
139
+        $contract = $this->contractRelation()->first();
140
+        if($contract){
141
+            $contract->product_id = NULL;
142
+            $contract->save();
143
+        }
144
+    }
145 145
    
146
-   public function deleteVendorRelation(){
147
-       $relation = $this->vendorRelation()->first();
148
-       if($relation){
149
-           $relation->delete();
150
-       }
151
-   }
146
+    public function deleteVendorRelation(){
147
+        $relation = $this->vendorRelation()->first();
148
+        if($relation){
149
+            $relation->delete();
150
+        }
151
+    }
152 152
    
153
-   public function delete(){
154
-       $this->deleteProductInAsset();
155
-       $this->deleteProductInContract();
156
-       $this->deleteVendorRelation();
157
-       parent::delete();
158
-   }
153
+    public function delete(){
154
+        $this->deleteProductInAsset();
155
+        $this->deleteProductInContract();
156
+        $this->deleteVendorRelation();
157
+        parent::delete();
158
+    }
159 159
     
160 160
     
161 161
 
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -88,69 +88,69 @@
 block discarded – undo
88 88
             $value = str_limit($attr, 10);
89 89
         }
90 90
         if (strlen($value) > 10) {
91
-            $value .="  <a href=# id='show-description'>Show</a>";
91
+            $value .= "  <a href=# id='show-description'>Show</a>";
92 92
         }
93 93
         return ucfirst($value);
94 94
     }
95 95
     
96
-    public function statuses(){
96
+    public function statuses() {
97 97
         $value = "--";
98 98
         $attr = $this->attributes['status'];
99
-        if ($attr==1) {
99
+        if ($attr == 1) {
100 100
             $value = "Enabled";
101
-        }else{
101
+        } else {
102 102
             $value = "Disabled";
103 103
         }
104 104
         return $value;
105 105
     }
106
-   public function vendorRelation(){
107
-      return  $this->hasMany("App\Plugins\ServiceDesk\Model\Common\ProductVendorRelation",'product_id');
106
+   public function vendorRelation() {
107
+      return  $this->hasMany("App\Plugins\ServiceDesk\Model\Common\ProductVendorRelation", 'product_id');
108 108
    }
109 109
    
110
-   public function vendors(){
110
+   public function vendors() {
111 111
        $vendorids = $this->vendorRelation()->lists('vendor_id')->toArray();
112 112
        $vendor = new \App\Plugins\ServiceDesk\Model\Vendor\SdVendors();
113
-       $vendors = $vendor->whereIn('id',$vendorids)->get();
113
+       $vendors = $vendor->whereIn('id', $vendorids)->get();
114 114
        return $vendors;
115 115
        
116 116
    }
117 117
    
118
-   public function assetRelation(){
119
-       return $this->hasMany('App\Plugins\ServiceDesk\Model\Assets\SdAssets','product_id');
118
+   public function assetRelation() {
119
+       return $this->hasMany('App\Plugins\ServiceDesk\Model\Assets\SdAssets', 'product_id');
120 120
    }
121
-   public function assets(){
121
+   public function assets() {
122 122
        $relation = $this->assetRelation();
123 123
        $assets = $relation->get();
124 124
        return $assets;
125 125
    }
126 126
    
127
-   public function deleteProductInAsset(){
127
+   public function deleteProductInAsset() {
128 128
        $asset = $this->assetRelation()->first();
129
-       if($asset){
129
+       if ($asset) {
130 130
            $asset->product_id = NULL;
131 131
            $asset->save();
132 132
        }
133 133
    }
134 134
    
135
-   public function contractRelation(){
136
-       return $this->hasMany('App\Plugins\ServiceDesk\Model\Contract\SdContract','product_id');
135
+   public function contractRelation() {
136
+       return $this->hasMany('App\Plugins\ServiceDesk\Model\Contract\SdContract', 'product_id');
137 137
    }
138
-   public function deleteProductInContract(){
138
+   public function deleteProductInContract() {
139 139
        $contract = $this->contractRelation()->first();
140
-       if($contract){
140
+       if ($contract) {
141 141
            $contract->product_id = NULL;
142 142
            $contract->save();
143 143
        }
144 144
    }
145 145
    
146
-   public function deleteVendorRelation(){
146
+   public function deleteVendorRelation() {
147 147
        $relation = $this->vendorRelation()->first();
148
-       if($relation){
148
+       if ($relation) {
149 149
            $relation->delete();
150 150
        }
151 151
    }
152 152
    
153
-   public function delete(){
153
+   public function delete() {
154 154
        $this->deleteProductInAsset();
155 155
        $this->deleteProductInContract();
156 156
        $this->deleteVendorRelation();
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
         $attr = $this->attributes['status'];
99 99
         if ($attr==1) {
100 100
             $value = "Enabled";
101
-        }else{
101
+        } else{
102 102
             $value = "Disabled";
103 103
         }
104 104
         return $value;
Please login to merge, or discard this patch.
app/Plugins/ServiceDesk/Model/Products/SdProductprocmode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,5 +5,5 @@
 block discarded – undo
5 5
 class SdProductprocmode extends Model
6 6
 {
7 7
     protected $table = 'sd_product_proc_mode';
8
-    protected $fillable = ['id','name','created_at','updated_at'];
8
+    protected $fillable = ['id', 'name', 'created_at', 'updated_at'];
9 9
 }
10 10
\ No newline at end of file
Please login to merge, or discard this patch.
app/Plugins/ServiceDesk/Model/Changes/SdLocationcategories.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,5 +5,5 @@
 block discarded – undo
5 5
 class SdLocationcategories extends Model
6 6
 {
7 7
     protected $table = 'sd_location_categories';
8
-    protected $fillable = ['id','name','parent_id','created_at','updated_at'];
8
+    protected $fillable = ['id', 'name', 'parent_id', 'created_at', 'updated_at'];
9 9
 }
10 10
\ No newline at end of file
Please login to merge, or discard this patch.
app/Plugins/ServiceDesk/Model/Changes/SdChangestatus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,5 +5,5 @@
 block discarded – undo
5 5
 class SdChangestatus extends Model
6 6
 {
7 7
     protected $table = 'sd_change_status';
8
-    protected $fillable = ['id','name','created_at','updated_at'];
8
+    protected $fillable = ['id', 'name', 'created_at', 'updated_at'];
9 9
 }
10 10
\ No newline at end of file
Please login to merge, or discard this patch.