Expand tests, do code cleanup.

This commit is contained in:
James Cole
2017-12-17 14:30:53 +01:00
parent b08af77c98
commit 78335e5814
141 changed files with 773 additions and 54 deletions

View File

@@ -34,6 +34,9 @@ use Log;
*/
class Initial implements ConfigurationInterface
{
/**
* @var
*/
private $job;
/**

View File

@@ -51,6 +51,7 @@ class Map implements ConfigurationInterface
*
* @throws FireflyException
* @throws \League\Csv\Exception
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
public function getData(): array
{
@@ -187,6 +188,7 @@ class Map implements ConfigurationInterface
/**
* @return bool
* @throws FireflyException
*/
private function getMappableColumns(): bool
{

View File

@@ -34,6 +34,9 @@ use Log;
*/
class Roles implements ConfigurationInterface
{
/**
* @var array
*/
private $data = [];
/** @var ImportJob */
private $job;
@@ -46,6 +49,7 @@ class Roles implements ConfigurationInterface
*
* @return array
* @throws \League\Csv\Exception
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
public function getData(): array
{

View File

@@ -22,6 +22,7 @@ class InputMandatory implements ConfigurationInterface
* Get the data necessary to show the configuration screen.
*
* @return array
* @throws FireflyException
*/
public function getData(): array
{
@@ -56,7 +57,7 @@ class InputMandatory implements ConfigurationInterface
/**
* @param ImportJob $job
*
* @return ConfigurationInterface
* @return void
*/
public function setJob(ImportJob $job)
{
@@ -69,6 +70,7 @@ class InputMandatory implements ConfigurationInterface
* @param array $data
*
* @return bool
* @throws FireflyException
*/
public function storeConfiguration(array $data): bool
{

View File

@@ -13,6 +13,9 @@ use FireflyIII\Support\Import\Configuration\ConfigurationInterface;
*/
class SelectCountry implements ConfigurationInterface
{
/**
* @var array
*/
public static $allCountries
= [
'AF' => 'Afghanistan',
@@ -302,7 +305,7 @@ class SelectCountry implements ConfigurationInterface
/**
* @param ImportJob $job
*
* @return ConfigurationInterface
* @return void
*/
public function setJob(ImportJob $job)
{

View File

@@ -50,7 +50,7 @@ class SelectProvider implements ConfigurationInterface
/**
* @param ImportJob $job
*
* @return ConfigurationInterface
* @return void
*/
public function setJob(ImportJob $job)
{

View File

@@ -61,6 +61,7 @@ class BunqInformation implements InformationInterface
* color: any associated color.
*
* @return array
* @throws FireflyException
*/
public function getAccounts(): array
{
@@ -113,6 +114,8 @@ class BunqInformation implements InformationInterface
/**
* @param SessionToken $sessionToken
*
* @throws \Exception
*/
private function closeSession(SessionToken $sessionToken): void
{
@@ -135,6 +138,7 @@ class BunqInformation implements InformationInterface
* @param int $userId
*
* @return Collection
* @throws \Exception
*/
private function getMonetaryAccounts(SessionToken $sessionToken, int $userId): Collection
{
@@ -159,6 +163,7 @@ class BunqInformation implements InformationInterface
* @return int
*
* @throws FireflyException
* @throws \Exception
*/
private function getUserInformation(SessionToken $sessionToken): int
{
@@ -185,6 +190,7 @@ class BunqInformation implements InformationInterface
/**
* @return SessionToken
* @throws \Exception
*/
private function startSession(): SessionToken
{

View File

@@ -61,6 +61,7 @@ class SpectreInformation implements InformationInterface
* color: any associated color.
*
* @return array
* @throws FireflyException
*/
public function getAccounts(): array
{
@@ -113,6 +114,8 @@ class SpectreInformation implements InformationInterface
/**
* @param SessionToken $sessionToken
*
* @throws \Exception
*/
private function closeSession(SessionToken $sessionToken): void
{
@@ -135,6 +138,7 @@ class SpectreInformation implements InformationInterface
* @param int $userId
*
* @return Collection
* @throws \Exception
*/
private function getMonetaryAccounts(SessionToken $sessionToken, int $userId): Collection
{
@@ -159,6 +163,7 @@ class SpectreInformation implements InformationInterface
* @return int
*
* @throws FireflyException
* @throws \Exception
*/
private function getUserInformation(SessionToken $sessionToken): int
{
@@ -185,6 +190,7 @@ class SpectreInformation implements InformationInterface
/**
* @return SessionToken
* @throws \Exception
*/
private function startSession(): SessionToken
{