Making code PSR2 compliant

This commit is contained in:
gamonoid
2017-09-24 19:23:30 +02:00
parent 05b57e0236
commit 6c61577583
160 changed files with 1432 additions and 1086 deletions

View File

@@ -1,36 +1,38 @@
<?php
//Mock Session class
if (!class_exists('SessionUtils')) {
class SessionUtils{
class SessionUtils
{
public static $data;
public static $data;
public static function getSessionObject($name){
if(empty(self::$data)){
self::$data = array();
}
if(isset(self::$data[$name.CLIENT_NAME])){
$obj = self::$data[$name.CLIENT_NAME];
}
if(empty($obj)){
return null;
}
return json_decode($obj);
}
public static function getSessionObject($name)
{
if (empty(self::$data)) {
self::$data = array();
}
if (isset(self::$data[$name.CLIENT_NAME])) {
$obj = self::$data[$name.CLIENT_NAME];
}
if (empty($obj)) {
return null;
}
return json_decode($obj);
}
public static function saveSessionObject($name,$obj){
if(empty(self::$data)){
self::$data = array();
}
self::$data[$name.CLIENT_NAME] = json_encode($obj);
}
}
public static function saveSessionObject($name, $obj)
{
if (empty(self::$data)) {
self::$data = array();
}
self::$data[$name.CLIENT_NAME] = json_encode($obj);
}
}
}
if (!class_exists('TestTemplate')) {
include(dirname(__FILE__).'/TestTemplate.php');
include(dirname(__FILE__).'/helper/EmployeeTestDataHelper.php');
include(APP_BASE_PATH."/includes.inc.php");
include(dirname(__FILE__).'/TestTemplate.php');
include(dirname(__FILE__).'/helper/EmployeeTestDataHelper.php');
include(APP_BASE_PATH."/includes.inc.php");
}