Add newlines and strict types check.

This commit is contained in:
James Cole 2020-12-22 05:35:06 +01:00
parent c7cf55b831
commit b263120c8f
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D
48 changed files with 79 additions and 44 deletions

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* DateController.php
* Copyright (c) 2020 james@firefly-iii.org
@ -127,4 +128,4 @@ class DateController extends Controller
return response()->json($tempData);
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* DateController.php
* Copyright (c) 2020 james@firefly-iii.org
@ -127,4 +128,4 @@ class DateController extends Controller
return response()->json($tempData);
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* CreateController.php
* Copyright (c) 2020 james@firefly-iii.org
@ -76,4 +77,4 @@ class CreateController extends Controller
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* DeleteController.php
* Copyright (c) 2020 james@firefly-iii.org
@ -71,4 +72,4 @@ class DeleteController extends Controller
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* EditController.php
* Copyright (c) 2020 james@firefly-iii.org
@ -77,4 +78,4 @@ class EditController extends Controller
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* IndexController.php
* Copyright (c) 2020 james@firefly-iii.org
@ -84,4 +85,4 @@ class IndexController extends Controller
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* CreateRequest.php
* Copyright (c) 2020 james@firefly-iii.org
@ -80,4 +81,4 @@ class CreateRequest extends FormRequest
'url' => ['required', 'url', 'starts_with:https://', 'uniqueWebhook'],
];
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* UpdateRequest.php
* Copyright (c) 2020 james@firefly-iii.org
@ -81,4 +82,4 @@ class UpdateRequest extends FormRequest
'url' => ['required', 'url', 'starts_with:https://', sprintf('uniqueExistingWebhook:%d', $webhook->id)],
];
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* AppendBudgetLimitPeriods.php
* Copyright (c) 2020 james@firefly-iii.org

View File

@ -45,4 +45,4 @@ class DestroyedTransactionLink extends Event
{
$this->link = $link;
}
}
}

View File

@ -47,4 +47,4 @@ class DetectedNewIPAddress extends Event
$this->ipAddress = $ipAddress;
$this->user = $user;
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* RequestedSendWebhookMessages.php
* Copyright (c) 2020 james@firefly-iii.org
@ -27,4 +28,4 @@ use Illuminate\Queue\SerializesModels;
class RequestedSendWebhookMessages extends Event
{
use SerializesModels;
}
}

View File

@ -44,4 +44,4 @@ class StoredTransactionLink extends Event
{
$this->link = $link;
}
}
}

View File

@ -44,4 +44,4 @@ class UpdatedTransactionLink extends Event
{
$this->link = $link;
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* MessageGeneratorInterface.php
* Copyright (c) 2020 james@firefly-iii.org
@ -54,4 +55,4 @@ interface MessageGeneratorInterface
* @param int $trigger
*/
public function setTrigger(int $trigger): void;
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* WebhookMessageGenerator.php
* Copyright (c) 2020 james@firefly-iii.org
@ -231,4 +232,4 @@ class StandardMessageGenerator implements MessageGeneratorInterface
{
return $this->version;
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* DestroyedGroupEventHandler.php
* Copyright (c) 2020 james@firefly-iii.org
@ -51,4 +52,4 @@ class DestroyedGroupEventHandler
event(new RequestedSendWebhookMessages);
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* WebhookEventHandler.php
* Copyright (c) 2020 james@firefly-iii.org
@ -51,4 +52,4 @@ class WebhookEventHandler
SendWebhookMessage::dispatch($message)->afterResponse();
}
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* Sha3SignatureGenerator.php
* Copyright (c) 2020 james@firefly-iii.org
@ -67,4 +68,4 @@ class Sha3SignatureGenerator implements SignatureGeneratorInterface
// Schemes start with v, followed by an integer. Currently, the only valid live signature scheme is v1.
return sprintf('t=%s,v%d=%s', $timestamp, $this->getVersion(), $signature);
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* SignatureGeneratorInterface.php
* Copyright (c) 2020 james@firefly-iii.org
@ -41,4 +42,4 @@ interface SignatureGeneratorInterface
* @return string
*/
public function generate(WebhookMessage $message): string;
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace FireflyIII\Jobs;

View File

@ -65,4 +65,4 @@ class NewIPAddressWarningMail extends Mailable
return $this->view('emails.new-ip-html')->text('emails.new-ip-text')
->subject((string) trans('email.login_from_new_ip'));
}
}
}

