mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-11 07:55:51 -06:00
Various code cleanup [skip ci]
This commit is contained in:
parent
e1941daedd
commit
67fdd27499
@ -17,7 +17,6 @@ use Response;
|
||||
use Session;
|
||||
use URL;
|
||||
use View;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class TransactionController
|
||||
@ -291,7 +290,6 @@ class TransactionController extends Controller
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param JournalFormRequest $request
|
||||
* @param JournalRepositoryInterface $repository
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace FireflyIII\Repositories\Reminder;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
|
||||
|
@ -203,7 +203,7 @@ class FireflyValidator extends Validator
|
||||
$alwaysEncrypted = true;
|
||||
}
|
||||
|
||||
if(is_null(Auth::user())) {
|
||||
if (is_null(Auth::user())) {
|
||||
// user is not logged in.. weird.
|
||||
return true;
|
||||
} else {
|
||||
|
@ -7,6 +7,7 @@ use FireflyIII\Models\Component;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.ShortMethodName) // method names are mandated by laravel.
|
||||
* @SuppressWarnings("TooManyMethods") // I'm fine with this
|
||||
|
@ -134,7 +134,7 @@ class ChangesForV336 extends Migration
|
||||
// reinstate a long forgotten index:
|
||||
Schema::table(
|
||||
'budget_limits', function (Blueprint $table) {
|
||||
$table->unique(['budget_id', 'startdate'],'unique_limit');
|
||||
$table->unique(['budget_id', 'startdate'], 'unique_limit');
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -57,7 +57,8 @@ class ChangesForV3310 extends Migration
|
||||
);
|
||||
|
||||
|
||||
Schema::create('tag_transaction_journal',function (Blueprint $table) {
|
||||
Schema::create(
|
||||
'tag_transaction_journal', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('tag_id')->unsigned();
|
||||
$table->integer('transaction_journal_id')->unsigned();
|
||||
@ -69,7 +70,8 @@ class ChangesForV3310 extends Migration
|
||||
// add unique.
|
||||
$table->unique(['tag_id', 'transaction_journal_id'], 'tag_t_joined');
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,12 +1,22 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
/**
|
||||
* Class ChangesForV3310b
|
||||
*/
|
||||
class ChangesForV3310b extends Migration {
|
||||
class ChangesForV3310b extends Migration
|
||||
{
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
@ -19,14 +29,4 @@ class ChangesForV3310b extends Migration {
|
||||
DB::table('transaction_groups')->update(['relation' => 'balance']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -66,8 +66,6 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -191,7 +191,6 @@ class BillControllerTest extends TestCase
|
||||
Amount::shouldReceive('getCurrencyCode')->andReturn('XX');
|
||||
|
||||
|
||||
|
||||
$this->call('GET', '/bills/show/' . $bill->id);
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@ use FireflyIII\Models\Preference;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use Illuminate\Support\Collection;
|
||||
use League\FactoryMuffin\Facade as FactoryMuffin;
|
||||
|
||||
/**
|
||||
* Class PiggyBankControllerTest
|
||||
*/
|
||||
|
@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Collection;
|
||||
use League\FactoryMuffin\Facade as FactoryMuffin;
|
||||
|
||||
/**
|
||||
@ -38,7 +36,8 @@ class SearchControllerTest extends TestCase
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
public function testSearch() {
|
||||
public function testSearch()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
$this->be($user);
|
||||
$words = ['Something'];
|
||||
@ -50,7 +49,7 @@ class SearchControllerTest extends TestCase
|
||||
$repository->shouldReceive('searchBudgets')->with($words)->once()->andReturn([]);
|
||||
$repository->shouldReceive('searchTags')->with($words)->once()->andReturn([]);
|
||||
|
||||
$this->call('GET','/search?q=Something');
|
||||
$this->call('GET', '/search?q=Something');
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user