Changes for Code Style validation
This commit is contained in:
@@ -386,56 +386,55 @@ class Model
|
||||
$project = array_change_key_case($project);
|
||||
|
||||
//if (! empty($diagram)) {
|
||||
$lanesets = self::getBpmnCollectionBy('Laneset', LanesetPeer::PRJ_UID, $prjUid, true);
|
||||
$lanes = self::getBpmnCollectionBy('Lane', LanePeer::PRJ_UID, $prjUid, true);
|
||||
$lanesets = self::getBpmnCollectionBy('Laneset', LanesetPeer::PRJ_UID, $prjUid, true);
|
||||
$lanes = self::getBpmnCollectionBy('Lane', LanePeer::PRJ_UID, $prjUid, true);
|
||||
|
||||
//$activities = self::getBpmnCollectionBy('Activity', ActivityPeer::PRJ_UID, $prjUid, true);
|
||||
//$activities = Activity::getAll(null, null, null, 'object', CASE_LOWER);
|
||||
$activities = Activity::getAll(array('changeCaseTo' => CASE_LOWER));
|
||||
//print_r($activities); die;
|
||||
//$activities = self::getBpmnCollectionBy('Activity', ActivityPeer::PRJ_UID, $prjUid, true);
|
||||
//$activities = Activity::getAll(null, null, null, 'object', CASE_LOWER);
|
||||
$activities = Activity::getAll(array('changeCaseTo' => CASE_LOWER));
|
||||
//print_r($activities); die;
|
||||
|
||||
$events = self::getBpmnCollectionBy('Event', EventPeer::PRJ_UID, $prjUid, true);
|
||||
$gateways = self::getBpmnCollectionBy('Gateway', GatewayPeer::PRJ_UID, $prjUid, true);
|
||||
$flows = self::getBpmnCollectionBy('Flow', FlowPeer::PRJ_UID, $prjUid, true);
|
||||
$artifacts = self::getBpmnCollectionBy('Artifact', ArtifactPeer::PRJ_UID, $prjUid, true);
|
||||
$events = self::getBpmnCollectionBy('Event', EventPeer::PRJ_UID, $prjUid, true);
|
||||
$gateways = self::getBpmnCollectionBy('Gateway', GatewayPeer::PRJ_UID, $prjUid, true);
|
||||
$flows = self::getBpmnCollectionBy('Flow', FlowPeer::PRJ_UID, $prjUid, true);
|
||||
$artifacts = self::getBpmnCollectionBy('Artifact', ArtifactPeer::PRJ_UID, $prjUid, true);
|
||||
|
||||
// getting activity bound data
|
||||
foreach ($activities as $i => $activity) {
|
||||
$bound = self::getBpmnObjectBy('Bound', BoundPeer::ELEMENT_UID, $activity['act_uid'], true);
|
||||
// getting activity bound data
|
||||
foreach ($activities as $i => $activity) {
|
||||
$bound = self::getBpmnObjectBy('Bound', BoundPeer::ELEMENT_UID, $activity['act_uid'], true);
|
||||
|
||||
if (is_object($bound)) {
|
||||
$activities[$i] = array_merge($activities[$i], $bound);
|
||||
}
|
||||
if (is_object($bound)) {
|
||||
$activities[$i] = array_merge($activities[$i], $bound);
|
||||
}
|
||||
}
|
||||
|
||||
// getting event bound data
|
||||
foreach ($events as $i => $event) {
|
||||
$bound = self::getBpmnObjectBy('Bound', BoundPeer::ELEMENT_UID, $event['evn_uid'], true);
|
||||
// getting event bound data
|
||||
foreach ($events as $i => $event) {
|
||||
$bound = self::getBpmnObjectBy('Bound', BoundPeer::ELEMENT_UID, $event['evn_uid'], true);
|
||||
|
||||
if (is_object($bound)) {
|
||||
$events[$i] = array_merge($events[$i], $bound);
|
||||
}
|
||||
if (is_object($bound)) {
|
||||
$events[$i] = array_merge($events[$i], $bound);
|
||||
}
|
||||
}
|
||||
|
||||
// getting gateway bound data
|
||||
foreach ($gateways as $i => $gateway) {
|
||||
$bound = self::getBpmnObjectBy('Bound', BoundPeer::ELEMENT_UID, $gateway['gat_uid'], true);
|
||||
// getting gateway bound data
|
||||
foreach ($gateways as $i => $gateway) {
|
||||
$bound = self::getBpmnObjectBy('Bound', BoundPeer::ELEMENT_UID, $gateway['gat_uid'], true);
|
||||
|
||||
if (is_object($bound)) {
|
||||
$gateways[$i] = array_merge($gateways[$i], $bound);
|
||||
}
|
||||
if (is_object($bound)) {
|
||||
$gateways[$i] = array_merge($gateways[$i], $bound);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$project['diagrams'] = array($diagram);
|
||||
$project['diagrams'][0]['pro_uid'] = $process['pro_uid'];
|
||||
$project['diagrams'][0]['laneset'] = $lanesets;
|
||||
$project['diagrams'][0]['lanes'] = $lanes;
|
||||
$project['diagrams'][0]['activities'] = $activities;
|
||||
$project['diagrams'][0]['events'] = $events;
|
||||
$project['diagrams'][0]['gateways'] = $gateways;
|
||||
$project['diagrams'][0]['flows'] = $flows;
|
||||
$project['diagrams'][0]['artifacts'] = $artifacts;
|
||||
$project['diagrams'] = array($diagram);
|
||||
$project['diagrams'][0]['pro_uid'] = $process['pro_uid'];
|
||||
$project['diagrams'][0]['laneset'] = $lanesets;
|
||||
$project['diagrams'][0]['lanes'] = $lanes;
|
||||
$project['diagrams'][0]['activities'] = $activities;
|
||||
$project['diagrams'][0]['events'] = $events;
|
||||
$project['diagrams'][0]['gateways'] = $gateways;
|
||||
$project['diagrams'][0]['flows'] = $flows;
|
||||
$project['diagrams'][0]['artifacts'] = $artifacts;
|
||||
//}
|
||||
|
||||
return $project;
|
||||
|
||||
@@ -147,7 +147,6 @@ class Workflow
|
||||
'_action' => 'CREATE'
|
||||
);
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new \LogicException("Invalid connection to Event object type");
|
||||
}
|
||||
|
||||
@@ -41,4 +41,5 @@ abstract class Api
|
||||
{
|
||||
return \Services\Api\OAuth2\Server::getUserId();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,4 +43,5 @@ class Logger
|
||||
$me = Logger::getInstance();
|
||||
$me->setLog($data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -245,3 +245,4 @@ class PmPdo implements \OAuth2\Storage\AuthorizationCodeInterface,
|
||||
return array_merge($a, array_change_key_case($a, $case));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -200,12 +200,12 @@ class Server implements iAuthenticate
|
||||
|
||||
// verify if the client is not our local PM Designer client
|
||||
if ($token['client_id'] != self::getPmClientId()) {
|
||||
// return $allowed;
|
||||
//return $allowed;
|
||||
}
|
||||
|
||||
// making a local session verification for PM Web Designer Client
|
||||
if (! isset($_SESSION) || ! array_key_exists('USER_LOGGED', $_SESSION)) {
|
||||
// return false;
|
||||
//return false;
|
||||
}
|
||||
|
||||
return $allowed;
|
||||
@@ -236,3 +236,4 @@ class Server implements iAuthenticate
|
||||
return array_keys($this->scope);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class Test extends Api
|
||||
throw new RestException(400, "GET: Record not found. Record with id: $id does not exist!");
|
||||
}
|
||||
|
||||
public function post($request_data = NULL)
|
||||
public function post($request_data = null)
|
||||
{
|
||||
$id = count($this->data) + 1;
|
||||
$this->data[$id] = array(
|
||||
@@ -62,7 +62,7 @@ class Test extends Api
|
||||
return $this->data[$id];
|
||||
}
|
||||
|
||||
public function put($id, $request_data = NULL)
|
||||
public function put($id, $request_data = null)
|
||||
{
|
||||
if (array_key_exists($id, $this->data)) {
|
||||
if (array_key_exists('name', $request_data)) {
|
||||
|
||||
@@ -191,9 +191,9 @@ class Type
|
||||
/**
|
||||
* @param integer $age {@choise 1,2}
|
||||
*/
|
||||
public function postInt($age='')
|
||||
public function postInt($age = '')
|
||||
{
|
||||
return '->'.$age;
|
||||
return $age;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,3 +210,4 @@ class Author
|
||||
*/
|
||||
public $email = 'name@domain.com';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user