Various code cleanup.

This commit is contained in:
James Cole
2021-05-24 08:57:02 +02:00
parent d60650cff2
commit ad54163518
21 changed files with 157 additions and 164 deletions

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Support\Http\Controllers;
use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
use FireflyIII\Models\Account;
use FireflyIII\Models\Category;
@@ -76,6 +77,7 @@ trait PeriodOverview
* @param Carbon $end
*
* @return array
* @throws FireflyException
*/
protected function getAccountPeriodOverview(Account $account, Carbon $start, Carbon $end): array
{
@@ -266,6 +268,7 @@ trait PeriodOverview
* @param Carbon $end
*
* @return array
* @throws FireflyException
*/
protected function getCategoryPeriodOverview(Category $category, Carbon $start, Carbon $end): array
{
@@ -343,6 +346,7 @@ trait PeriodOverview
* @param Carbon $end
*
* @return array
* @throws FireflyException
*/
protected function getNoBudgetPeriodOverview(Carbon $start, Carbon $end): array
{
@@ -395,7 +399,7 @@ trait PeriodOverview
* @param Carbon $theDate
*
* @return array
*
* @throws FireflyException
*/
protected function getNoCategoryPeriodOverview(Carbon $theDate): array
{
@@ -475,7 +479,7 @@ trait PeriodOverview
* @param Carbon $end
*
* @return array
* @throws \FireflyIII\Exceptions\FireflyException
* @throws FireflyException
*/
protected function getTagPeriodOverview(Tag $tag, Carbon $start, Carbon $end): array // period overview for tags.
{
@@ -549,7 +553,7 @@ trait PeriodOverview
* @param Carbon $end
*
* @return array
* @throws \FireflyIII\Exceptions\FireflyException
* @throws FireflyException
*/
protected function getTransactionPeriodOverview(string $transactionType, Carbon $start, Carbon $end): array
{

View File

@@ -59,7 +59,7 @@ trait UserNavigation
$uri = (string)session($identifier);
Log::debug(sprintf('The URI is %s', $uri));
if (false !== strpos($uri, 'jscript')) {
if (str_contains($uri, 'jscript')) {
$uri = $this->redirectUri;
Log::debug(sprintf('URI is now %s (uri contains jscript)', $uri));
}