mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 06:01:21 +00:00
Remove various logging.
This commit is contained in:
@@ -55,7 +55,7 @@ class FiscalHelper implements FiscalHelperInterface
|
|||||||
*/
|
*/
|
||||||
public function endOfFiscalYear(Carbon $date): Carbon
|
public function endOfFiscalYear(Carbon $date): Carbon
|
||||||
{
|
{
|
||||||
Log::debug(sprintf('Now in endOfFiscalYear(%s).', $date->format('Y-m-d')));
|
// Log::debug(sprintf('Now in endOfFiscalYear(%s).', $date->format('Y-m-d')));
|
||||||
$endDate = $this->startOfFiscalYear($date);
|
$endDate = $this->startOfFiscalYear($date);
|
||||||
if (true === $this->useCustomFiscalYear) {
|
if (true === $this->useCustomFiscalYear) {
|
||||||
// add 1 year and sub 1 day
|
// add 1 year and sub 1 day
|
||||||
@@ -65,7 +65,7 @@ class FiscalHelper implements FiscalHelperInterface
|
|||||||
if (false === $this->useCustomFiscalYear) {
|
if (false === $this->useCustomFiscalYear) {
|
||||||
$endDate->endOfYear();
|
$endDate->endOfYear();
|
||||||
}
|
}
|
||||||
Log::debug(sprintf('Result of endOfFiscalYear(%s) = %s', $date->format('Y-m-d'), $endDate->format('Y-m-d')));
|
// Log::debug(sprintf('Result of endOfFiscalYear(%s) = %s', $date->format('Y-m-d'), $endDate->format('Y-m-d')));
|
||||||
|
|
||||||
return $endDate;
|
return $endDate;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,13 +87,13 @@ class Authenticate
|
|||||||
*/
|
*/
|
||||||
protected function authenticate($request, array $guards)
|
protected function authenticate($request, array $guards)
|
||||||
{
|
{
|
||||||
Log::debug(sprintf('Now in %s', __METHOD__));
|
// Log::debug(sprintf('Now in %s', __METHOD__));
|
||||||
if (0 === count($guards)) {
|
if (0 === count($guards)) {
|
||||||
Log::debug('No guards present.');
|
// Log::debug('No guards present.');
|
||||||
// go for default guard:
|
// go for default guard:
|
||||||
/** @noinspection PhpUndefinedMethodInspection */
|
/** @noinspection PhpUndefinedMethodInspection */
|
||||||
if ($this->auth->check()) {
|
if ($this->auth->check()) {
|
||||||
Log::debug('Default guard says user is authenticated.');
|
// Log::debug('Default guard says user is authenticated.');
|
||||||
// do an extra check on user object.
|
// do an extra check on user object.
|
||||||
/** @noinspection PhpUndefinedMethodInspection */
|
/** @noinspection PhpUndefinedMethodInspection */
|
||||||
/** @var User $user */
|
/** @var User $user */
|
||||||
@@ -102,7 +102,7 @@ class Authenticate
|
|||||||
Log::warning('User is null, throw exception?');
|
Log::warning('User is null, throw exception?');
|
||||||
}
|
}
|
||||||
if (null !== $user) {
|
if (null !== $user) {
|
||||||
Log::debug(get_class($user));
|
// Log::debug(get_class($user));
|
||||||
if (1 === (int)$user->blocked) {
|
if (1 === (int)$user->blocked) {
|
||||||
$message = (string)trans('firefly.block_account_logout');
|
$message = (string)trans('firefly.block_account_logout');
|
||||||
if ('email_changed' === $user->blocked_code) {
|
if ('email_changed' === $user->blocked_code) {
|
||||||
@@ -121,12 +121,12 @@ class Authenticate
|
|||||||
Log::debug('Guard array is not empty.');
|
Log::debug('Guard array is not empty.');
|
||||||
|
|
||||||
foreach ($guards as $guard) {
|
foreach ($guards as $guard) {
|
||||||
Log::debug(sprintf('Now in guard loop, guard is "%s"', $guard));
|
// Log::debug(sprintf('Now in guard loop, guard is "%s"', $guard));
|
||||||
if('api' !== $guard) {
|
if('api' !== $guard) {
|
||||||
$this->auth->guard($guard)->authenticate();
|
$this->auth->guard($guard)->authenticate();
|
||||||
}
|
}
|
||||||
$result = $this->auth->guard($guard)->check();
|
$result = $this->auth->guard($guard)->check();
|
||||||
Log::debug(sprintf('Result is %s', var_export($result, true)));
|
// Log::debug(sprintf('Result is %s', var_export($result, true)));
|
||||||
if ($result) {
|
if ($result) {
|
||||||
// According to PHPstan the method returns void, but we'll see.
|
// According to PHPstan the method returns void, but we'll see.
|
||||||
return $this->auth->shouldUse($guard); // @phpstan-ignore-line
|
return $this->auth->shouldUse($guard); // @phpstan-ignore-line
|
||||||
|
|||||||
@@ -354,7 +354,7 @@ class Steam
|
|||||||
$number = sprintf('%.24f', $number);
|
$number = sprintf('%.24f', $number);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::debug(sprintf('Trying bcround("%s",%d)', $number, $precision));
|
// Log::debug(sprintf('Trying bcround("%s",%d)', $number, $precision));
|
||||||
if (str_contains($number, '.')) {
|
if (str_contains($number, '.')) {
|
||||||
if ($number[0] !== '-') {
|
if ($number[0] !== '-') {
|
||||||
return bcadd($number, '0.'.str_repeat('0', $precision).'5', $precision);
|
return bcadd($number, '0.'.str_repeat('0', $precision).'5', $precision);
|
||||||
|
|||||||
Reference in New Issue
Block a user