Skip to content
This repository was archived by the owner on May 17, 2021. It is now read-only.

Commit 2db0b16

Browse files
authored
Merge pull request #1 from facade/analysis-zRarVp
Apply fixes from StyleCI
2 parents b27b3e0 + 798670d commit 2db0b16

File tree

5 files changed

+30
-34
lines changed

5 files changed

+30
-34
lines changed

src/CodeEditorServiceProvider.php

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,31 @@
1010

1111
class CodeEditorServiceProvider extends ServiceProvider
1212
{
13-
14-
public function register()
15-
{
16-
if ($this->shouldRegisterFileContentsRoute()) {
17-
Route::prefix('ignition-code-editor')->group(function () {
18-
Route::get('file-contents', FileContentsController::class);
19-
Route::put('file-contents', SaveFileContentController::class);
13+
public function register()
14+
{
15+
if ($this->shouldRegisterFileContentsRoute()) {
16+
Route::prefix('ignition-code-editor')->group(function () {
17+
Route::get('file-contents', FileContentsController::class);
18+
Route::put('file-contents', SaveFileContentController::class);
2019
});
2120
}
22-
}
21+
}
2322

24-
public function boot()
25-
{
26-
Ignition::tab(new StackTraceTab);
27-
}
23+
public function boot()
24+
{
25+
Ignition::tab(new StackTraceTab);
26+
}
2827

2928
protected function shouldRegisterFileContentsRoute(): bool
3029
{
31-
if (!$this->app->environment('local')) {
30+
if (! $this->app->environment('local')) {
3231
return false;
3332
}
3433

35-
if (!config('app.debug')) {
34+
if (! config('app.debug')) {
3635
return false;
3736
}
3837

3938
return true;
4039
}
41-
42-
}
40+
}

src/Http/Controllers/Controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ protected function ensureIsPhpFile(string $file, string $contents)
2828

2929
abort_unless(Str::startsWith($contents, '<?php'), Response::HTTP_UNPROCESSABLE_ENTITY, 'Requested file does not start with `<?php`.');
3030
}
31-
}
31+
}

src/Http/Controllers/SaveFileContentController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Facade\CodeEditor\Http\Controllers;
44

5-
use Illuminate\Http\Request;
65
use Illuminate\Http\Response;
76
use Facade\CodeEditor\Http\Requests\FileContentsRequest;
87

src/Http/Requests/FileContentsRequest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
43
namespace Facade\CodeEditor\Http\Requests;
54

65
use Illuminate\Foundation\Http\FormRequest;
@@ -13,4 +12,4 @@ public function rules(): array
1312
'file' => 'required',
1413
];
1514
}
16-
}
15+
}

src/StackTraceTab.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@
77

88
class StackTraceTab extends Tab
99
{
10-
public function component(): string
11-
{
12-
return 'StackTab';
13-
}
10+
public function component(): string
11+
{
12+
return 'StackTab';
13+
}
1414

15-
public function name(): string
16-
{
17-
return 'Stack trace';
18-
}
15+
public function name(): string
16+
{
17+
return 'Stack trace';
18+
}
1919

20-
public function registerAssets()
21-
{
22-
$this->script('ignition-code-editor', __DIR__.'/../build/js/tab.js');
23-
}
20+
public function registerAssets()
21+
{
22+
$this->script('ignition-code-editor', __DIR__.'/../build/js/tab.js');
23+
}
2424

2525
public function meta(): array
2626
{
2727
return [
2828
'fileContentsEndpoint' => action([FileContentsController::class]),
2929
];
30-
}
31-
}
30+
}
31+
}

0 commit comments

Comments
 (0)