mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-01 19:47:11 +00:00
Various code cleanup.
This commit is contained in:
@@ -18,12 +18,10 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Support\Import\Configuration\Spectre;
|
||||
|
||||
|
||||
use Crypt;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\ImportJob;
|
||||
@@ -42,6 +40,7 @@ class InputMandatory implements ConfigurationInterface
|
||||
* Get the data necessary to show the configuration screen.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function getData(): array
|
||||
@@ -76,8 +75,6 @@ class InputMandatory implements ConfigurationInterface
|
||||
|
||||
/**
|
||||
* @param ImportJob $job
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setJob(ImportJob $job)
|
||||
{
|
||||
@@ -90,6 +87,7 @@ class InputMandatory implements ConfigurationInterface
|
||||
* @param array $data
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function storeConfiguration(array $data): bool
|
||||
@@ -120,4 +118,4 @@ class InputMandatory implements ConfigurationInterface
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,12 +18,10 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Support\Import\Configuration\Spectre;
|
||||
|
||||
|
||||
use FireflyIII\Models\ImportJob;
|
||||
use FireflyIII\Models\SpectreProvider;
|
||||
use FireflyIII\Support\Import\Configuration\ConfigurationInterface;
|
||||
@@ -324,8 +322,6 @@ class SelectCountry implements ConfigurationInterface
|
||||
|
||||
/**
|
||||
* @param ImportJob $job
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setJob(ImportJob $job)
|
||||
{
|
||||
@@ -341,12 +337,12 @@ class SelectCountry implements ConfigurationInterface
|
||||
*/
|
||||
public function storeConfiguration(array $data): bool
|
||||
{
|
||||
$config = $this->job->configuration;
|
||||
$config['country'] = $data['country_code'] ?? 'XF'; // default to fake country.
|
||||
$config = $this->job->configuration;
|
||||
$config['country'] = $data['country_code'] ?? 'XF'; // default to fake country.
|
||||
$config['selected-country'] = true;
|
||||
$this->job->configuration = $config;
|
||||
$this->job->configuration = $config;
|
||||
$this->job->save();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,12 +18,10 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Support\Import\Configuration\Spectre;
|
||||
|
||||
|
||||
use FireflyIII\Models\ImportJob;
|
||||
use FireflyIII\Models\SpectreProvider;
|
||||
use FireflyIII\Support\Import\Configuration\ConfigurationInterface;
|
||||
@@ -69,8 +67,6 @@ class SelectProvider implements ConfigurationInterface
|
||||
|
||||
/**
|
||||
* @param ImportJob $job
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setJob(ImportJob $job)
|
||||
{
|
||||
@@ -86,12 +82,12 @@ class SelectProvider implements ConfigurationInterface
|
||||
*/
|
||||
public function storeConfiguration(array $data): bool
|
||||
{
|
||||
$config = $this->job->configuration;
|
||||
$config['provider'] = intval($data['provider_code']) ?? 0; // default to fake country.
|
||||
$config['selected-provider'] = true;
|
||||
$this->job->configuration = $config;
|
||||
$config = $this->job->configuration;
|
||||
$config['provider'] = intval($data['provider_code']) ?? 0; // default to fake country.
|
||||
$config['selected-provider'] = true;
|
||||
$this->job->configuration = $config;
|
||||
$this->job->save();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user