Skip to content

Commit 20121b8

Browse files
committed
Rename var && fix form
1 parent 5a9fcba commit 20121b8

22 files changed

+57
-106
lines changed

app/Bus/Commands/Incident/ReportIncidentCommand.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ final class ReportIncidentCommand
6767
*
6868
* @var bool
6969
*/
70-
public $sticked;
70+
public $stickied;
7171

7272
/**
7373
* The date at which the incident occurred.
@@ -103,7 +103,7 @@ final class ReportIncidentCommand
103103
'component_id' => 'int|required_with:component_status',
104104
'component_status' => 'int|min:1|max:4|required_with:component_id',
105105
'notify' => 'bool',
106-
'sticked' => 'bool',
106+
'stickied' => 'bool',
107107
'incident_date' => 'string',
108108
'template' => 'string',
109109
];
@@ -118,14 +118,14 @@ final class ReportIncidentCommand
118118
* @param int $component_id
119119
* @param int $component_status
120120
* @param bool $notify
121-
* @param bool $sticked
121+
* @param bool $stickied
122122
* @param string|null $incident_date
123123
* @param string|null $template
124124
* @param array|null $template_vars
125125
*
126126
* @return void
127127
*/
128-
public function __construct($name, $status, $message, $visible, $component_id, $component_status, $notify, $sticked, $incident_date, $template, array $template_vars = null)
128+
public function __construct($name, $status, $message, $visible, $component_id, $component_status, $notify, $stickied, $incident_date, $template, array $template_vars = null)
129129
{
130130
$this->name = $name;
131131
$this->status = $status;
@@ -134,7 +134,7 @@ public function __construct($name, $status, $message, $visible, $component_id, $
134134
$this->component_id = $component_id;
135135
$this->component_status = $component_status;
136136
$this->notify = $notify;
137-
$this->sticked = $sticked;
137+
$this->stickied = $stickied;
138138
$this->incident_date = $incident_date;
139139
$this->template = $template;
140140
$this->template_vars = $template_vars;

app/Bus/Commands/Incident/UpdateIncidentCommand.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ final class UpdateIncidentCommand
7676
*
7777
* @var bool
7878
*/
79-
public $sticked;
79+
public $stickied;
8080

8181
/**
8282
* The date that the incident occurred on.
@@ -112,7 +112,7 @@ final class UpdateIncidentCommand
112112
'component_id' => 'int',
113113
'component_status' => 'int|min:1|max:4|required_with:component_id',
114114
'notify' => 'bool',
115-
'sticked' => 'bool',
115+
'stickied' => 'bool',
116116
'template' => 'string',
117117
];
118118

@@ -127,14 +127,14 @@ final class UpdateIncidentCommand
127127
* @param int $component_id
128128
* @param int $component_status
129129
* @param bool $notify
130-
* @param bool $sticked
130+
* @param bool $stickied
131131
* @param string|null $incident_date
132132
* @param string|null $template
133133
* @param array|null $template_vars
134134
*
135135
* @return void
136136
*/
137-
public function __construct(Incident $incident, $name, $status, $message, $visible, $component_id, $component_status, $notify, $sticked, $incident_date, $template, array $template_vars = null)
137+
public function __construct(Incident $incident, $name, $status, $message, $visible, $component_id, $component_status, $notify, $stickied, $incident_date, $template, array $template_vars = null)
138138
{
139139
$this->incident = $incident;
140140
$this->name = $name;
@@ -144,7 +144,7 @@ public function __construct(Incident $incident, $name, $status, $message, $visib
144144
$this->component_id = $component_id;
145145
$this->component_status = $component_status;
146146
$this->notify = $notify;
147-
$this->sticked = $sticked;
147+
$this->stickied = $stickied;
148148
$this->incident_date = $incident_date;
149149
$this->template = $template;
150150
$this->template_vars = $template_vars;

app/Bus/Handlers/Commands/Incident/ReportIncidentCommandHandler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function handle(ReportIncidentCommand $command)
6868
'name' => $command->name,
6969
'status' => $command->status,
7070
'visible' => $command->visible,
71-
'sticked' => $command->sticked,
71+
'stickied' => $command->stickied,
7272
];
7373

7474
if ($command->template) {

app/Bus/Handlers/Commands/Incident/ReportMaintenanceCommandHandler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function handle(ReportMaintenanceCommand $command)
5454
'scheduled_at' => $scheduledAt,
5555
'status' => 0,
5656
'visible' => 1,
57-
'sticked' => false,
57+
'stickied' => false,
5858
]);
5959

6060
$maintenanceEvent->notify = (bool) $command->notify;

app/Bus/Handlers/Commands/Incident/UpdateIncidentCommandHandler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ protected function filter(UpdateIncidentCommand $command)
107107
'status' => $command->status,
108108
'message' => $command->message,
109109
'visible' => $command->visible,
110-
'sticked' => $command->sticked,
110+
'stickied' => $command->stickied,
111111
'component_id' => $command->component_id,
112112
'component_status' => $command->component_status,
113113
'notify' => $command->notify,

app/Composers/Modules/StickedComposer.php

-41
This file was deleted.

app/Console/Commands/DemoSeederCommand.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ protected function seedIncidents()
205205
'component_id' => 0,
206206
'scheduled_at' => null,
207207
'visible' => 1,
208-
'sticked' => false,
208+
'stickied' => false,
209209
],
210210
[
211211
'name' => 'Awesome',
@@ -214,7 +214,7 @@ protected function seedIncidents()
214214
'component_id' => 0,
215215
'scheduled_at' => null,
216216
'visible' => 1,
217-
'sticked' => false,
217+
'stickied' => false,
218218
],
219219
[
220220
'name' => 'Monitoring the fix',
@@ -223,7 +223,7 @@ protected function seedIncidents()
223223
'component_id' => 0,
224224
'scheduled_at' => null,
225225
'visible' => 1,
226-
'sticked' => false,
226+
'stickied' => false,
227227
],
228228
[
229229
'name' => 'Update',
@@ -232,7 +232,7 @@ protected function seedIncidents()
232232
'component_id' => 0,
233233
'scheduled_at' => null,
234234
'visible' => 1,
235-
'sticked' => false,
235+
'stickied' => false,
236236
],
237237
[
238238
'name' => 'Test Incident',
@@ -241,7 +241,7 @@ protected function seedIncidents()
241241
'component_id' => 0,
242242
'scheduled_at' => null,
243243
'visible' => 1,
244-
'sticked' => false,
244+
'stickied' => false,
245245
],
246246
[
247247
'name' => 'Investigating the API',
@@ -250,16 +250,16 @@ protected function seedIncidents()
250250
'component_id' => 1,
251251
'scheduled_at' => null,
252252
'visible' => 1,
253-
'sticked' => false,
253+
'stickied' => false,
254254
],
255255
[
256-
'name' => 'Sticked to the top',
256+
'name' => 'Stickied to the top',
257257
'message' => 'Will be forever hanged here.',
258258
'status' => 1,
259259
'component_id' => 1,
260260
'scheduled_at' => null,
261261
'visible' => 1,
262-
'sticked' => true,
262+
'stickied' => true,
263263
],
264264
];
265265