View File

@ -87,4 +87,4 @@ class Note extends Model
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* Webhook.php
* Copyright (c) 2020 james@firefly-iii.org
@ -131,4 +132,4 @@ class Webhook extends Model
{
return $this->hasMany(WebhookMessage::class);
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* WebhookAttempt.php
* Copyright (c) 2020 james@firefly-iii.org
@ -38,4 +39,4 @@ class WebhookAttempt extends Model
{
return $this->belongsTo(WebhookMessage::class);
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* WebhookMessage.php
* Copyright (c) 2020 james@firefly-iii.org
@ -88,4 +89,4 @@ class WebhookMessage extends Model
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* WebhookRepository.php
* Copyright (c) 2020 james@firefly-iii.org
@ -88,4 +89,4 @@ class WebhookRepository implements WebhookRepositoryInterface
{
$webhook->delete();
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* WebhookRepositoryInterface.php
* Copyright (c) 2020 james@firefly-iii.org
@ -64,4 +65,4 @@ interface WebhookRepositoryInterface
*/
public function destroy(Webhook $webhook): void;
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* IsDuplicateTransaction.php
* Copyright (c) 2020 james@firefly-iii.org
@ -47,4 +48,4 @@ class IsDuplicateTransaction implements Rule
{
return $this->value;
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* StandardWebhookSender.php
* Copyright (c) 2020 james@firefly-iii.org
@ -116,4 +117,4 @@ class StandardWebhookSender implements WebhookSenderInterface
//$this->sendMessageV0($this->message);
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* WebhookSenderInterface.php
* Copyright (c) 2020 james@firefly-iii.org
@ -42,4 +43,4 @@ interface WebhookSenderInterface
*
*/
public function send(): void;
}
}

View File

@ -239,4 +239,4 @@ class FrontpageChartGenerator
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* CategoryReportGenerator.php
* Copyright (c) 2020 james@firefly-iii.org
@ -205,4 +206,4 @@ class CategoryReportGenerator
$this->opsRepository->setUser($user);
}
}
}

View File

@ -37,4 +37,4 @@ trait ChecksLogin
// Only allow logged in users
return auth()->check();
}
}
}

View File

@ -50,4 +50,4 @@ trait GetRuleConfiguration
}
return $return;
}
}
}

View File

@ -832,4 +832,4 @@ class OperatorQuerySearch implements SearchInterface
{
return $this->accountRepository->getCashAccount();
}
}
}

View File

@ -65,4 +65,4 @@ interface RuleEngineInterface
*/
public function find(): Collection;
}
}

View File

@ -424,4 +424,4 @@ class SearchRuleEngine implements RuleEngineInterface
return $all;
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* WebhookTransformer.php
* Copyright (c) 2020 james@firefly-iii.org
@ -71,4 +72,4 @@ class WebhookTransformer extends AbstractTransformer
{
return $this->enums[$value] ?? 'UNKNOWN_VALUE';
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
return [

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

View File

@ -11,4 +11,4 @@ et_EE
tlh_AA
lt_LT
fa_IR
si_LK
si_LK

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* CorrectOpeningBalanceCurrenciesTest.php
* Copyright (c) 2020 james@firefly-iii.org
@ -85,4 +86,4 @@ class CorrectOpeningBalanceCurrenciesTest extends TestCase
$journal->forceDelete();
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* FixAccountOrderTest.php
* Copyright (c) 2020 james@firefly-iii.org
@ -44,4 +45,4 @@ class FixAccountOrderTest extends TestCase
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* FixGroupAccountsTest.php
* Copyright (c) 2020 james@firefly-iii.org
@ -44,4 +45,4 @@ class FixGroupAccountsTest extends TestCase
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* FixLongDescriptionsTest.php
* Copyright (c) 2020 james@firefly-iii.org
@ -70,4 +71,4 @@ class FixLongDescriptionsTest extends TestCase
$group->save();
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* FixRecurringTransactionsTest.php
* Copyright (c) 2020 james@firefly-iii.org
@ -45,4 +46,4 @@ class FixRecurringTransactionsTest extends TestCase
))
->assertExitCode(0);
}
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/*
* FixTransactionTypesTest.php
* Copyright (c) 2020 james@firefly-iii.org
@ -40,4 +41,4 @@ class FixTransactionTypesTest extends TestCase
}
}
}