Skip to content

Commit 9310498

Browse files
author
Felix
committed
styling fixes
1 parent 7e86cb4 commit 9310498

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/Commands/GenerateRefreshTokenCommand.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function handle()
4141
{
4242
if (!$config = $this->config()) {
4343
$this->error('Please provide a valid configuration.');
44-
exit;
44+
return false;
4545
}
4646

4747
$clientId = $config['client_id'];
@@ -56,29 +56,32 @@ public function handle()
5656
'clientSecret' => $clientSecret,
5757
'scope' => $scopes
5858
]);
59+
5960
$this->info("Please sign in to your AdWords account, and open following url:\n");
6061
$this->line(sprintf(
6162
"%s",
6263
$oauth2->buildFullAuthorizationUri([
6364
'access_type' => 'offline',
6465
])
6566
));
66-
// Retrieve token
67+
6768
$accessToken = $this->ask('Insert your access token');
68-
// Fetch auth token
69+
6970
try {
7071
$oauth2->setCode($accessToken);
7172
$authToken = $oauth2->fetchAuthToken();
7273
} catch (Exception $exception) {
7374
$this->error($exception->getMessage());
74-
exit;
75+
return false;
7576
}
77+
7678
if (!isset($authToken)) {
7779
$this->error('Error fetching the refresh token');
78-
exit;
80+
return false;
7981
}
82+
8083
$this->comment('Insert the refresh token in your adwords configuration file (config/adwords-targeting-idea-service.php)');
81-
// Print refresh token
84+
8285
$this->info(sprintf(
8386
'Refresh token: "%s"',
8487
$authToken['refresh_token']

src/config/adwords-targeting-idea-service.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
/*
5353
|--------------------------------------------------------------------------
54-
| LOGGING
54+
| Logging - Level
5555
|--------------------------------------------------------------------------
5656
|
5757
| http://www.php-fig.org/psr/psr-3/#psrlogloglevel

0 commit comments

Comments
 (0)