CS fixes
This commit is contained in:
@@ -4,23 +4,26 @@ namespace CachetHQ\Cachet\Repositories\Component;
|
||||
|
||||
use CachetHQ\Cachet\Repositories\EloquentRepository;
|
||||
use Component;
|
||||
use Exception;
|
||||
|
||||
class EloquentComponentRepository extends EloquentRepository implements ComponentRepository {
|
||||
class EloquentComponentRepository extends EloquentRepository implements ComponentRepository
|
||||
{
|
||||
|
||||
protected $model;
|
||||
protected $model;
|
||||
|
||||
public function __construct(Component $model) {
|
||||
$this->model = $model;
|
||||
}
|
||||
public function __construct(Component $model)
|
||||
{
|
||||
$this->model = $model;
|
||||
}
|
||||
|
||||
public function create($user_id, array $array) {
|
||||
$component = new $this->model($array);
|
||||
$component->user_id = $user_id;
|
||||
public function create($user_id, array $array)
|
||||
{
|
||||
$component = new $this->model($array);
|
||||
$component->user_id = $user_id;
|
||||
|
||||
$this->validate($component);
|
||||
$this->validate($component);
|
||||
|
||||
$component->saveOrFail();
|
||||
return $component;
|
||||
}
|
||||
$component->saveOrFail();
|
||||
|
||||
return $component;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user