From 48db1693a1bd75fd7622db9b1182236a92386e07 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Fri, 2 Sep 2016 18:59:55 +0200 Subject: [PATCH] [Bridge] Use member variable instead of local variable --- lib/Bridge.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/Bridge.php b/lib/Bridge.php index eea0c90..fb846b5 100644 --- a/lib/Bridge.php +++ b/lib/Bridge.php @@ -321,15 +321,13 @@ abstract class BridgeAbstract implements BridgeInterface { $this->setInputs($inputs); // Guess the paramter context from input data - $queriedContext=$this->getQueriedContext(); - if(is_null($queriedContext)){ + $this->queriedContext = $this->getQueriedContext(); + if(is_null($this->queriedContext)){ $this->returnClientError('Required parameter(s) missing'); - }else if($queriedContext===false){ + } elseif($this->queriedContext === false){ $this->returnClientError('Mixed context parameters'); } - $this->queriedContext=$queriedContext; - // Apply default values to missing data $contexts=array($this->queriedContext); if(array_key_exists('global',static::PARAMETERS)){ @@ -383,7 +381,7 @@ abstract class BridgeAbstract implements BridgeInterface { }else{ continue; } - $this->inputs[$queriedContext][$name]['value']=$value; + $this->inputs[$this->queriedContext][$name]['value']=$value; } }