Skip to content

Commit

Permalink
Be consistent with how the type is accessed
Browse files Browse the repository at this point in the history
  • Loading branch information
fd-automox committed Aug 8, 2020
1 parent c054ebb commit b9217ae
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/ConditionAnalyzer/Analyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,16 +199,11 @@ private function getIndex()

private function hasValidQueryOperator($hash, $range = null)
{
$hashCondition = $this->getCondition($hash);

$validQueryOp = ComparisonOperator::isValidQueryDynamoDbOperator($hashCondition['type'] ?? null);
$hashConditionType = $this->getCondition($hash)['type'] ?? null;
$validQueryOp = ComparisonOperator::isValidQueryDynamoDbOperator($hashConditionType);

if ($validQueryOp && $range) {
$rangeConditionType = $this->getCondition($range)['type'] ?? null;
if ($rangeConditionType === null) {
return false;
}

$validQueryOp = ComparisonOperator::isValidQueryDynamoDbOperator(
$rangeConditionType,
true
Expand Down

0 comments on commit b9217ae

Please sign in to comment.