app/Foundation/Providers/ComposerServiceProvider.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
use CachetHQ\Cachet\Composers\Modules\MetricsComposer as MetricsModuleComposer;
2020
use CachetHQ\Cachet\Composers\Modules\ScheduledComposer as ScheduledModuleComposer;
2121
use CachetHQ\Cachet\Composers\Modules\StatusComposer as StatusModuleComposer;
22-
use CachetHQ\Cachet\Composers\Modules\StickedComposer as StickedModuleComposer;
22+
use CachetHQ\Cachet\Composers\Modules\StickiedComposer as StickiedModuleComposer;
2323
use CachetHQ\Cachet\Composers\Modules\TimelineComposer as TimelineModuleComposer;
2424
use CachetHQ\Cachet\Composers\ThemeComposer;
2525
use CachetHQ\Cachet\Composers\TimezoneLocaleComposer;
@@ -44,7 +44,7 @@ public function boot(Factory $factory)
4444
$factory->composer('*', ModuleComposer::class);
4545
$factory->composer('partials.modules.components', ComponentsModuleComposer::class);
4646
$factory->composer('partials.modules.metrics', MetricsModuleComposer::class);
47-
$factory->composer('partials.modules.sticked', StickedModuleComposer::class);
47+
$factory->composer('partials.modules.stickied', StickiedModuleComposer::class);
4848
$factory->composer('partials.modules.scheduled', ScheduledModuleComposer::class);
4949
$factory->composer('partials.modules.status', StatusModuleComposer::class);
5050
$factory->composer('partials.modules.timeline', TimelineModuleComposer::class);

app/Foundation/Providers/ModuleServiceProvider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ModuleServiceProvider extends ServiceProvider
2828
['group' => 'status', 'partial' => 'partials.modules.status'],
2929
['group' => 'components', 'partial' => 'partials.modules.components'],
3030
['group' => 'metrics', 'partial' => 'partials.modules.metrics'],
31-
['group' => 'sticked', 'partial' => 'partials.modules.sticked'],
31+
['group' => 'stickied', 'partial' => 'partials.modules.stickied'],
3232
['group' => 'scheduled', 'partial' => 'partials.modules.scheduled'],
3333
['group' => 'timeline', 'partial' => 'partials.modules.timeline'],
3434
],

