mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-24 22:48:18 +00:00
Code clean up.
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
* 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\Import\Routine;
|
||||
@@ -35,19 +34,17 @@ use Log;
|
||||
|
||||
class ImportRoutine
|
||||
{
|
||||
|
||||
/** @var Collection */
|
||||
/** @var Collection */
|
||||
public $errors;
|
||||
/** @var Collection */
|
||||
/** @var Collection */
|
||||
public $journals;
|
||||
/** @var int */
|
||||
public $lines = 0;
|
||||
/** @var ImportJob */
|
||||
/** @var ImportJob */
|
||||
private $job;
|
||||
|
||||
/**
|
||||
* ImportRoutine constructor.
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -60,7 +57,7 @@ class ImportRoutine
|
||||
*/
|
||||
public function run(): bool
|
||||
{
|
||||
if ($this->job->status !== 'configured') {
|
||||
if ('configured' !== $this->job->status) {
|
||||
Log::error(sprintf('Job %s is in state "%s" so it cannot be started.', $this->job->key, $this->job->status));
|
||||
|
||||
return false;
|
||||
@@ -93,7 +90,6 @@ class ImportRoutine
|
||||
|
||||
Log::info(sprintf('Done with import job %s', $this->job->key));
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -117,8 +113,7 @@ class ImportRoutine
|
||||
$processor = app($class);
|
||||
$processor->setJob($this->job);
|
||||
|
||||
if ($this->job->status === 'configured') {
|
||||
|
||||
if ('configured' === $this->job->status) {
|
||||
// set job as "running"...
|
||||
$this->job->status = 'running';
|
||||
$this->job->save();
|
||||
|
Reference in New Issue
Block a user