CS fixes
This commit is contained in:
@@ -9,7 +9,6 @@ use Input;
|
||||
|
||||
class ComponentController extends Controller
|
||||
{
|
||||
|
||||
use ControllerTrait;
|
||||
|
||||
protected $component;
|
||||
@@ -20,7 +19,7 @@ class ComponentController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all components
|
||||
* Get all components.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Collection
|
||||
*/
|
||||
@@ -30,7 +29,7 @@ class ComponentController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a single component
|
||||
* Get a single component.
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
@@ -42,8 +41,10 @@ class ComponentController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a component with incidents
|
||||
* @param int $id Component ID
|
||||
* Return a component with incidents.
|
||||
*
|
||||
* @param int $id Component ID
|
||||
*
|
||||
* @return \Component
|
||||
*/
|
||||
public function getComponentIncidents($id)
|
||||
@@ -52,7 +53,7 @@ class ComponentController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new component
|
||||
* Create a new component.
|
||||
*
|
||||
* @return \Component
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,6 @@ use Input;
|
||||
|
||||
class IncidentController extends Controller
|
||||
{
|
||||
|
||||
use ControllerTrait;
|
||||
|
||||
protected $incident;
|
||||
@@ -20,7 +19,7 @@ class IncidentController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all incidents
|
||||
* Get all incidents.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Collection
|
||||
*/
|
||||
@@ -30,7 +29,7 @@ class IncidentController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a single incident
|
||||
* Get a single incident.
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
@@ -42,7 +41,7 @@ class IncidentController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new incident
|
||||
* Create a new incident.
|
||||
*
|
||||
* @return Incident
|
||||
*/
|
||||
@@ -52,7 +51,7 @@ class IncidentController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing incident
|
||||
* Update an existing incident.
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
|
||||
@@ -9,7 +9,6 @@ use Input;
|
||||
|
||||
class MetricController extends Controller
|
||||
{
|
||||
|
||||
use ControllerTrait;
|
||||
|
||||
protected $metric;
|
||||
@@ -19,7 +18,7 @@ class MetricController extends Controller
|
||||
$this->metric = $metric;
|
||||
}
|
||||
/**
|
||||
* Get all metrics
|
||||
* Get all metrics.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Collection
|
||||
*/
|
||||
@@ -29,7 +28,7 @@ class MetricController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a single metric
|
||||
* Get a single metric.
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
@@ -41,7 +40,7 @@ class MetricController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new metric
|
||||
* Create a new metric.
|
||||
*
|
||||
* @return Metric
|
||||
*/
|
||||
@@ -51,7 +50,7 @@ class MetricController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing metric
|
||||
* Update an existing metric.
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
|
||||
@@ -9,7 +9,6 @@ use Input;
|
||||
|
||||
class MetricPointController extends Controller
|
||||
{
|
||||
|
||||
use ControllerTrait;
|
||||
|
||||
protected $metricpoint;
|
||||
@@ -19,7 +18,7 @@ class MetricPointController extends Controller
|
||||
$this->metricpoint = $metricpoint;
|
||||
}
|
||||
/**
|
||||
* Get all metric points
|
||||
* Get all metric points.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Collection
|
||||
*/
|
||||
@@ -29,7 +28,7 @@ class MetricPointController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a single metric point
|
||||
* Get a single metric point.
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
@@ -41,7 +40,7 @@ class MetricPointController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new metric point
|
||||
* Create a new metric point.
|
||||
*
|
||||
* @return MetricPoint
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace CachetHQ\Cachet\Repositories\Component;
|
||||
|
||||
interface ComponentRepository
|
||||
{
|
||||
|
||||
public function all();
|
||||
|
||||
public function create($id, array $array);
|
||||
|
||||
@@ -7,7 +7,6 @@ use Component;
|
||||
|
||||
class EloquentComponentRepository extends EloquentRepository implements ComponentRepository
|
||||
{
|
||||
|
||||
protected $model;
|
||||
|
||||
public function __construct(Component $model)
|
||||
|
||||
@@ -7,9 +7,9 @@ use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
|
||||
abstract class EloquentRepository
|
||||
{
|
||||
|
||||
/**
|
||||
* Returns all models
|
||||
* Returns all models.
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
public function all()
|
||||
@@ -18,9 +18,11 @@ abstract class EloquentRepository
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an object with related relationships
|
||||
* @param id $id
|
||||
* @param array $with Array of model relationships
|
||||
* Returns an object with related relationships.
|
||||
*
|
||||
* @param id $id
|
||||
* @param array $with Array of model relationships
|
||||
*
|
||||
* @return object|ModelNotFoundException
|
||||
*/
|
||||
public function with($id, array $with = [])
|
||||
@@ -29,9 +31,11 @@ abstract class EloquentRepository
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the model to query against a user id
|
||||
* @param integer $id
|
||||
* @param string $column
|
||||
* Sets the model to query against a user id.
|
||||
*
|
||||
* @param int $id
|
||||
* @param string $column
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function withAuth($id, $column = 'user_id')
|
||||
@@ -42,8 +46,10 @@ abstract class EloquentRepository
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds a model by ID
|
||||
* @param int $id
|
||||
* Finds a model by ID.
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
public function find(int $id)
|
||||
@@ -52,8 +58,10 @@ abstract class EloquentRepository
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds a model by ID
|
||||
* @param integer $id
|
||||
* Finds a model by ID.
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return object|ModelNotFoundException
|
||||
*/
|
||||
public function findOrFail($id)
|
||||
@@ -62,10 +70,12 @@ abstract class EloquentRepository
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds a model by type
|
||||
* @param string $key
|
||||
* @param string $value
|
||||
* @param array $columns
|
||||
* Finds a model by type.
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $value
|
||||
* @param array $columns
|
||||
*
|
||||
* @return object|ModelNotFoundException
|
||||
*/
|
||||
public function findByOrFail($key, $value, $columns = ['*'])
|
||||
@@ -78,10 +88,12 @@ abstract class EloquentRepository
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts the number of rows returned
|
||||
* @param string $key
|
||||
* @param string $value
|
||||
* @return integer
|
||||
* Counts the number of rows returned.
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $value
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function count($key = null, $value = null)
|
||||
{
|
||||
@@ -93,7 +105,8 @@ abstract class EloquentRepository
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a model by ID
|
||||
* Deletes a model by ID.
|
||||
*
|
||||
* @param inetegr $id
|
||||
*/
|
||||
public function destroy($id)
|
||||
@@ -102,8 +115,10 @@ abstract class EloquentRepository
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate a given model with Watson validation
|
||||
* @param object $model
|
||||
* Validate a given model with Watson validation.
|
||||
*
|
||||
* @param object $model
|
||||
*
|
||||
* @return Exception
|
||||
*/
|
||||
public function validate($model)
|
||||
@@ -116,9 +131,11 @@ abstract class EloquentRepository
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate whether a model has a correct relationship
|
||||
* @param object $model
|
||||
* @param string $relationship Name of the relationship to validate against
|
||||
* Validate whether a model has a correct relationship.
|
||||
*
|
||||
* @param object $model
|
||||
* @param string $relationship Name of the relationship to validate against
|
||||
*
|
||||
* @return Exception
|
||||
*/
|
||||
public function hasRelationship($model, $relationship)
|
||||
|
||||
@@ -7,7 +7,6 @@ use Incident;
|
||||
|
||||
class EloquentIncidentRepository extends EloquentRepository implements IncidentRepository
|
||||
{
|
||||
|
||||
protected $model;
|
||||
|
||||
public function __construct(Incident $model)
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace CachetHQ\Cachet\Repositories\Incident;
|
||||
|
||||
interface IncidentRepository
|
||||
{
|
||||
|
||||
public function all();
|
||||
|
||||
public function create($id, array $array);
|
||||
|
||||
@@ -7,7 +7,6 @@ use Metric;
|
||||
|
||||
class EloquentMetricRepository extends EloquentRepository implements MetricRepository
|
||||
{
|
||||
|
||||
protected $model;
|
||||
|
||||
public function __construct(Metric $model)
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace CachetHQ\Cachet\Repositories\Metric;
|
||||
|
||||
interface MetricRepository
|
||||
{
|
||||
|
||||
public function all();
|
||||
|
||||
public function create(array $array);
|
||||
|
||||
@@ -7,7 +7,6 @@ use MetricPoint;
|
||||
|
||||
class EloquentMetricPointRepository extends EloquentRepository implements MetricRepository
|
||||
{
|
||||
|
||||
protected $model;
|
||||
|
||||
public function __construct(MetricPoint $model)
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace CachetHQ\Cachet\Repositories\MetricPoint;
|
||||
|
||||
interface MetricPointRepository
|
||||
{
|
||||
|
||||
public function all();
|
||||
|
||||
public function create(array $array);
|
||||
|
||||
@@ -7,7 +7,6 @@ use RecursiveDirectoryIterator;
|
||||
|
||||
class RoutingServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
public function register()
|
||||
{
|
||||
}
|
||||
@@ -18,7 +17,8 @@ class RoutingServiceProvider extends ServiceProvider
|
||||
}
|
||||
|
||||
/**
|
||||
* Organise Routes
|
||||
* Organise Routes.
|
||||
*
|
||||
* @param string $app
|
||||
*/
|
||||
private function routesInDirectory($app = '')
|
||||
|
||||
@@ -7,7 +7,6 @@ use League\Fractal\TransformerAbstract;
|
||||
|
||||
class ComponentTransformer extends TransformerAbstract
|
||||
{
|
||||
|
||||
public function transform(Component $component)
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -7,7 +7,6 @@ use League\Fractal\TransformerAbstract;
|
||||
|
||||
class IncidentTransformer extends TransformerAbstract
|
||||
{
|
||||
|
||||
public function transform(Incident $incident)
|
||||
{
|
||||
$component = $incident->component;
|
||||
|
||||
@@ -7,7 +7,6 @@ use MetricPoint;
|
||||
|
||||
class MetricPointTransformer extends TransformerAbstract
|
||||
{
|
||||
|
||||
public function transform(MetricPoint $metricPoint)
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -7,7 +7,6 @@ use Metric;
|
||||
|
||||
class MetricTransformer extends TransformerAbstract
|
||||
{
|
||||
|
||||
public function transform(Metric $metric)
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -4,7 +4,9 @@ class DashAPIController extends Controller
|
||||
{
|
||||
/**
|
||||
* Updates a component with the entered info.
|
||||
* @param Component $component
|
||||
*
|
||||
* @param Component $component
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function postUpdateComponent(Component $component)
|
||||
|
||||
@@ -11,6 +11,7 @@ class DashboardController extends Controller
|
||||
{
|
||||
// TODO: Find steps needed to complete setup.
|
||||
$components = Component::all();
|
||||
|
||||
return View::make('dashboard.index')->with([
|
||||
'components' => $components,
|
||||
]);
|
||||
|
||||
@@ -5,7 +5,7 @@ class HomeController extends Controller
|
||||
/**
|
||||
* The component instance.
|
||||
*
|
||||
* @var \Component $component
|
||||
* @var \Component
|
||||
*/
|
||||
protected $component;
|
||||
|
||||
|
||||
@@ -1,36 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AlterTableComponentsAddMetaColumns extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('components', function(Blueprint $table)
|
||||
{
|
||||
$table->text('tags')->nullable()->default(null)->after('description');
|
||||
$table->text('link')->nullable()->default(null)->after('description');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('components', function(Blueprint $table)
|
||||
{
|
||||
$table->dropColumn('tags');
|
||||
$table->dropColumn('link');
|
||||
});
|
||||
}
|
||||
class AlterTableComponentsAddMetaColumns extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('components', function (Blueprint $table) {
|
||||
$table->text('tags')->nullable()->default(null)->after('description');
|
||||
$table->text('link')->nullable()->default(null)->after('description');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('components', function (Blueprint $table) {
|
||||
$table->dropColumn('tags');
|
||||
$table->dropColumn('link');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,8 @@ if (! function_exists('elixir')) {
|
||||
/**
|
||||
* Get the path to a versioned Elixir file.
|
||||
*
|
||||
* @param string $file
|
||||
* @param string $file
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function elixir($file)
|
||||
|
||||
@@ -11,7 +11,7 @@ class Component extends Eloquent implements \Dingo\Api\Transformer\Transformable
|
||||
'user_id' => 'integer|required',
|
||||
'name' => 'required',
|
||||
'status' => 'integer',
|
||||
'link' => 'url'
|
||||
'link' => 'url',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
@@ -20,11 +20,12 @@ class Component extends Eloquent implements \Dingo\Api\Transformer\Transformable
|
||||
'status',
|
||||
'user_id',
|
||||
'tags',
|
||||
'link'
|
||||
'link',
|
||||
];
|
||||
|
||||
/**
|
||||
* Lookup all of the incidents reported on the component.
|
||||
*
|
||||
* @return Illuminate\Database\Eloquent\Relations
|
||||
*/
|
||||
public function incidents()
|
||||
@@ -34,6 +35,7 @@ class Component extends Eloquent implements \Dingo\Api\Transformer\Transformable
|
||||
|
||||
/**
|
||||
* Looks up the human readable version of the status.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getHumanStatusAttribute()
|
||||
@@ -43,6 +45,7 @@ class Component extends Eloquent implements \Dingo\Api\Transformer\Transformable
|
||||
|
||||
/**
|
||||
* Get the transformer instance.
|
||||
*
|
||||
* @return ComponentTransformer
|
||||
*/
|
||||
public function getTransformer()
|
||||
|
||||
@@ -18,6 +18,7 @@ class IncidentTemplate extends Eloquent
|
||||
|
||||
/**
|
||||
* Overrides the models boot method.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function boot()
|
||||
|
||||
@@ -16,6 +16,7 @@ class Metric extends Eloquent implements \Dingo\Api\Transformer\TransformableInt
|
||||
|
||||
/**
|
||||
* Metrics contain many metric points.
|
||||
*
|
||||
* @return Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function points()
|
||||
@@ -25,6 +26,7 @@ class Metric extends Eloquent implements \Dingo\Api\Transformer\TransformableInt
|
||||
|
||||
/**
|
||||
* Determines whether a chart should be shown.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getShouldDisplayAttribute()
|
||||
@@ -34,6 +36,7 @@ class Metric extends Eloquent implements \Dingo\Api\Transformer\TransformableInt
|
||||
|
||||
/**
|
||||
* Get the transformer instance.
|
||||
*
|
||||
* @return CachetHQ\Cachet\Transformers\MetricTransformer
|
||||
*/
|
||||
public function getTransformer()
|
||||
|
||||
@@ -4,6 +4,7 @@ class MetricPoint extends Eloquent
|
||||
{
|
||||
/**
|
||||
* A metric point belongs to a metric unit.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function metric()
|
||||
|
||||
@@ -14,7 +14,9 @@ class Service extends Eloquent
|
||||
|
||||
/**
|
||||
* Returns a decoded properties object for the service.
|
||||
* @param string $properties
|
||||
*
|
||||
* @param string $properties
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
public function getPropertiesAttribute($properties)
|
||||
@@ -24,6 +26,7 @@ class Service extends Eloquent
|
||||
|
||||
/**
|
||||
* Sets the properties attribute which auto encodes to a JSON string.
|
||||
*
|
||||
* @param mixed $properties
|
||||
*/
|
||||
public function setPropertiesAttribute($properties)
|
||||
|
||||
@@ -6,8 +6,10 @@ class Setting extends Eloquent
|
||||
|
||||
/**
|
||||
* Returns a setting from the database.
|
||||
* @param string $settingName
|
||||
* @param bool $checkEnv
|
||||
*
|
||||
* @param string $settingName
|
||||
* @param bool $checkEnv
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function get($settingName, $checkEnv = true)
|
||||
@@ -33,9 +35,12 @@ class Setting extends Eloquent
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws an Exception
|
||||
* @param string $setting
|
||||
* Throws an Exception.
|
||||
*
|
||||
* @param string $setting
|
||||
*
|
||||
* @throws Exception
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function unknownSettingException($setting)
|
||||
|
||||
@@ -11,26 +11,30 @@ class User extends Eloquent implements UserInterface, RemindableInterface
|
||||
|
||||
/**
|
||||
* The database table used by the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'users';
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = ['password', 'remember_token'];
|
||||
|
||||
/**
|
||||
* Items which cannot be mass assigned.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* Hash any password being inserted by default
|
||||
* Hash any password being inserted by default.
|
||||
*
|
||||
* @param string @password
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setPasswordAttribute($password)
|
||||
@@ -40,7 +44,9 @@ class User extends Eloquent implements UserInterface, RemindableInterface
|
||||
|
||||
/**
|
||||
* Returns a Gravatar URL for the users email address.
|
||||
* @param integer $size
|
||||
*
|
||||
* @param int $size
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getGravatarAttribute($size = 200)
|
||||
|
||||
@@ -12,6 +12,7 @@ class WebHook extends Eloquent
|
||||
|
||||
/**
|
||||
* Returns all responses for a WebHook.
|
||||
*
|
||||
* @return Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function response()
|
||||
@@ -21,7 +22,9 @@ class WebHook extends Eloquent
|
||||
|
||||
/**
|
||||
* Returns all active hooks.
|
||||
* @param Illuminate\Database\Eloquent\Builder $query
|
||||
*
|
||||
* @param Illuminate\Database\Eloquent\Builder $query
|
||||
*
|
||||
* @return Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function scopeActive($query)
|
||||
@@ -31,6 +34,7 @@ class WebHook extends Eloquent
|
||||
|
||||
/**
|
||||
* Setups a Ping event that is fired upon a web hook.
|
||||
*
|
||||
* @return array result of the ping
|
||||
*/
|
||||
public function ping()
|
||||
@@ -40,8 +44,10 @@ class WebHook extends Eloquent
|
||||
|
||||
/**
|
||||
* Fires the actual web hook event.
|
||||
* @param string $eventType the event to send X-Cachet-Event
|
||||
* @param mixed $data Data to send to the Web Hook
|
||||
*
|
||||
* @param string $eventType the event to send X-Cachet-Event
|
||||
* @param mixed $data Data to send to the Web Hook
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
public function fire($eventType, $data = null)
|
||||
@@ -81,8 +87,10 @@ class WebHook extends Eloquent
|
||||
|
||||
/**
|
||||
* Returns a human readable request type name.
|
||||
*
|
||||
* @throws Exception
|
||||
* @return string HEAD, GET, POST, DELETE, PATCH, PUT etc
|
||||
*
|
||||
* @return string HEAD, GET, POST, DELETE, PATCH, PUT etc
|
||||
*/
|
||||
public function getRequestMethodAttribute()
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ class WebHookResponse extends Eloquent
|
||||
{
|
||||
/**
|
||||
* Returns the hook that a response belongs to.
|
||||
*
|
||||
* @return Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function hook()
|
||||
|
||||
@@ -36,7 +36,7 @@ Route::group(['before' => 'auth', 'prefix' => 'dashboard'], function () {
|
||||
|
||||
// Internal API.
|
||||
// This should only be used for making requests within the dashboard.
|
||||
Route::group(['prefix' => 'api'], function() {
|
||||
Route::group(['prefix' => 'api'], function () {
|
||||
Route::post('components/{component}', 'DashAPIController@postUpdateComponent');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
class ComponentControllerTest extends TestCase
|
||||
{
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->repo = Mockery::mock('CachetHQ\Cachet\Repositories\Component\ComponentRepository');
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Creates the application.
|
||||
*
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* Laravel - A PHP Framework For Web Artisans
|
||||
* Laravel - A PHP Framework For Web Artisans.
|
||||
*
|
||||
* @package Laravel
|
||||
* @author Taylor Otwell <taylorotwell@gmail.com>
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user