Skip to content

Commit 3bcebc1

Browse files
authored
Apply fixes from StyleCI (#56)
1 parent 834c7a5 commit 3bcebc1

File tree

10 files changed

+29
-29
lines changed

10 files changed

+29
-29
lines changed

src/CommandTasks.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class CommandTasks
3434
* @param \Illuminate\Console\OutputStyle $output
3535
* @return self
3636
*/
37-
public function setOutput(OutputStyle $output) : self
37+
public function setOutput(OutputStyle $output): self
3838
{
3939
$this->output = $output;
4040

@@ -48,7 +48,7 @@ public function setOutput(OutputStyle $output) : self
4848
* @param callable $task
4949
* @return self
5050
*/
51-
public function addTask(string $name, callable $task) : self
51+
public function addTask(string $name, callable $task): self
5252
{
5353
$this->tasks[$name] = $task;
5454

@@ -62,7 +62,7 @@ public function addTask(string $name, callable $task) : self
6262
*
6363
* @throws \Honeybadger\HoneybadgerLaravel\TaskFailed
6464
*/
65-
public function runTasks() : void
65+
public function runTasks(): void
6666
{
6767
Collection::make($this->tasks)->each(function ($task, $description) {
6868
$result = $task();
@@ -87,23 +87,23 @@ public function runTasks() : void
8787
*
8888
* @return array
8989
*/
90-
public function getResults() : array
90+
public function getResults(): array
9191
{
9292
return $this->results;
9393
}
9494

9595
/**
9696
* @return bool
9797
*/
98-
public function hasFailedTasks() : bool
98+
public function hasFailedTasks(): bool
9999
{
100100
return in_array(false, $this->results);
101101
}
102102

103103
/**
104104
* @return self
105105
*/
106-
public function doNotThrowOnError() : self
106+
public function doNotThrowOnError(): self
107107
{
108108
$this->throwOnError = false;
109109

src/Commands/HoneybadgerCheckinCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function handle(Reporter $honeybadger)
4242
*
4343
* @return string
4444
*/
45-
private function apiKey() : string
45+
private function apiKey(): string
4646
{
4747
return is_array($this->argument('id'))
4848
? $this->argument('id')[0]

src/Commands/HoneybadgerDeployCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function handle()
6666
$this->info(sprintf('Deployment %s successfully sent', $params['deploy']['revision']));
6767
}
6868

69-
private function resolveParams() : array
69+
private function resolveParams(): array
7070
{
7171
$config = Config::get('honeybadger');
7272

@@ -79,7 +79,7 @@ private function resolveParams() : array
7979
];
8080
}
8181

82-
private function resolveOptions() : array
82+
private function resolveOptions(): array
8383
{
8484
return array_filter([
8585
'environment' => $this->option('environment'),
@@ -89,12 +89,12 @@ private function resolveOptions() : array
8989
]);
9090
}
9191

92-
private function gitHash() : string
92+
private function gitHash(): string
9393
{
9494
return trim(exec('git log --pretty="%h" -n1 HEAD'));
9595
}
9696

97-
private function gitRemote() : string
97+
private function gitRemote(): string
9898
{
9999
return trim(exec('git config --get remote.origin.url'));
100100
}

src/Commands/HoneybadgerInstallCommand.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function () {
8787
*
8888
* @return array
8989
*/
90-
private function gatherConfig() : array
90+
private function gatherConfig(): array
9191
{
9292
return [
9393
'api_key' => $this->argument('apiKey') ?? $this->promptForApiKey(),
@@ -99,7 +99,7 @@ private function gatherConfig() : array
9999
*
100100
* @return string
101101
*/
102-
private function promptForApiKey() : string
102+
private function promptForApiKey(): string
103103
{
104104
return $this->requiredSecret('Your API key', 'The API key is required');
105105
}
@@ -109,7 +109,7 @@ private function promptForApiKey() : string
109109
*
110110
* @return array
111111
*/
112-
private function sendTest() : array
112+
private function sendTest(): array
113113
{
114114
Config::set('honeybadger.api_key', $this->config['api_key']);
115115

@@ -134,7 +134,7 @@ function () use ($result) {
134134
*
135135
* @return void
136136
*/
137-
private function writeEnv() : void
137+
private function writeEnv(): void
138138
{
139139
$this->tasks->addTask(
140140
'Write HONEYBADGER_API_KEY to .env',
@@ -162,7 +162,7 @@ function () {
162162
*
163163
* @return bool
164164
*/
165-
public function publishConfig() : bool
165+
public function publishConfig(): bool
166166
{
167167
if (app('honeybadger.isLumen')) {
168168
return $this->installer->publishLumenConfig();
@@ -177,7 +177,7 @@ public function publishConfig() : bool
177177
* @param string $noticeId
178178
* @return void
179179
*/
180-
private function outputSuccessMessage(string $noticeId) : void
180+
private function outputSuccessMessage(string $noticeId): void
181181
{
182182
$this->line(SuccessMessage::make($noticeId));
183183
}

src/Commands/SuccessMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class SuccessMessage
1010
* @param string $noticeId
1111
* @return string
1212
*/
13-
public static function make(string $noticeId) : string
13+
public static function make(string $noticeId): string
1414
{
1515
$message = <<<'EX'
1616

src/Contracts/Installer.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,33 @@ interface Installer
1111
* @param string $filePath
1212
* @return bool
1313
*/
14-
public function writeConfig(array $config, string $filePath) : bool;
14+
public function writeConfig(array $config, string $filePath): bool;
1515

1616
/**
1717
* Publish the config file for Laravel.
1818
*
1919
* @return bool
2020
*/
21-
public function publishLaravelConfig() : bool;
21+
public function publishLaravelConfig(): bool;
2222

2323
/**
2424
* Publish the config file for Lumen.
2525
*
2626
* @return bool
2727
*/
28-
public function publishLumenConfig() : bool;
28+
public function publishLumenConfig(): bool;
2929

3030
/**
3131
* Whether the config file needs to be published or not.
3232
*
3333
* @return bool
3434
*/
35-
public function shouldPublishConfig() : bool;
35+
public function shouldPublishConfig(): bool;
3636

3737
/**
3838
* Send a test exception to Honeybadger.
3939
*
4040
* @return array
4141
*/
42-
public function sendTestException() : array;
42+
public function sendTestException(): array;
4343
}

src/Facades/Honeybadger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Honeybadger extends Facade
99
/**
1010
* @return string
1111
*/
12-
public static function getFacadeAccessor() : string
12+
public static function getFacadeAccessor(): string
1313
{
1414
return 'honeybadger';
1515
}

src/HoneybadgerLaravel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class HoneybadgerLaravel
1515
* @param array $config
1616
* @return \Honeybadger\Contracts\Reporter
1717
*/
18-
public function make($config) : Reporter
18+
public function make($config): Reporter
1919
{
2020
return Honeybadger::new(array_merge([
2121
'notifier' => [

src/Installer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Installer implements InstallerContract
1616
/**
1717
* {@inheritdoc}
1818
*/
19-
public function writeConfig(array $config, string $filePath) : bool
19+
public function writeConfig(array $config, string $filePath): bool
2020
{
2121
try {
2222
$env = new DotenvEditor;
@@ -35,7 +35,7 @@ public function writeConfig(array $config, string $filePath) : bool
3535
/**
3636
* {@inheritdoc}
3737
*/
38-
public function sendTestException() : array
38+
public function sendTestException(): array
3939
{
4040
return App::makeWith(
4141
Reporter::class,
@@ -46,7 +46,7 @@ public function sendTestException() : array
4646
/**
4747
* {@inheritdoc}
4848
*/
49-
public function publishLaravelConfig() : bool
49+
public function publishLaravelConfig(): bool
5050
{
5151
return Artisan::call('vendor:publish', [
5252
'--provider' => HoneybadgerServiceProvider::class,

tests/Commands/HoneybadgetDeployCommandTest.php

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

1010
class HoneybadgetDeployCommandTest extends TestCase
1111
{
12-
public function setUp() : void
12+
public function setUp(): void
1313
{
1414
parent::setUp();
1515

0 commit comments

Comments
 (0)