Code cleanup [skip ci]

This commit is contained in:
James Cole 2018-03-11 20:41:03 +01:00
parent eb63090387
commit c8f52a1c40
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
10 changed files with 92 additions and 117 deletions

View File

@ -118,17 +118,17 @@ $factory->define(
FireflyIII\Models\Bill::class,
function (Faker\Generator $faker) {
return [
'created_at' => new Carbon,
'updated_at' => new Carbon,
'user_id' => 1,
'name' => $faker->words(3, true),
'match' => $faker->words(3, true),
'amount_min' => '100.00',
'amount_max' => '100.00',
'date' => '2017-01-01',
'repeat_freq' => 'monthly',
'skip' => 0,
'automatch' => 1
'created_at' => new Carbon,
'updated_at' => new Carbon,
'user_id' => 1,
'name' => $faker->words(3, true),
'match' => $faker->words(3, true),
'amount_min' => '100.00',
'amount_max' => '100.00',
'date' => '2017-01-01',
'repeat_freq' => 'monthly',
'skip' => 0,
'automatch' => 1,
];
}
);

View File

@ -1,9 +1,7 @@
<?php
declare(strict_types=1);
/**
/*
* 2018_01_01_000001_create_oauth_auth_codes_table.php
* Copyright (c) 2018 thegrumpydictator@gmail.com
*
@ -23,39 +21,37 @@ declare(strict_types=1);
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
*/
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Class CreateOauthAuthCodesTable
*/
class CreateOauthAuthCodesTable extends Migration
{
/**
* Reverse the migrations.
*/
public function down()
{
Schema::drop('oauth_auth_codes');
}
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('oauth_auth_codes', function (Blueprint $table) {
Schema::create(
'oauth_auth_codes', function (Blueprint $table) {
$table->string('id', 100)->primary();
$table->integer('user_id');
$table->integer('client_id');
$table->text('scopes')->nullable();
$table->boolean('revoked');
$table->dateTime('expires_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('oauth_auth_codes');
}
);
}
}

View File

@ -1,9 +1,7 @@
<?php
declare(strict_types=1);
/**
/*
* 2018_01_01_000002_create_oauth_access_tokens_table.php
* Copyright (c) 2018 thegrumpydictator@gmail.com
*
@ -23,23 +21,30 @@ declare(strict_types=1);
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
*/
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Class CreateOauthAccessTokensTable
*/
class CreateOauthAccessTokensTable extends Migration
{
/**
* Reverse the migrations.
*/
public function down()
{
Schema::drop('oauth_access_tokens');
}
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('oauth_access_tokens', function (Blueprint $table) {
Schema::create(
'oauth_access_tokens', function (Blueprint $table) {
$table->string('id', 100)->primary();
$table->integer('user_id')->index()->nullable();
$table->integer('client_id');
@ -48,16 +53,7 @@ class CreateOauthAccessTokensTable extends Migration
$table->boolean('revoked');
$table->timestamps();
$table->dateTime('expires_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('oauth_access_tokens');
}
);
}
}

View File

@ -1,9 +1,7 @@
<?php
declare(strict_types=1);
/**
/*
* 2018_01_01_000003_create_oauth_refresh_tokens_table.php
* Copyright (c) 2018 thegrumpydictator@gmail.com
*
@ -23,37 +21,35 @@ declare(strict_types=1);
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
*/
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Class CreateOauthRefreshTokensTable
*/
class CreateOauthRefreshTokensTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('oauth_refresh_tokens', function (Blueprint $table) {
$table->string('id', 100)->primary();
$table->string('access_token_id', 100)->index();
$table->boolean('revoked');
$table->dateTime('expires_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('oauth_refresh_tokens');
}
/**
* Run the migrations.
*/
public function up()
{
Schema::create(
'oauth_refresh_tokens', function (Blueprint $table) {
$table->string('id', 100)->primary();
$table->string('access_token_id', 100)->index();
$table->boolean('revoked');
$table->dateTime('expires_at')->nullable();
}
);
}
}

View File

@ -1,9 +1,7 @@
<?php
declare(strict_types=1);
/**
/*
* 2018_01_01_000004_create_oauth_clients_table.php
* Copyright (c) 2018 thegrumpydictator@gmail.com
*
@ -23,23 +21,30 @@ declare(strict_types=1);
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
*/
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Class CreateOauthClientsTable
*/
class CreateOauthClientsTable extends Migration
{
/**
* Reverse the migrations.
*/
public function down()
{
Schema::drop('oauth_clients');
}
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('oauth_clients', function (Blueprint $table) {
Schema::create(
'oauth_clients', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->index()->nullable();
$table->string('name');
@ -49,16 +54,7 @@ class CreateOauthClientsTable extends Migration
$table->boolean('password_client');
$table->boolean('revoked');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('oauth_clients');
}
);
}
}

View File

@ -1,9 +1,7 @@
<?php
declare(strict_types=1);
/**
/*
* 2018_01_01_000005_create_oauth_personal_access_clients_table.php
* Copyright (c) 2018 thegrumpydictator@gmail.com
*
@ -23,36 +21,34 @@ declare(strict_types=1);
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
*/
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Class CreateOauthPersonalAccessClientsTable
*/
class CreateOauthPersonalAccessClientsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('oauth_personal_access_clients', function (Blueprint $table) {
$table->increments('id');
$table->integer('client_id')->index();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('oauth_personal_access_clients');
}
/**
* Run the migrations.
*/
public function up()
{
Schema::create(
'oauth_personal_access_clients', function (Blueprint $table) {
$table->increments('id');
$table->integer('client_id')->index();
$table->timestamps();
}
);
}
}

View File

@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
use FireflyIII\Models\Configuration;
use Illuminate\Database\Seeder;
@ -10,8 +10,6 @@ class ConfigSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{

View File

@ -65,6 +65,5 @@ class LinkTypeSeeder extends Seeder
Log::warning(sprintf('Could not create link type "%s". It might exist already.', $type['name']));
}
}
}
}

View File

@ -49,6 +49,5 @@ class PermissionSeeder extends Seeder
Log::warning(sprintf('Could not create role "%s". It might exist already.', $role['display_name']));
}
}
}
}

View File

@ -45,6 +45,5 @@ class TransactionTypeSeeder extends Seeder
Log::warning(sprintf('Could not create transaction type "%s". It might exist already.', $type));
}
}
}
}