app/Http/Controllers/Api/IncidentController.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function postIncidents()
7575
Binput::get('component_id'),
7676
Binput::get('component_status'),
7777
Binput::get('notify', true),
78-
Binput::get('sticked', false),
78+
Binput::get('stickied', false),
7979
Binput::get('created_at'),
8080
Binput::get('template'),
8181
Binput::get('vars')
@@ -106,7 +106,7 @@ public function putIncident(Incident $incident)
106106
Binput::get('component_id'),
107107
Binput::get('component_status'),
108108
Binput::get('notify', true),
109-
Binput::get('sticked', false),
109+
Binput::get('stickied', false),
110110
Binput::get('created_at'),
111111
Binput::get('template'),
112112
Binput::get('vars')

app/Http/Controllers/Dashboard/IncidentController.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function createIncidentAction()
115115
Binput::get('component_id'),
116116
Binput::get('component_status'),
117117
Binput::get('notify', false),
118-
Binput::get('sticked', false),
118+
Binput::get('stickied', false),
119119
Binput::get('created_at'),
120120
null,
121121
null
@@ -241,7 +241,7 @@ public function editIncidentAction(Incident $incident)
241241
Binput::get('component_id'),
242242
Binput::get('component_status'),
243243
Binput::get('notify', true),
244-
Binput::get('sticked', false),
244+
Binput::get('stickied', false),
245245
Binput::get('created_at'),
246246
null,
247247
null

app/Models/Incident.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Incident extends Model implements HasPresenter
3232
*/
3333
protected $casts = [
3434
'visible' => 'int',
35-
'sticked' => 'int',
35+
'stickied' => 'int',
3636
'scheduled_at' => 'date',
3737
'deleted_at' => 'date',
3838
];
@@ -47,7 +47,7 @@ class Incident extends Model implements HasPresenter
4747
'name',
4848
'status',
4949
'visible',
50-
'sticked',
50+
'stickied',
5151
'message',
5252
'scheduled_at',
5353
'created_at',
@@ -64,7 +64,7 @@ class Incident extends Model implements HasPresenter
6464
'name' => 'required',
6565
'status' => 'required|int',
6666
'visible' => 'required|bool',
67-
'sticked' => 'bool',
67+
'stickied' => 'bool',
6868
'message' => 'required',
6969
];
7070

@@ -79,7 +79,7 @@ class Incident extends Model implements HasPresenter
7979
'name',
8080
'status',
8181
'visible',
82-
'sticked',
82+
'stickied',
8383
];
8484

8585
/**
@@ -92,7 +92,7 @@ class Incident extends Model implements HasPresenter
9292
'name',
9393
'status',
9494
'visible',
95-
'sticked',
95+
'stickied',
9696
'message',
9797
];
9898

@@ -119,15 +119,15 @@ public function scopeVisible(Builder $query)
119119
}
120120

121121
/**
122-
* Finds all sticked incidents.
122+
* Finds all stickied incidents.
123123
*
124124
* @param \Illuminate\Database\Eloquent\Builder $query
125125
*
126126
* @return \Illuminate\Database\Eloquent\Builder
127127
*/
128-
public function scopeSticked(Builder $query)
128+
public function scopeStickied(Builder $query)
129129
{
130-
return $query->where('sticked', true);
130+
return $query->where('stickied', true);
131131
}
132132

133133
/**

database/factories/ModelFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
'message' => $faker->paragraph(),
4545
'status' => random_int(1, 4),
4646
'visible' => 1,
47-
'sticked' => false,
47+
'stickied' => false,
4848
];
4949
});
5050

database/migrations/2016_08_30_143400_AlterTableIncidentsAddStickedColumn.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
use Illuminate\Database\Schema\Blueprint;
1414
use Illuminate\Support\Facades\Schema;
1515

16-
class AlterTableIncidentsAddStickedColumn extends Migration
16+
class AlterTableIncidentsAddStickiedColumn extends Migration
1717
{
1818
/**
1919
* Run the migrations.
2020
*/
2121
public function up()
2222
{
2323
Schema::table('incidents', function (Blueprint $table) {
24-
$table->boolean('sticked')->after('visible')->default(false);
24+
$table->boolean('stickied')->after('visible')->default(false);
2525

26-
$table->index('sticked');
26+
$table->index('stickied');
2727
});
2828
}
2929

@@ -33,7 +33,7 @@ public function up()
3333
public function down()
3434
{
3535
Schema::table('incidents', function (Blueprint $table) {
36-
$table->dropColumn('sticked');
36+
$table->dropColumn('stickied');
3737
});
3838
}
3939
}

resources/lang/en/cachet.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
'incidents' => [
2929
'none' => 'No incidents reported',
3030
'past' => 'Past Incidents',
31-
'sticked' => 'Sticked Incidents',
31+
'stickied' => 'Stickied Incidents',
3232
'previous_week' => 'Previous Week',
3333
'next_week' => 'Next Week',
3434
'scheduled' => 'Scheduled Maintenance',

0 commit comments

Comments
 (0)