Add strict types and newlines.

This commit is contained in:
James Cole 2018-05-05 16:51:32 +02:00
parent 3ac240dc1c
commit f74b9ba7ab
29 changed files with 347 additions and 270 deletions

View File

@ -0,0 +1,89 @@
<?php
declare(strict_types=1);
/**
* FileJobConfiguration.php
* Copyright (c) 2018 thegrumpydictator@gmail.com
*
* This file is part of Firefly III.
*
* Firefly III is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Firefly III is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
*/
namespace FireflyIII\Import\JobConfiguration;
use FireflyIII\Models\ImportJob;
use Illuminate\Support\MessageBag;
class FileJobConfiguration implements JobConfigurationInterface
{
/**
* ConfiguratorInterface constructor.
*/
public function __construct()
{
}
/**
* Store any data from the $data array into the job. Anything in the message bag will be flashed
* as an error to the user, regardless of its content.
*
* @param array $data
*
* @return MessageBag
*/
public function configureJob(array $data): MessageBag
{
// TODO: Implement configureJob() method.
}
/**
* Return the data required for the next step in the job configuration.
*
* @return array
*/
public function getNextData(): array
{
// TODO: Implement getNextData() method.
}
/**
* Returns the view of the next step in the job configuration.
*
* @return string
*/
public function getNextView(): string
{
// TODO: Implement getNextView() method.
}
/**
* Returns true when the initial configuration for this job is complete.
*
* @return bool
*/
public function configurationComplete(): bool
{
// TODO: Implement configurationComplete() method.
}
/**
* @param ImportJob $job
*/
public function setJob(ImportJob $job): void
{
// TODO: Implement setJob() method.
}
}

View File

@ -36,8 +36,8 @@ use Preferences;
*/
class BunqPrerequisites implements PrerequisitesInterface
{
// /** @var User */
// private $user;
/** @var User */
private $user;
//
// /**
// * Returns view name that allows user to fill in prerequisites. Currently asks for the API key.
@ -183,8 +183,7 @@ class BunqPrerequisites implements PrerequisitesInterface
*/
public function getView(): string
{
// TODO: Implement getView() method.
throw new NotImplementedException;
return 'todo';
}
/**
@ -194,8 +193,7 @@ class BunqPrerequisites implements PrerequisitesInterface
*/
public function getViewParameters(): array
{
// TODO: Implement getViewParameters() method.
throw new NotImplementedException;
return [];
}
/**
@ -205,8 +203,7 @@ class BunqPrerequisites implements PrerequisitesInterface
*/
public function isComplete(): bool
{
// TODO: Implement isComplete() method.
throw new NotImplementedException;
return false;
}
/**
@ -216,8 +213,7 @@ class BunqPrerequisites implements PrerequisitesInterface
*/
public function setUser(User $user): void
{
// TODO: Implement setUser() method.
throw new NotImplementedException;
$this->user = $user;
}
/**
@ -231,7 +227,6 @@ class BunqPrerequisites implements PrerequisitesInterface
*/
public function storePrerequisites(array $data): MessageBag
{
// TODO: Implement storePrerequisites() method.
throw new NotImplementedException;
return new MessageBag;
}
}

View File

@ -118,8 +118,7 @@ class FilePrerequisites implements PrerequisitesInterface
*/
public function getView(): string
{
// TODO: Implement getView() method.
throw new NotImplementedException;
return '';
}
/**
@ -129,8 +128,7 @@ class FilePrerequisites implements PrerequisitesInterface
*/
public function getViewParameters(): array
{
// TODO: Implement getViewParameters() method.
throw new NotImplementedException;
return [];
}
/**
@ -140,8 +138,7 @@ class FilePrerequisites implements PrerequisitesInterface
*/
public function isComplete(): bool
{
// TODO: Implement isComplete() method.
throw new NotImplementedException;
return true;
}
/**
@ -151,8 +148,7 @@ class FilePrerequisites implements PrerequisitesInterface
*/
public function setUser(User $user): void
{
// TODO: Implement setUser() method.
throw new NotImplementedException;
}
/**
@ -166,7 +162,6 @@ class FilePrerequisites implements PrerequisitesInterface
*/
public function storePrerequisites(array $data): MessageBag
{
// TODO: Implement storePrerequisites() method.
throw new NotImplementedException;
return new MessageBag;
}
}

View File

@ -196,8 +196,7 @@ class SpectrePrerequisites implements PrerequisitesInterface
*/
public function getView(): string
{
// TODO: Implement getView() method.
throw new NotImplementedException;
return '';
}
/**
@ -207,8 +206,7 @@ class SpectrePrerequisites implements PrerequisitesInterface
*/
public function getViewParameters(): array
{
// TODO: Implement getViewParameters() method.
throw new NotImplementedException;
return [];
}
/**
@ -218,8 +216,7 @@ class SpectrePrerequisites implements PrerequisitesInterface
*/
public function isComplete(): bool
{
// TODO: Implement isComplete() method.
throw new NotImplementedException;
return false;
}
/**
@ -229,8 +226,6 @@ class SpectrePrerequisites implements PrerequisitesInterface
*/
public function setUser(User $user): void
{
// TODO: Implement setUser() method.
throw new NotImplementedException;
}
/**
@ -244,7 +239,6 @@ class SpectrePrerequisites implements PrerequisitesInterface
*/
public function storePrerequisites(array $data): MessageBag
{
// TODO: Implement storePrerequisites() method.
throw new NotImplementedException;
return new MessageBag;
}
}

View File

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

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace FireflyIII\Support\Import\Routine\Fake;

View File

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

View File

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