CS fixes
This commit is contained in:
@@ -2,14 +2,15 @@
|
||||
|
||||
use Watson\Validating\ValidatingTrait;
|
||||
|
||||
class Component extends Eloquent implements \Dingo\Api\Transformer\TransformableInterface {
|
||||
class Component extends Eloquent implements \Dingo\Api\Transformer\TransformableInterface
|
||||
{
|
||||
use ValidatingTrait;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingTrait;
|
||||
|
||||
protected $rules = [
|
||||
'user_id' => 'integer|required',
|
||||
'name' => 'required',
|
||||
'status' => 'integer'
|
||||
'status' => 'integer',
|
||||
];
|
||||
|
||||
protected $fillable = ['name', 'description', 'status', 'user_id'];
|
||||
@@ -18,7 +19,8 @@ class Component extends Eloquent implements \Dingo\Api\Transformer\Transformable
|
||||
* Lookup all of the incidents reported on the component.
|
||||
* @return Illuminate\Database\Eloquent\Relations
|
||||
*/
|
||||
public function incidents() {
|
||||
public function incidents()
|
||||
{
|
||||
return $this->hasMany('Incident', 'component_id', 'id');
|
||||
}
|
||||
|
||||
@@ -26,15 +28,17 @@ class Component extends Eloquent implements \Dingo\Api\Transformer\Transformable
|
||||
* Looks up the human readable version of the status.
|
||||
* @return string
|
||||
*/
|
||||
public function getHumanStatusAttribute() {
|
||||
return Lang::get('cachet.component.status.' . $this->status);
|
||||
public function getHumanStatusAttribute()
|
||||
{
|
||||
return Lang::get('cachet.component.status.'.$this->status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the transformer instance.
|
||||
* @return ComponentTransformer
|
||||
*/
|
||||
public function getTransformer() {
|
||||
public function getTransformer()
|
||||
{
|
||||
return new CachetHQ\Cachet\Transformers\ComponentTransformer();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user