Skip to content

Commit

Permalink
Dev: Scrutinizer fixes to EM
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Dec 21, 2016
1 parent 1688f71 commit f857267
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
21 changes: 13 additions & 8 deletions application/helpers/expressions/em_core_helper.php
Expand Up @@ -244,7 +244,7 @@ function __construct()
* Add an error to the error log
*
* @param string $errMsg
* @param string $token
* @param array $token
* @return void
*/
private function RDP_AddError($errMsg, $token)
Expand Down Expand Up @@ -566,7 +566,7 @@ private function RDP_EvaluateConstantVarOrFunction()
case 'SQ_STRING':
$this->RDP_StackPush($token);
return true;
break;
// NB: No break needed
case 'WORD':
case 'SGQA':
if (($this->RDP_pos + 1) < $this->RDP_count and $this->RDP_tokens[($this->RDP_pos + 1)][2] == 'LP')
Expand Down Expand Up @@ -604,14 +604,15 @@ private function RDP_EvaluateConstantVarOrFunction()
return false;
}
}
break;
// NB: No break needed
case 'COMMA':
--$this->RDP_pos;
$this->RDP_AddError(gT("Should never get to this line?"),$token);
return false;
// NB: No break needed
default:
return false;
break;
// NB: No break needed
}
}

Expand Down Expand Up @@ -953,7 +954,6 @@ private function RDP_EvaluateMultiplicativeExpression()
return false;
}
break;
break;
default:
--$this->RDP_pos;
return true;
Expand Down Expand Up @@ -1073,6 +1073,7 @@ private function RDP_EvaluateUnaryExpression()
return false;
}
return $this->RDP_EvaluateUnary($token);
// NB: No break needed
break;
default:
--$this->RDP_pos;
Expand Down Expand Up @@ -2159,7 +2160,7 @@ public function RegisterFunctions(array $functions) {
* @param string $op - the operator (=,*=,/=,+=,-=)
* @param string $name
* @param string $value
* @return boolean
* @return int
*/
private function RDP_SetVariableValue($op,$name,$value)
{
Expand Down Expand Up @@ -2557,7 +2558,9 @@ function exprmgr_countifop($args)
++$j;
}
}
catch (Exception $e) { }
catch (Exception $e) {
// Do nothing
}
break;
}
}
Expand Down Expand Up @@ -2676,7 +2679,9 @@ function exprmgr_sumifop($args)
$result += $arg;
}
}
catch (Exception $e) { }
catch (Exception $e) {
// Do nothing
}
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion application/helpers/expressions/em_manager_helper.php
Expand Up @@ -9120,7 +9120,7 @@ private function _GetVarAttribute($name,$attr,$default,$gseq,$qseq)
* @param string $op
* @param string $name
* @param string $value
* @return ?
* @return int
*/
public static function SetVariableValue($op,$name,$value)
{
Expand Down

0 comments on commit f857267

Please sign in to comment.