Skip to content

Commit

Permalink
fix small code style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Simonas Šerlinskas committed Jan 24, 2019
1 parent 5879351 commit 5e11d92
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/Aggregation/Bucketing/AutoDateHistogramAggregation.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ public function __construct($name, $field, $buckets = null, $format = null)

$this->setField($field);

if ($buckets)
if ($buckets) {
$this->addParameter('buckets', $buckets);
}

if ($format)
if ($format) {
$this->addParameter('format', $format);
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Query/Joining/ParentIdQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ public function toArray()

return [$this->getType() => $output];
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ public function testToArray()
->method('toArray')
->willReturn(['test_field' => ['test_value' => 'test']]);

$aggregation->addFilter('first', $filter );
$aggregation->addFilter('second', $filter );
$aggregation->addFilter('first', $filter);
$aggregation->addFilter('second', $filter);

$results = $aggregation->toArray();
$expected = [
Expand Down

0 comments on commit 5e11d92

Please sign in to comment.