mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Code cleanup
This commit is contained in:
@@ -60,7 +60,7 @@ class BunqConfigurator implements ConfiguratorInterface
|
||||
*/
|
||||
public function configureJob(array $data): bool
|
||||
{
|
||||
if (is_null($this->job)) {
|
||||
if (null === $this->job) {
|
||||
throw new FireflyException('Cannot call configureJob() without a job.');
|
||||
}
|
||||
$stage = $this->getConfig()['stage'] ?? 'initial';
|
||||
@@ -94,7 +94,7 @@ class BunqConfigurator implements ConfiguratorInterface
|
||||
*/
|
||||
public function getNextData(): array
|
||||
{
|
||||
if (is_null($this->job)) {
|
||||
if (null === $this->job) {
|
||||
throw new FireflyException('Cannot call configureJob() without a job.');
|
||||
}
|
||||
$config = $this->getConfig();
|
||||
@@ -107,9 +107,8 @@ class BunqConfigurator implements ConfiguratorInterface
|
||||
/** @var HaveAccounts $class */
|
||||
$class = app(HaveAccounts::class);
|
||||
$class->setJob($this->job);
|
||||
$data = $class->getData();
|
||||
|
||||
return $data;
|
||||
return $class->getData();
|
||||
default:
|
||||
return [];
|
||||
}
|
||||
@@ -122,7 +121,7 @@ class BunqConfigurator implements ConfiguratorInterface
|
||||
*/
|
||||
public function getNextView(): string
|
||||
{
|
||||
if (is_null($this->job)) {
|
||||
if (null === $this->job) {
|
||||
throw new FireflyException('Cannot call configureJob() without a job.');
|
||||
}
|
||||
$stage = $this->getConfig()['stage'] ?? 'initial';
|
||||
@@ -153,7 +152,7 @@ class BunqConfigurator implements ConfiguratorInterface
|
||||
*/
|
||||
public function isJobConfigured(): bool
|
||||
{
|
||||
if (is_null($this->job)) {
|
||||
if (null === $this->job) {
|
||||
throw new FireflyException('Cannot call configureJob() without a job.');
|
||||
}
|
||||
$stage = $this->getConfig()['stage'] ?? 'initial';
|
||||
|
@@ -84,7 +84,7 @@ class FileConfigurator implements ConfiguratorInterface
|
||||
*/
|
||||
public function configureJob(array $data): bool
|
||||
{
|
||||
if (is_null($this->job)) {
|
||||
if (null === $this->job) {
|
||||
throw new FireflyException('Cannot call configureJob() without a job.');
|
||||
}
|
||||
/** @var ConfigurationInterface $object */
|
||||
@@ -105,7 +105,7 @@ class FileConfigurator implements ConfiguratorInterface
|
||||
*/
|
||||
public function getNextData(): array
|
||||
{
|
||||
if (is_null($this->job)) {
|
||||
if (null === $this->job) {
|
||||
throw new FireflyException('Cannot call getNextData() without a job.');
|
||||
}
|
||||
/** @var ConfigurationInterface $object */
|
||||
@@ -122,7 +122,7 @@ class FileConfigurator implements ConfiguratorInterface
|
||||
*/
|
||||
public function getNextView(): string
|
||||
{
|
||||
if (is_null($this->job)) {
|
||||
if (null === $this->job) {
|
||||
throw new FireflyException('Cannot call getNextView() without a job.');
|
||||
}
|
||||
$config = $this->getConfig();
|
||||
@@ -149,7 +149,7 @@ class FileConfigurator implements ConfiguratorInterface
|
||||
*/
|
||||
public function getWarningMessage(): string
|
||||
{
|
||||
if (is_null($this->job)) {
|
||||
if (null === $this->job) {
|
||||
throw new FireflyException('Cannot call getWarningMessage() without a job.');
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ class FileConfigurator implements ConfiguratorInterface
|
||||
*/
|
||||
public function isJobConfigured(): bool
|
||||
{
|
||||
if (is_null($this->job)) {
|
||||
if (null === $this->job) {
|
||||
throw new FireflyException('Cannot call isJobConfigured() without a job.');
|
||||
}
|
||||
$config = $this->getConfig();
|
||||
|
@@ -60,7 +60,7 @@ class SpectreConfigurator implements ConfiguratorInterface
|
||||
*/
|
||||
public function configureJob(array $data): bool
|
||||
{
|
||||
if (is_null($this->job)) {
|
||||
if (null === $this->job) {
|
||||
throw new FireflyException('Cannot call configureJob() without a job.');
|
||||
}
|
||||
$stage = $this->getConfig()['stage'] ?? 'initial';
|
||||
@@ -93,7 +93,7 @@ class SpectreConfigurator implements ConfiguratorInterface
|
||||
*/
|
||||
public function getNextData(): array
|
||||
{
|
||||
if (is_null($this->job)) {
|
||||
if (null === $this->job) {
|
||||
throw new FireflyException('Cannot call configureJob() without a job.');
|
||||
}
|
||||
$config = $this->getConfig();
|
||||
@@ -116,9 +116,8 @@ class SpectreConfigurator implements ConfiguratorInterface
|
||||
/** @var HaveAccounts $class */
|
||||
$class = app(HaveAccounts::class);
|
||||
$class->setJob($this->job);
|
||||
$data = $class->getData();
|
||||
|
||||
return $data;
|
||||
return $class->getData();
|
||||
default:
|
||||
return [];
|
||||
}
|
||||
@@ -131,7 +130,7 @@ class SpectreConfigurator implements ConfiguratorInterface
|
||||
*/
|
||||
public function getNextView(): string
|
||||
{
|
||||
if (is_null($this->job)) {
|
||||
if (null === $this->job) {
|
||||
throw new FireflyException('Cannot call configureJob() without a job.');
|
||||
}
|
||||
$stage = $this->getConfig()['stage'] ?? 'initial';
|
||||
@@ -166,7 +165,7 @@ class SpectreConfigurator implements ConfiguratorInterface
|
||||
*/
|
||||
public function isJobConfigured(): bool
|
||||
{
|
||||
if (is_null($this->job)) {
|
||||
if (null === $this->job) {
|
||||
throw new FireflyException('Cannot call configureJob() without a job.');
|
||||
}
|
||||
$stage = $this->getConfig()['stage'] ?? 'initial';
|
||||
|
Reference in New Issue
Block a user