Add newlines [skip ci]

This commit is contained in:
James Cole 2017-07-07 08:09:42 +02:00
parent dd508dbc49
commit 71a41bc00d
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
58 changed files with 94 additions and 96 deletions

View File

@ -16,9 +16,7 @@ namespace FireflyIII\Console\Commands;
use FireflyIII\Import\Logging\CommandHandler;
use FireflyIII\Import\Routine\ImportRoutine;
use FireflyIII\Models\ImportJob;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Console\Command;
use Illuminate\Support\Collection;
use Illuminate\Support\MessageBag;
use Log;

View File

@ -105,7 +105,6 @@ class AttachmentController extends Controller
$quoted = sprintf('"%s"', addcslashes(basename($attachment->filename), '"\\'));
/** @var LaravelResponse $response */
$response = response($content, 200);
$response

View File

@ -246,7 +246,7 @@ class ImportController extends Controller
/** @var ImportRoutine $routine */
$routine = app(ImportRoutine::class);
$routine->setJob($job);
$result = $routine->run();
$result = $routine->run();
if ($result) {
return Response::json(['run' => 'ok']);
}

View File

@ -329,8 +329,8 @@ class PiggyBankController extends Controller
Session::flash(
'error', strval(
trans('firefly.cannot_remove_from_piggy', ['amount' => Amount::formatAnything($currency, $amount, false), 'name' => e($piggyBank->name)])
)
trans('firefly.cannot_remove_from_piggy', ['amount' => Amount::formatAnything($currency, $amount, false), 'name' => e($piggyBank->name)])
)
);
return redirect(route('piggy-banks.index'));

View File

@ -86,7 +86,7 @@ class TransactionController extends Controller
$first = $repository->first();
$start = $first->date ?? new Carbon;
$end = new Carbon;
$path = '/transactions/'.$what.'/all/';
$path = '/transactions/' . $what . '/all/';
}
// prep for "specific date" view.

View File

@ -34,13 +34,6 @@ interface ConfiguratorInterface
*/
public function configureJob(array $data): bool;
/**
* @param ImportJob $job
*
* @return void
*/
public function setJob(ImportJob $job);
/**
* Return the data required for the next step in the job configuration.
*
@ -62,4 +55,11 @@ interface ConfiguratorInterface
*/
public function isJobConfigured(): bool;
/**
* @param ImportJob $job
*
* @return void
*/
public function setJob(ImportJob $job);
}

View File

@ -30,33 +30,17 @@ class ImportCategory
private $repository;
/** @var User */
private $user;
/**
* @param array $id
*/
public function setId(array $id)
{
$this->id = $id;
}
/**
* ImportCategory constructor.
*/
public function __construct()
{
$this->category = new Category();
$this->category = new Category();
$this->repository = app(CategoryRepositoryInterface::class);
Log::debug('Created ImportCategory.');
}
/**
* @param array $name
*/
public function setName(array $name)
{
$this->name = $name;
}
/**
* @return Category
*/
@ -68,6 +52,23 @@ class ImportCategory
return $this->category;
}
/**
* @param array $id
*/
public function setId(array $id)
{
$this->id = $id;
}
/**
* @param array $name
*/
public function setName(array $name)
{
$this->name = $name;
}
/**
* @param User $user
*/
@ -100,7 +101,7 @@ class ImportCategory
if (count($this->name) === 3) {
/** @var Collection $categories */
$categories = $this->repository->getCategories();
$name = $this->name['value'];
$name = $this->name['value'];
Log::debug(sprintf('Finding category with name %s', $name));
$filtered = $categories->filter(
function (Category $category) use ($name) {

View File

@ -53,7 +53,7 @@ class ImportCurrency
}
Log::debug('In createCurrency()');
// check if any of them is mapped:
$mapped = $this->findMappedObject();
$mapped = $this->findMappedObject();
if (!is_null($mapped->id)) {

View File

@ -44,15 +44,6 @@ class ImportRoutine
$this->errors = new Collection;
}
/**
* @param ImportJob $job
*/
public function setJob(ImportJob $job)
{
$this->job = $job;
}
/**
*
*/
@ -90,6 +81,14 @@ class ImportRoutine
return true;
}
/**
* @param ImportJob $job
*/
public function setJob(ImportJob $job)
{
$this->job = $job;
}
/**
* @return Collection
*/

View File

@ -22,8 +22,8 @@ class RegisteredUser extends Mailable
*/
public function __construct(string $address, string $ipAddress)
{
$this->address = $address;
$this->ipAddress = $ipAddress;
$this->address = $address;
$this->ipAddress = $ipAddress;
}
/**

View File

@ -86,7 +86,7 @@ class ImportJob extends Model
*/
public function addStepsDone(int $count)
{
$status = $this->extended_status;
$status = $this->extended_status;
$status['done'] += $count;
$this->extended_status = $status;
$this->save();

View File

@ -133,9 +133,10 @@ class Tag extends Model
*/
public function getTagAttribute($value)
{
if(is_null($value)) {
if (is_null($value)) {
return null;
}
return Crypt::decrypt($value);
}

View File

@ -53,7 +53,7 @@ class Search implements SearchInterface
public function __construct()
{
$this->modifiers = new Collection;
$this->validModifiers = (array) config('firefly.search_modifiers');
$this->validModifiers = (array)config('firefly.search_modifiers');
}
/**

View File

@ -13,7 +13,7 @@ declare(strict_types=1);
namespace FireflyIII\Support;
use \Amount as GlobalAmount;
use Amount as GlobalAmount;
use Carbon\Carbon;
use Crypt;
use DB;