diff --git a/.editorconfig b/.editorconfig index 5edacdb..7d4299e 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,7 +2,7 @@ root = true [*] -indent_style = tab +indent_style = space indent_size = 4 #end_of_line = lf charset = utf-8 diff --git a/src/Matomo.php b/src/Matomo.php index b7edacd..f597da1 100644 --- a/src/Matomo.php +++ b/src/Matomo.php @@ -482,10 +482,10 @@ private function _request(string $method, array $params = [], array $optional = $req = Request::get($url); if ($this->_verifySsl) { - $req->enableStrictSSL(); - } else { - $req->disableStrictSSL(); - } + $req->enableStrictSSL(); + } else { + $req->disableStrictSSL(); + } $req->followRedirects($this->_maxRedirects); $req->withTimeout(5); @@ -552,9 +552,9 @@ private function _parseUrl(string $method, array $params = []) ] + $params; foreach ($params as $key => $value) { - if(is_array($value)){ - $params[$key] = urlencode(implode(',',$value)); - }else{ + if (is_array($value)) { + $params[$key] = urlencode(implode(',', $value)); + } else { $params[$key] = urlencode($value); } } @@ -563,7 +563,7 @@ private function _parseUrl(string $method, array $params = []) $params = $params + [ 'date' => $this->_rangeStart . ',' . $this->_rangeEnd, ]; - } elseif (!empty($this->_date)) { + } else if (!empty($this->_date)) { $params = $params + [ 'date' => $this->_date, ]; @@ -623,7 +623,6 @@ private function _parseResponse(Response $response) switch ($this->_format) { case self::FORMAT_JSON: return json_decode($response, $this->_isJsonDecodeAssoc); - break; default: return $response; } @@ -3851,7 +3850,7 @@ public function getSitesFromGroup($group, array $optional = []) /** * Get all site groups. - * Requires superuser access. + * Requires superuser access. * * @param array $optional * @return bool|object @@ -4016,6 +4015,7 @@ public function getSiteSettings() * Requires Super User access. * * The website is defined by a name and an array of URLs. + * * @param string $siteName Site name * @param string $urls Comma separated list of urls * @param string $ecommerce Is Ecommerce Reporting enabled for this website? @@ -4027,7 +4027,8 @@ public function getSiteSettings() * @param string $timezone Timezone string, eg. 'Europe/London' * @param string $currency Currency, eg. 'EUR' * @param string $group Website group identifier - * @param string $startDate Date at which the statistics for this website will start. Defaults to today's date in YYYY-MM-DD format + * @param string $startDate Date at which the statistics for this website will start. Defaults to today's date in + * YYYY-MM-DD format * @param string $excludedUserAgents * @param string $keepURLFragments If 1, URL fragments will be kept when tracking. If 2, they * will be removed. If 0, the default global behavior will be used.