Skip to content

Commit

Permalink
Apply fixes from StyleCI (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
akki-io authored Mar 29, 2023
1 parent 5c8c04b commit 2cf9cae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Traits/FilterByDimensionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ protected function createDimensionGroup($dimensions): array
$filterExpressionList = [];

foreach ($dimensions as $dimension) {
if($dimension instanceof Filter){
if ($dimension instanceof Filter) {
$filterExpressionList[] = (new FilterExpression())->setFilter($dimension);
continue;
}

if(is_array($dimension)){
if (is_array($dimension)) {
$stringFilter = (new StringFilter())->setCaseSensitive($dimension[3] ?? false)
->setMatchType($dimension[1])
->setValue($dimension[2]);
Expand Down
6 changes: 3 additions & 3 deletions tests/LaravelGoogleAnalyticsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ public function it_should_filter_dimension_with_or_group()
/** @test */
public function it_should_filter_dimension_with_and_group_receiving_an_filter_object()
{
$inListFilter = (new InListFilter())->setValues(["firefox","chrome"]);
$browserFilter = (new Filter())->setInListFilter($inListFilter)->setFieldName("browser");
$inListFilter = (new InListFilter())->setValues(['firefox', 'chrome']);
$browserFilter = (new Filter())->setInListFilter($inListFilter)->setFieldName('browser');
$result = $this->analytics
->whereAndGroupDimensions([
$browserFilter
$browserFilter,
//Not sure which other metric is available, but can be something like ['country', MatchType::CONTAINS, 'India']
])
->get();
Expand Down

0 comments on commit 2cf9cae

Please sign in to comment.