Remove scalar typehints to support PHP5
This commit is contained in:
parent
29fff4e012
commit
e8d2b2e81e
@ -38,7 +38,7 @@ class CallQueueListening extends Listening implements UsageInformationAble {
|
||||
public function triggerCallback() {
|
||||
$params = func_get_args();
|
||||
if ($this->triggerCallbackWithParams($params, false) === false) {
|
||||
if ($this->$errorMethod != null) {
|
||||
if ($this->errorMethod != null) {
|
||||
call_user_func($this->errorMethod, $this->method);
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ class CallQueueListening extends Listening implements UsageInformationAble {
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
*/
|
||||
public function triggerCallbackWithParams(array $params, bool $callErrorMethod = true) {
|
||||
public function triggerCallbackWithParams(array $params, $callErrorMethod = true) {
|
||||
$result = call_user_func_array($this->getUserFunction(), $params);
|
||||
if ($callErrorMethod && $result === false) {
|
||||
if ($this->errorMethod != null) {
|
||||
|
@ -41,7 +41,7 @@ class CallQueueManager implements UsageInformationAble {
|
||||
* @param mixed $errorMethod
|
||||
* @return bool
|
||||
*/
|
||||
public function registerListening(CallQueueListener $listener, $methods, $errorMethod = null, bool $important = false) {
|
||||
public function registerListening(CallQueueListener $listener, $methods, $errorMethod = null, $important = false) {
|
||||
if ($errorMethod != null && !CallQueueListening::checkValidCallback($listener, $errorMethod)) {
|
||||
trigger_error("Given Listener (" . get_class($listener) . ") can't handle Queue Call Callback (No Error Method '{$errorMethod}')!");
|
||||
return false;
|
||||
@ -96,7 +96,7 @@ class CallQueueManager implements UsageInformationAble {
|
||||
* @param string $method
|
||||
* @return bool
|
||||
*/
|
||||
public function hasListening(CallQueueListener $listener, string $method) {
|
||||
public function hasListening(CallQueueListener $listener, $method) {
|
||||
foreach ($this->queueListenings as $listening) {
|
||||
if ($listening->listener === $listener && $listening->method === $method) {
|
||||
return true;
|
||||
|
@ -127,7 +127,7 @@ class CommandManager implements CallbackListener, UsageInformationAble {
|
||||
* @param bool $adminCommand
|
||||
* @param CommandListener $listener
|
||||
*/
|
||||
public function disableCommand($commandName, bool $adminCommand, CommandListener $listener) {
|
||||
public function disableCommand($commandName, $adminCommand, CommandListener $listener) {
|
||||
if (is_array($commandName)) {
|
||||
foreach ($commandName as $command) {
|
||||
$this->disableCommand($command, $adminCommand, $listener);
|
||||
@ -163,7 +163,7 @@ class CommandManager implements CallbackListener, UsageInformationAble {
|
||||
* @param bool $adminCommand
|
||||
* @param CommandListener $listener
|
||||
*/
|
||||
public function enableCommand($commandName, bool $adminCommand, CommandListener $listener) {
|
||||
public function enableCommand($commandName, $adminCommand, CommandListener $listener) {
|
||||
if (is_array($commandName)) {
|
||||
foreach ($commandName as $command) {
|
||||
$this->enableCommand($command, $adminCommand, $listener);
|
||||
@ -198,7 +198,7 @@ class CommandManager implements CallbackListener, UsageInformationAble {
|
||||
* @param bool $adminCommand
|
||||
* @return bool|array
|
||||
*/
|
||||
public function isCommandEnabled($commandName, bool $adminCommand) {
|
||||
public function isCommandEnabled($commandName, $adminCommand) {
|
||||
if (is_array($commandName)) {
|
||||
$results = array();
|
||||
foreach ($commandName as $command) {
|
||||
|
@ -244,7 +244,7 @@ abstract class FileUtil {
|
||||
* @param string $path
|
||||
* @return string
|
||||
*/
|
||||
public static function shortenPath(string $path) {
|
||||
public static function shortenPath($path) {
|
||||
$root = substr($path, 0, 1) === '/';
|
||||
$path = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $path);
|
||||
$parts = array_filter(explode(DIRECTORY_SEPARATOR, $path), 'strlen');
|
||||
|
@ -20,7 +20,7 @@ abstract class DataUtil {
|
||||
* @param string $root
|
||||
* @return string
|
||||
*/
|
||||
public static function buildXmlStandaloneFromArray(array $a, string $root = '') {
|
||||
public static function buildXmlStandaloneFromArray(array $a, $root = '') {
|
||||
$domDocument = new \DOMDocument("1.0", "utf-8");
|
||||
$domDocument->xmlStandalone = true;
|
||||
|
||||
@ -70,7 +70,7 @@ abstract class DataUtil {
|
||||
* @param bool $recurse
|
||||
* @return array
|
||||
*/
|
||||
public static function implodePositions(array $a, bool $recurse = true) {
|
||||
public static function implodePositions(array $a, $recurse = true) {
|
||||
$result = array();
|
||||
foreach ($a as $key => $value) {
|
||||
if (is_array($value)) {
|
||||
@ -95,7 +95,7 @@ abstract class DataUtil {
|
||||
* @param string $prefix (used for recursion)
|
||||
* @return array
|
||||
*/
|
||||
public static function flattenArray(array $a, string $delimiter = '.', string $prefix = '') {
|
||||
public static function flattenArray(array $a, $delimiter = '.', $prefix = '') {
|
||||
$result = array();
|
||||
foreach ($a as $key => $value)
|
||||
{
|
||||
@ -121,7 +121,7 @@ abstract class DataUtil {
|
||||
* @param string $delimiter
|
||||
* @return array
|
||||
*/
|
||||
public static function unflattenArray(array $a, string $delimiter = '.') {
|
||||
public static function unflattenArray(array $a, $delimiter = '.') {
|
||||
$result = array();
|
||||
foreach ($a as $key => $value) {
|
||||
if (!is_string($key)) {
|
||||
|
Loading…
Reference in New Issue
Block a user