mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Expand tests, do code cleanup.
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
@@ -28,6 +28,9 @@ use FireflyIII\User;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class ImportCategory
|
||||
*/
|
||||
class ImportCategory
|
||||
{
|
||||
/** @var Category */
|
||||
|
@@ -27,6 +27,9 @@ use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||
use FireflyIII\User;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class ImportCurrency
|
||||
*/
|
||||
class ImportCurrency
|
||||
{
|
||||
/** @var array */
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -26,6 +26,11 @@ use FireflyIII\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\MessageBag;
|
||||
|
||||
/**
|
||||
* Interface PrerequisitesInterface
|
||||
*
|
||||
* @package FireflyIII\Import\Prerequisites
|
||||
*/
|
||||
interface PrerequisitesInterface
|
||||
{
|
||||
/**
|
||||
|
@@ -25,6 +25,11 @@ namespace FireflyIII\Import\Routine;
|
||||
use FireflyIII\Models\ImportJob;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Interface RoutineInterface
|
||||
*
|
||||
* @package FireflyIII\Import\Routine
|
||||
*/
|
||||
interface RoutineInterface
|
||||
{
|
||||
/**
|
||||
|
@@ -408,6 +408,12 @@ trait ImportSupport
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $parameters
|
||||
*
|
||||
* @return TransactionJournal
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function storeJournal(array $parameters): TransactionJournal
|
||||
{
|
||||
// find transaction type:
|
||||
|
Reference in New Issue
Block a user