Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
language: php
php:
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- nightly
install:
- composer install
script:
- ./vendor/bin/phpunit
11 changes: 8 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,23 @@
"minimum-stability": "beta",
"license": "LGPL-3.0",
"require": {
"php": ">=5.6",
"php": ">=5.6",
"composer/installers": "^1",
"eftec/daoone": "^3.19",
"ext-ctype": "*"
},
"require-dev": {
"phpunit/phpunit": "^5.7"
},
"phpunit/phpunit": "^5.7 || ^6.5"
},
"autoload": {
"psr-4": {
"eftec\\": "vendor/eftec/",
"eftec\\statemachineone\\": "lib/"
}
},
"autoload-dev": {
"psr-4": {
"eftec\\tests\\": "tests/"
}
}
}
26 changes: 13 additions & 13 deletions lib/Job.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ class Job {
/** @var int */
var $dateInit;
/** @var int */
var $dateLastChange;
var $dateLastChange;
/** @var int */
var $dateEnd;
/** @var int */
var $dateExpired;
var $dateExpired;
/** @var mixed */
var $state;
/** @var array */
var $fields;
/**
/**
* none= the job doesn't exist or it's deleted.
* inactive= the job exists but it hasn't started
* active = the job is running
Expand All @@ -37,7 +37,7 @@ class Job {
var $isNew=false;
var $isUpdate=false;


/** @var array */
var $log;

Expand Down Expand Up @@ -99,8 +99,8 @@ public function doSetValues($set) {
if ($c % 4 !=0) {
trigger_error("logic incorrect number of operators. Tips: don't forget the spaces");
}
// 0 1 2 3 0 1 2 3
// set variable = 2 , variable = 5
// 0 1 2 3 0 1 2 3
// set variable = 2 , variable = 5
for($i=0;$i<$c;$i=$i+4) {
$varName=$set[$i+1];
$op=$set[$i+2]; // = (set), + (add), - (rest)
Expand All @@ -110,8 +110,8 @@ public function doSetValues($set) {
$this->setIsUpdate(true);
}
}


public function strToValue($string) {
switch ($string) {
case 'null()':
Expand Down Expand Up @@ -169,7 +169,7 @@ public function __construct()
$this->log=[];
}


/**
* @param int $dateInit
* @return Job
Expand Down Expand Up @@ -273,7 +273,7 @@ public function getActiveNumber() {
trigger_error("type active not defined");
return -1;
}
}
}

/**
* @param bool $isNew
Expand All @@ -294,7 +294,7 @@ public function setIsUpdate($isUpdate)
$this->isUpdate = $isUpdate;
return $this;
}



} // end StateMachineJob
Loading