Code clean up.

This commit is contained in:
James Cole
2017-11-15 12:25:49 +01:00
parent 57dcdfa0c4
commit ffca858b8d
476 changed files with 2055 additions and 4181 deletions

View File

@@ -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();