mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Optimize some code.
This commit is contained in:
parent
d78d2f25eb
commit
9f80d729a2
@ -329,8 +329,8 @@ class TransactionUpdateRequest extends FormRequest
|
||||
foreach ($this->dateFields as $fieldName) {
|
||||
Log::debug(sprintf('Now at date field %s', $fieldName));
|
||||
if (array_key_exists($fieldName, $transaction)) {
|
||||
$current[$fieldName] = $this->dateFromValue((string) $transaction[$fieldName]);
|
||||
Log::debug(sprintf('New value: "%s"', (string) $transaction[$fieldName]));
|
||||
$current[$fieldName] = $this->dateFromValue((string) $transaction[$fieldName]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,19 +48,7 @@ use Storage;
|
||||
*/
|
||||
class AccountRepository implements AccountRepositoryInterface
|
||||
{
|
||||
|
||||
/** @var User */
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
if ('testing' === config('app.env')) {
|
||||
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
|
||||
}
|
||||
}
|
||||
private User $user;
|
||||
|
||||
/**
|
||||
* @param array $types
|
||||
|
@ -53,16 +53,6 @@ class BillRepository implements BillRepositoryInterface
|
||||
|
||||
private User $user;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
if ('testing' === config('app.env')) {
|
||||
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Bill $bill
|
||||
*
|
||||
|
@ -43,18 +43,7 @@ use Storage;
|
||||
*/
|
||||
class TagRepository implements TagRepositoryInterface
|
||||
{
|
||||
/** @var User */
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
if ('testing' === config('app.env')) {
|
||||
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
|
||||
}
|
||||
}
|
||||
private User $user;
|
||||
|
||||
/**
|
||||
* @return int
|
||||
|
@ -185,9 +185,6 @@ class BetterQuerySearch implements SearchInterface
|
||||
Log::error(sprintf('Cannot handle node %s', $class));
|
||||
throw new FireflyException(sprintf('Firefly III search cant handle "%s"-nodes', $class));
|
||||
case Word::class:
|
||||
Log::debug(sprintf('Now handle %s', $class));
|
||||
$this->words[] = $searchNode->getValue();
|
||||
break;
|
||||
case Phrase::class:
|
||||
Log::debug(sprintf('Now handle %s', $class));
|
||||
$this->words[] = $searchNode->getValue();
|
||||
|
Loading…
Reference in New Issue
Block a user