FIX: Skip handling import errors
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
namespace Incoviba\Common\Define\Cartola;
|
||||
|
||||
use Psr\Http\Message\UploadedFileInterface;
|
||||
use Incoviba\Exception\ServiceAction\Read;
|
||||
|
||||
interface Banco
|
||||
{
|
||||
@ -9,6 +10,7 @@ interface Banco
|
||||
* Process bank movements for database inserts
|
||||
* @param UploadedFileInterface $file
|
||||
* @return array
|
||||
* @throws Read
|
||||
*/
|
||||
public function process(UploadedFileInterface $file): array;
|
||||
|
||||
|
@ -3,10 +3,16 @@ namespace Incoviba\Common\Ideal\Cartola;
|
||||
|
||||
use Incoviba\Common\Define;
|
||||
use Incoviba\Common\Ideal\Service;
|
||||
use Incoviba\Exception\ServiceAction\Read;
|
||||
use Psr\Http\Message\UploadedFileInterface;
|
||||
|
||||
abstract class Banco extends Service implements Define\Cartola\Banco
|
||||
{
|
||||
/**
|
||||
* @param UploadedFileInterface $file
|
||||
* @return array
|
||||
* @throws Read
|
||||
*/
|
||||
public function process(UploadedFileInterface $file): array
|
||||
{
|
||||
$filename = $this->processUploadedFile($file);
|
||||
@ -40,6 +46,7 @@ abstract class Banco extends Service implements Define\Cartola\Banco
|
||||
* Process the temp file from getFilename and remove it
|
||||
* @param string $filename
|
||||
* @return array
|
||||
* @throws Read
|
||||
*/
|
||||
protected function processFile(string $filename): array
|
||||
{
|
||||
@ -88,6 +95,7 @@ abstract class Banco extends Service implements Define\Cartola\Banco
|
||||
* Translate uploaded file data to database data
|
||||
* @param string $filename
|
||||
* @return array
|
||||
* @throws Read
|
||||
*/
|
||||
abstract protected function parseFile(string $filename): array;
|
||||
}
|
||||
|
Reference in New Issue
Block a user