Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Commit 787dcd8

Browse files
committed
update format style
1 parent 8c2e6f2 commit 787dcd8

File tree

11 files changed

+39
-40
lines changed

11 files changed

+39
-40
lines changed

.styleci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
preset: psr12
1+
preset: laravel

common/helpers.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66
/**
77
* Returns laravel-generator composer dist path.
88
*
9-
* @param string|null $asset string
9+
* @param string|null $asset string
1010
*
1111
* @return string
1212
*/
1313
function laravel_generator_dist_path(string $asset = null): string
1414
{
15-
$defaultPath = config('laravel-generator.defaults.paths.ui_package_path') . '/dist/';
15+
$defaultPath = config('laravel-generator.defaults.paths.ui_package_path').'/dist/';
1616
$path = base_path(config('laravel-generator.defaults.paths.laravel_generator_assets_path', $defaultPath));
1717

1818
if (!$asset) {
1919
return realpath($path);
2020
}
2121

22-
return realpath($path . $asset);
22+
return realpath($path.$asset);
2323
}
2424
}
2525

@@ -43,7 +43,7 @@ function laravel_generator_asset(string $asset): string
4343

4444
$useAbsolutePath = config('laravel-generator.defaults.paths.use_absolute_path', true);
4545

46-
return route('laravel_generator.asset', ['asset' => $asset], $useAbsolutePath) . '?v=' . filemtime($file);
46+
return route('laravel_generator.asset', ['asset' => $asset], $useAbsolutePath).'?v='.filemtime($file);
4747
}
4848
}
4949

resources/views/layouts/app.blade.php

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
@yield('title', config('laravel-generator.app_name', __('laravel-generator::generator.app_name')))
1111
</title>
1212
<!-- Fonts and icons -->
13-
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900|Roboto+Slab:400,700"/>
13+
<link rel="stylesheet" type="text/css"
14+
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900|Roboto+Slab:400,700"/>
1415

1516
<!-- Font Awesome Icons -->
1617
<script src="https://kit.fontawesome.com/42d5adcbca.js" crossorigin="anonymous"></script>
@@ -21,17 +22,17 @@
2122
</head>
2223

2324
<body class="g-sidenav-show bg-gray-200">
24-
@include('laravel-generator::shared.left_bar')
25+
@include('laravel-generator::shared.left_bar')
2526

26-
<div class="main-content position-relative max-height-vh-100 h-100">
27-
<!-- Navbar -->
28-
@include('laravel-generator::shared.navbar')
29-
<!-- End Navbar -->
27+
<div class="main-content position-relative max-height-vh-100 h-100">
28+
<!-- Navbar -->
29+
@include('laravel-generator::shared.navbar')
30+
<!-- End Navbar -->
3031

31-
@yield('laravel-generator-content')
32-
</div>
32+
@yield('laravel-generator-content')
33+
</div>
3334

34-
@include('laravel-generator::shared.configurator_settings')
35+
@include('laravel-generator::shared.configurator_settings')
3536

36-
@include('laravel-generator::shared.footer')
37-
</body>
37+
@include('laravel-generator::shared.footer')
38+
</body>

