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

@@ -70,6 +70,7 @@ class CsvProcessor implements FileProcessorInterface
* Does the actual job.
*
* @return bool
* @throws \League\Csv\Exception
*/
public function run(): bool
{
@@ -159,6 +160,9 @@ class CsvProcessor implements FileProcessorInterface
/**
* @return Iterator
* @throws \League\Csv\Exception
* @throws \League\Csv\Exception
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
private function getImportArray(): Iterator
{
@@ -275,6 +279,7 @@ class CsvProcessor implements FileProcessorInterface
* @param array $array
*
* @return bool
* @throws FireflyException
*/
private function rowAlreadyImported(array $array): bool
{

View File

@@ -28,6 +28,9 @@ use FireflyIII\User;
use Illuminate\Support\Collection;
use Log;
/**
* Class ImportCategory
*/
class ImportCategory
{
/** @var Category */

View File

@@ -27,6 +27,9 @@ use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
use FireflyIII\User;
use Log;
/**
* Class ImportCurrency
*/
class ImportCurrency
{
/** @var array */

View File

@@ -155,6 +155,7 @@ class BunqPrerequisites implements PrerequisitesInterface
* @return DeviceServerId
*
* @throws FireflyException
* @throws \Exception
*/
private function getExistingDevice(): DeviceServerId
{
@@ -292,6 +293,10 @@ class BunqPrerequisites implements PrerequisitesInterface
* - Use this token to send a device server request
* - Store the installation token
* - Use the installation token each time we need a session.
*
* @throws FireflyException
* @throws FireflyException
* @throws \Exception
*/
private function registerDevice(): DeviceServerId
{

View File

@@ -26,6 +26,11 @@ use FireflyIII\User;
use Illuminate\Http\Request;
use Illuminate\Support\MessageBag;
/**
* Interface PrerequisitesInterface
*
* @package FireflyIII\Import\Prerequisites
*/
interface PrerequisitesInterface
{
/**

View File

@@ -25,6 +25,11 @@ namespace FireflyIII\Import\Routine;
use FireflyIII\Models\ImportJob;
use Illuminate\Support\Collection;
/**
* Interface RoutineInterface
*
* @package FireflyIII\Import\Routine
*/
interface RoutineInterface
{
/**

View File

@@ -408,6 +408,12 @@ trait ImportSupport
}
}
/**
* @param array $parameters
*
* @return TransactionJournal
* @throws FireflyException
*/
private function storeJournal(array $parameters): TransactionJournal
{
// find transaction type: