Skip to content

Commit 3595761

Browse files
author
Felix
committed
code and style fixes
1 parent d008b5e commit 3595761

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/Period.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@
22

33
namespace SchulzeFelix\SearchConsole;
44

5-
use DateTime;
65
use Carbon\Carbon;
76
use SchulzeFelix\SearchConsole\Exceptions\InvalidPeriod;
87

98
class Period
109
{
11-
/** @var \DateTime */
10+
/** @var Carbon */
1211
public $startDate;
1312

14-
/** @var \DateTime */
13+
/** @var Carbon */
1514
public $endDate;
1615

17-
public static function create(DateTime $startDate, $endDate): Period
16+
public static function create(Carbon $startDate, Carbon $endDate): Period
1817
{
1918
return new static($startDate, $endDate);
2019
}
@@ -34,7 +33,7 @@ public static function days(int $numberOfDays): Period
3433
return new static($startDate, $endDate);
3534
}
3635

37-
public function __construct(DateTime $startDate, DateTime $endDate)
36+
public function __construct(Carbon $startDate, Carbon $endDate)
3837
{
3938
if ($startDate > $endDate) {
4039
throw InvalidPeriod::startDateCannotBeAfterEndDate($startDate, $endDate);

src/SearchConsoleClient.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ public function performQuery($siteUrl, $rows, $request): Collection
6565
*/
6666

6767
$uniqueHash = md5(str_random());
68+
$item = [];
69+
6870
if (count($row->getKeys())) {
6971
$item = array_combine($request->getDimensions(), $row->getKeys());
7072
$uniqueHash = md5(implode('', $row->getKeys()) . $request->getSearchType());

src/SearchConsoleClientFactory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ private static function configureGzip(Google_Client $client, $application_name)
5050
{
5151
$client->setApplicationName($application_name . ' (gzip)');
5252

53+
$options = [];
5354
$options['base_uri'] = Google_Client::API_BASE_PATH;
5455
$options['headers'] = [
5556
'User-Agent' => $application_name . ' (gzip)',

0 commit comments

Comments
 (0)