src/Exceptions/LaravelGeneratorException.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
class LaravelGeneratorException extends Exception
88
{
99
/**
10-
* @param string $message
11-
* @param int $code
12-
* @param Exception|null $previous
10+
* @param string $message
11+
* @param int $code
12+
* @param Exception|null $previous
1313
*/
1414
public function __construct(string $message = '', int $code = 0, Exception $previous = null)
1515
{

src/Helpers/ConfigHelper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class ConfigHelper
99
/**
1010
* Get config
1111
*
12-
* @param string|null $generatorName
12+
* @param string|null $generatorName
1313
*
1414
* @return array
1515
* @throws LaravelGeneratorException
@@ -33,8 +33,8 @@ public function generatorConfig(?string $generatorName = null): array
3333
/**
3434
* Merge config
3535
*
36-
* @param array $defaults
37-
* @param array $generatorName
36+
* @param array $defaults
37+
* @param array $generatorName
3838
*
3939
* @return array
4040
*/
@@ -60,7 +60,7 @@ private function mergeConfig(array $defaults, array $generatorName): array
6060
/**
6161
* Check is associative key array
6262
*
63-
* @param mixed $key
63+
* @param mixed $key
6464
*
6565
* @return bool
6666
*/

src/Http/Controllers/Asset/AssetController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class AssetController extends BaseController
1313
{
1414
/**
15-
* @param Request $request
15+
* @param Request $request
1616
*
1717
* @return string
1818
*/

src/Http/Controllers/Detect/DetectController.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ public function getClassFromFile($file)
2727
}
2828

2929
$namespace = $matches[1];
30-
$class = $namespace . '\\' . $matches[2];
30+
$class = $namespace.'\\'.$matches[2];
3131

3232
return class_exists($class) ? new ReflectionClass($class) : null;
3333
}
3434

3535
/**
36-
* @param ReflectionClass $class
36+
* @param ReflectionClass $class
3737
*
3838
* @return bool
3939
*/
@@ -51,7 +51,7 @@ private function dependsOnModels(ReflectionClass $class)
5151
/**
5252
* Check if the class implements the CRUD methods
5353
*
54-
* @param ReflectionClass $class
54+
* @param ReflectionClass $class
5555
*
5656
* @return bool
5757
*/
@@ -80,7 +80,7 @@ protected function implementsCrudMethods(ReflectionClass $class)
8080
* and implement the CRUD methods
8181
* and have a dependency on a model
8282
*
83-
* @param ReflectionClass $class
83+
* @param ReflectionClass $class
8484
*
8585
* @return bool
8686
*/
@@ -93,7 +93,7 @@ public function isRepositoryClass(ReflectionClass $class)
9393
* Check if the class is a service class
9494
* A service class must have a name ending with "Service" or "EloquentService"
9595
*
96-
* @param ReflectionClass $class
96+
* @param ReflectionClass $class
9797
*
9898
* @return bool
9999
*/
@@ -108,7 +108,7 @@ public function isServiceClass(ReflectionClass $class)
108108
* and implement the CRUD methods
109109
* and have a dependency on a model
110110
*
111-
* @param ReflectionClass $class
111+
* @param ReflectionClass $class
112112
*
113113
* @return bool
114114
*/
@@ -121,7 +121,7 @@ public function isControllerClass(ReflectionClass $class)
121121
* Check if the class is an action class
122122
* An action class must have a name ending with "Action" or "EloquentAction"
123123
*
124-
* @param ReflectionClass $class
124+
* @param ReflectionClass $class
125125
*
126126
* @return bool
127127
*/
@@ -134,24 +134,24 @@ public function isActionClass(ReflectionClass $class)
134134
* Check if the class is a class of the given type
135135
* A class of the given type must have a name ending with the given type or "Eloquent" + the given type
136136
*
137-
* @param ReflectionClass $class
137+
* @param ReflectionClass $class
138138
* @param $type
139139
*
140140
* @return bool
141141
*/
142142
protected function checkClassType(ReflectionClass $class, $type)
143143
{
144144
$type = ucfirst($type);
145-
return preg_match('/' . $type . '$/', $class->getName()) === 1
146-
|| preg_match('/Eloquent' . $type . '$/', $class->getName()) === 1
145+
return preg_match('/'.$type.'$/', $class->getName()) === 1
146+
|| preg_match('/Eloquent'.$type.'$/', $class->getName()) === 1
147147
&& $this->implementsCrudMethods($class)
148148
&& $this->dependsOnModels($class);
149149
}
150150

151151
/**
152152
* Get the type of the given class
153153
*
154-
* @param ReflectionClass $class
154+
* @param ReflectionClass $class
155155
*
156156
* @return string
157157
*/

src/Http/Controllers/Generator/GeneratorController.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
namespace Lbil\LaravelGenerator\Http\Controllers\Generator;
44

5-
use Illuminate\Http\Request;
65
use Illuminate\Routing\Controller;
7-
use Illuminate\Support\Facades\DB;
86

97
class GeneratorController extends Controller
108
{

src/Http/Controllers/Generator/RepositoryGeneratorController.php

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

33
namespace Lbil\LaravelGenerator\Http\Controllers\Generator;
44

5-
use Str;
5+
use Illuminate\Support\Str;
66
use Lbil\LaravelGenerator\Http\Controllers\Detect\DetectController;
77
use Lbil\LaravelGenerator\Http\Requests\Generator\RepositoryGeneratorRequest;
88

src/Http/Controllers/LaravelGeneratorController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class LaravelGeneratorController extends Controller
1313
{
1414
/**
15-
* @param Request $request
15+
* @param Request $request
1616
*
1717
* @return Application|Factory|View
1818
*/

0 commit comments

Comments
 (0)