Skip to content
Snippets Groups Projects
Commit 80aa991d authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

fix php parser problems

parent 14e6a99c
No related branches found
No related tags found
1 merge request!66php8 only; added variable types; short array syntax; remove glyphicons
...@@ -116,13 +116,13 @@ class ForemanApi { ...@@ -116,13 +116,13 @@ class ForemanApi {
/** /**
* last request * last request
* @var type * @var array
*/ */
protected $_aRequest=array(); protected $_aRequest=array();
/** /**
* last response * last response
* @var type * @var array
*/ */
protected $_aResponse=array(); protected $_aResponse=array();
...@@ -135,11 +135,8 @@ class ForemanApi { ...@@ -135,11 +135,8 @@ class ForemanApi {
public function __construct($aCfg) { public function __construct($aCfg) {
if(!isset($aCfg['api'])){ if(!isset($aCfg['api'])){
die("ERROR: class ".__CLASS__." must be initialized with an array containing api config for foreman."); die("ERROR: class ".__CLASS__." must be initialized with an array containing api config for foreman.");
return false;
} }
$this->_aCfg=$aCfg; $this->_aCfg=$aCfg;
return true;
} }
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
...@@ -159,10 +156,10 @@ class ForemanApi { ...@@ -159,10 +156,10 @@ class ForemanApi {
/** /**
* search url prefix in $this->_aAllowedUrls by given key * search url prefix in $this->_aAllowedUrls by given key
* @param type $sFunction * @param string $sFunction
* @return type * @return string
*/ */
protected function _guessPrefixUrl($sFunction=false){ protected function _guessPrefixUrl($sFunction=''){
$sReturn=''; $sReturn='';
/* /*
if (!$sFunction){ if (!$sFunction){
...@@ -232,7 +229,7 @@ class ForemanApi { ...@@ -232,7 +229,7 @@ class ForemanApi {
* - postdata; for POST only * - postdata; for POST only
* *
* @param array $aRequest arrayurl for Foreman API * @param array $aRequest arrayurl for Foreman API
* @return string * @return array
*/ */
protected function _httpCall($aRequest=false, $iTimeout = 15) { protected function _httpCall($aRequest=false, $iTimeout = 15) {
if ($aRequest){ if ($aRequest){
...@@ -433,7 +430,7 @@ class ForemanApi { ...@@ -433,7 +430,7 @@ class ForemanApi {
/** /**
* check for missing config entries * check for missing config entries
* @return type * @return bool
*/ */
public function selfcheck() { public function selfcheck() {
$sOut=''; $sOut='';
...@@ -498,7 +495,7 @@ class ForemanApi { ...@@ -498,7 +495,7 @@ class ForemanApi {
* - list of keys, i.e. array('id', 'title') * - list of keys, i.e. array('id', 'title')
* *
* @param array $aOptions * @param array $aOptions
* @return array * @return bool|array
*/ */
public function read($aOptions){ public function read($aOptions){
$this->_aRequest=$aOptions; $this->_aRequest=$aOptions;
...@@ -512,7 +509,7 @@ class ForemanApi { ...@@ -512,7 +509,7 @@ class ForemanApi {
/** /**
* TODO * TODO
* @param type $aOptions * @param array $aOptions
*/ */
public function update($aOptions){ public function update($aOptions){
/* /*
...@@ -524,7 +521,7 @@ class ForemanApi { ...@@ -524,7 +521,7 @@ class ForemanApi {
/** /**
* TODO * TODO
* @param type $aOptions * @param array $aOptions
*/ */
public function delete($aOptions){ public function delete($aOptions){
/* /*
...@@ -573,7 +570,7 @@ class ForemanApi { ...@@ -573,7 +570,7 @@ class ForemanApi {
[local_port] => 33906 [local_port] => 33906
) )
* @param string $sKey get value of given key only * @param string $sKey get value of given key only
* @return any * @return mixed
*/ */
public function getResponseInfo($sKey=false){ public function getResponseInfo($sKey=false){
......
...@@ -331,7 +331,6 @@ class formgen ...@@ -331,7 +331,6 @@ class formgen
default: default:
die("ERROR: " . __CLASS__ . ":" . __FUNCTION__ . " - formelement type " . $elementData["type"] . " ist not supported (yet)."); die("ERROR: " . __CLASS__ . ":" . __FUNCTION__ . " - formelement type " . $elementData["type"] . " ist not supported (yet).");
break;
} }
// Default or table mode? // Default or table mode?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment