Remove scalar typehints to support PHP5

This commit is contained in:
Alexander Nell
2020-02-25 17:48:27 +01:00
parent 29fff4e012
commit e8d2b2e81e
5 changed files with 12 additions and 12 deletions

View File

@ -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) {

View File

@ -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;