Skip to content

Commit 1d84a44

Browse files
author
Konstantin Lapkovsky
committed
Revert "style: correct code style."
This reverts commit ecafd32.
1 parent ecafd32 commit 1d84a44

File tree

12 files changed

+167
-153
lines changed

12 files changed

+167
-153
lines changed

src/AutoDocServiceProvider.php

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

88
class AutoDocServiceProvider extends ServiceProvider
99
{
10-
public function boot(): void
10+
public function boot()
1111
{
1212
$this->mergeConfigFrom(__DIR__ . '/../config/auto-doc.php', 'auto-doc');
1313

src/Drivers/BaseDriver.php

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

77
abstract class BaseDriver implements SwaggerDriverInterface
88
{
9-
protected string $tempFilePath;
9+
protected $tempFilePath;
1010

1111
public function __construct()
1212
{

src/Drivers/LocalDriver.php

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

88
class LocalDriver extends BaseDriver
99
{
10-
protected string $prodFilePath;
10+
protected $prodFilePath;
1111

1212
public function __construct()
1313
{

src/Drivers/RemoteDriver.php

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

88
class RemoteDriver extends BaseDriver
99
{
10-
protected string $key;
11-
protected string $remoteUrl;
10+
protected $key;
11+
protected $remoteUrl;
1212

1313
public function __construct()
1414
{

src/Drivers/StorageDriver.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
namespace RonasIT\Support\AutoDoc\Drivers;
44

55
use Illuminate\Contracts\Filesystem\FileNotFoundException;
6-
use Illuminate\Contracts\Filesystem\Filesystem;
76
use Illuminate\Support\Facades\Storage;
87
use RonasIT\Support\AutoDoc\Exceptions\MissedProductionFilePathException;
98

109
class StorageDriver extends BaseDriver
1110
{
12-
protected Filesystem $disk;
13-
protected string $prodFilePath;
11+
protected $disk;
12+
protected $prodFilePath;
1413

1514
public function __construct()
1615
{

src/Http/Controllers/AutoDocController.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,30 @@
22

33
namespace RonasIT\Support\AutoDoc\Http\Controllers;
44

5-
use Illuminate\Contracts\View\View;
6-
use Illuminate\Http\JsonResponse;
75
use Illuminate\Http\Request;
8-
use Illuminate\Http\Response;
96
use Illuminate\Routing\Controller as BaseController;
107
use RonasIT\Support\AutoDoc\Services\SwaggerService;
118
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
129

1310
class AutoDocController extends BaseController
1411
{
15-
protected SwaggerService $service;
16-
protected string $documentationViewer;
12+
protected $service;
13+
protected $documentationViewer;
1714

1815
public function __construct()
1916
{
2017
$this->service = app(SwaggerService::class);
2118
$this->documentationViewer = config('auto-doc.documentation_viewer');
2219
}
2320

24-
public function documentation(): JsonResponse
21+
public function documentation()
2522
{
2623
$documentation = $this->service->getDocFileContent();
2724

2825
return response()->json($documentation);
2926
}
3027

31-
public function index(): View|Response
28+
public function index()
3229
{
3330
$currentEnvironment = config('app.env');
3431

@@ -39,7 +36,7 @@ public function index(): View|Response
3936
return response('Forbidden.', 403);
4037
}
4138

42-
public function getFile(Request $request, $file): Response
39+
public function getFile(Request $request, $file)
4340
{
4441
$filePath = __DIR__ . "/../../../resources/assets/{$this->documentationViewer}/" . $file;
4542

src/Http/Middleware/AutoDocMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function handle($request, Closure $next)
1616
{
1717
$response = $next($request);
1818

19-
if ((config('app.env') === 'testing') && !self::$skipped && !empty($request->route())) {
19+
if ((config('app.env') == 'testing') && !self::$skipped && !empty($request->route())) {
2020
app(SwaggerService::class)->addData($request, $response);
2121
}
2222

src/Interfaces/SwaggerDriverInterface.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,20 @@ interface SwaggerDriverInterface
66
{
77
/**
88
* Save temporary data
9+
*
10+
* @param array $data
911
*/
10-
public function saveTmpData(array $data): void;
12+
public function saveTmpData($data);
1113

1214
/**
1315
* Get temporary data
1416
*/
15-
public function getTmpData(): void;
17+
public function getTmpData();
1618

1719
/**
1820
* Save production data
1921
*/
20-
public function saveData(): void;
22+
public function saveData();
2123

2224
/**
2325
* Get production documentation

0 commit comments

Comments
 (0)