mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 19:53:44 +00:00
Add newlines and strict types check.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -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
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -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'],
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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)],
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/*
|
||||
* AppendBudgetLimitPeriods.php
|
||||
* Copyright (c) 2020 james@firefly-iii.org
|
||||
|
@@ -45,4 +45,4 @@ class DestroyedTransactionLink extends Event
|
||||
{
|
||||
$this->link = $link;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -47,4 +47,4 @@ class DetectedNewIPAddress extends Event
|
||||
$this->ipAddress = $ipAddress;
|
||||
$this->user = $user;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
@@ -44,4 +44,4 @@ class StoredTransactionLink extends Event
|
||||
{
|
||||
$this->link = $link;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -44,4 +44,4 @@ class UpdatedTransactionLink extends Event
|
||||
{
|
||||
$this->link = $link;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Jobs;
|
||||
|
||||
|
@@ -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'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -87,4 +87,4 @@ class Note extends Model
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
@@ -239,4 +239,4 @@ class FrontpageChartGenerator
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -37,4 +37,4 @@ trait ChecksLogin
|
||||
// Only allow logged in users
|
||||
return auth()->check();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -50,4 +50,4 @@ trait GetRuleConfiguration
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -832,4 +832,4 @@ class OperatorQuerySearch implements SearchInterface
|
||||
{
|
||||
return $this->accountRepository->getCashAccount();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -65,4 +65,4 @@ interface RuleEngineInterface
|
||||
*/
|
||||
public function find(): Collection;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -424,4 +424,4 @@ class SearchRuleEngine implements RuleEngineInterface
|
||||
|
||||
return $all;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user