Skip to content

Commit b09fd3f

Browse files
committed
app: added code styling tests for migration scripts and fixed styling to pass
1 parent 3f2c427 commit b09fd3f

10 files changed

Lines changed: 477 additions & 456 deletions

app/composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
],
5252
"all": [
5353
"@composer cs",
54+
"@composer cs-migrations",
5455
"@composer cs-tests",
5556
"@composer tests"
5657
],
@@ -60,6 +61,7 @@
6061
],
6162
"cs": "\"vendor/bin/phpcs\" --standard=phpcs.xml",
6263
"cs-fix": "\"vendor/bin/phpcbf\" --standard=phpcs.xml",
64+
"cs-migrations": "\"vendor/bin/phpcs\" --standard=phpcs.migrations.xml",
6365
"cs-tests": "\"vendor/bin/phpcs\" --standard=phpcs.tests.xml",
6466
"cs-tests-fix": "\"vendor/bin/phpcbf\" --standard=phpcs.tests.xml",
6567
"tests": "\"vendor/bin/phpunit\""

app/database/migrations/2016_10_30_053317_create_initial_database_schema.php

Lines changed: 171 additions & 172 deletions
Large diffs are not rendered by default.

app/database/migrations/2017_07_23_122800_add_user_to_location.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@
88
This migration adds a new creator_user_id field to the location table.
99
1010
This new field should help us keep track of who adds locations.
11-
Knowing who added what locations can be helpful if some users start adding
12-
bad information such as locations that don't exist or give incorrect
11+
Knowing who added what locations can be helpful if some users start adding
12+
bad information such as locations that don't exist or give incorrect
1313
information on them.
1414
*/
1515
class AddUserToLocation extends Migration
1616
{
1717
public function up()
1818
{
1919
Schema::table('location', function (Blueprint $table) {
20-
$table->integer('creator_user_id')->unsigned()->nullable();
21-
$table->foreign('creator_user_id')->references('id')->on('user');
20+
$table->integer('creator_user_id')->unsigned()->nullable();
21+
$table->foreign('creator_user_id')->references('id')->on('user');
2222
});
2323
}
2424

2525
public function down()
2626
{
2727
Schema::table('location', function (Blueprint $table) {
28-
$table->dropForeign(['creator_user_id']);
28+
$table->dropForeign(['creator_user_id']);
2929
$table->dropColumn('creator_user_id');
3030
});
3131
}

app/database/migrations/2017_11_25_122800_add_icon_to_location_tag.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99
*/
1010
class AddIconToLocationTag extends Migration
1111
{
12-
public function up()
13-
{
14-
Schema::table('location_tag', function (Blueprint $table) {
15-
$table->string('icon_selector', 255);
16-
});
17-
}
12+
public function up()
13+
{
14+
Schema::table('location_tag', function (Blueprint $table) {
15+
$table->string('icon_selector', 255);
16+
});
17+
}
1818

19-
public function down()
20-
{
21-
Schema::table('location_tag', function (Blueprint $table) {
22-
$table->dropColumn('icon_selector');
23-
});
24-
}
19+
public function down()
20+
{
21+
Schema::table('location_tag', function (Blueprint $table) {
22+
$table->dropColumn('icon_selector');
23+
});
24+
}
2525
}

0 commit comments

Comments
 (0)