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) {
|
foreach ($this->dateFields as $fieldName) {
|
||||||
Log::debug(sprintf('Now at date field %s', $fieldName));
|
Log::debug(sprintf('Now at date field %s', $fieldName));
|
||||||
if (array_key_exists($fieldName, $transaction)) {
|
if (array_key_exists($fieldName, $transaction)) {
|
||||||
$current[$fieldName] = $this->dateFromValue((string) $transaction[$fieldName]);
|
|
||||||
Log::debug(sprintf('New value: "%s"', (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
|
class AccountRepository implements AccountRepositoryInterface
|
||||||
{
|
{
|
||||||
|
private User $user;
|
||||||
/** @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)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $types
|
* @param array $types
|
||||||
|
@ -53,16 +53,6 @@ class BillRepository implements BillRepositoryInterface
|
|||||||
|
|
||||||
private User $user;
|
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
|
* @param Bill $bill
|
||||||
*
|
*
|
||||||
|
@ -43,18 +43,7 @@ use Storage;
|
|||||||
*/
|
*/
|
||||||
class TagRepository implements TagRepositoryInterface
|
class TagRepository implements TagRepositoryInterface
|
||||||
{
|
{
|
||||||
/** @var User */
|
private User $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)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
|
@ -185,9 +185,6 @@ class BetterQuerySearch implements SearchInterface
|
|||||||
Log::error(sprintf('Cannot handle node %s', $class));
|
Log::error(sprintf('Cannot handle node %s', $class));
|
||||||
throw new FireflyException(sprintf('Firefly III search cant handle "%s"-nodes', $class));
|
throw new FireflyException(sprintf('Firefly III search cant handle "%s"-nodes', $class));
|
||||||
case Word::class:
|
case Word::class:
|
||||||
Log::debug(sprintf('Now handle %s', $class));
|
|
||||||
$this->words[] = $searchNode->getValue();
|
|
||||||
break;
|
|
||||||
case Phrase::class:
|
case Phrase::class:
|
||||||
Log::debug(sprintf('Now handle %s', $class));
|
Log::debug(sprintf('Now handle %s', $class));
|
||||||
$this->words[] = $searchNode->getValue();
|
$this->words[] = $searchNode->getValue();
|
||||||
|
Loading…
Reference in New Issue
Block a user