Skip to content

Commit 529322c

Browse files
authored
New Pint configuration (#16)
* Improve Pint configuration * Fix code-style with new Pint configuration
1 parent 74ff617 commit 529322c

46 files changed

Lines changed: 141 additions & 8 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pint.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"preset": "laravel",
3+
"notPath": [
4+
"app/Services/HtmlMinifier.php"
5+
],
6+
"rules": {
7+
"align_multiline_comment": true,
8+
"array_indentation": true,
9+
"array_syntax": true,
10+
"blank_line_after_namespace": true,
11+
"blank_line_after_opening_tag": true,
12+
"combine_consecutive_issets": true,
13+
"combine_consecutive_unsets": true,
14+
"concat_space": true,
15+
"declare_parentheses": true,
16+
"declare_strict_types": true,
17+
"explicit_string_variable": false,
18+
"final_class": false,
19+
"final_internal_class": false,
20+
"fully_qualified_strict_types": true,
21+
"global_namespace_import": {
22+
"import_classes": true,
23+
"import_constants": true,
24+
"import_functions": true
25+
},
26+
"is_null": true,
27+
"lambda_not_used_import": true,
28+
"logical_operators": true,
29+
"mb_str_functions": true,
30+
"method_chaining_indentation": true,
31+
"modernize_strpos": true,
32+
"new_with_braces": true,
33+
"no_empty_comment": true,
34+
"not_operator_with_space": true,
35+
"ordered_traits": true,
36+
"protected_to_private": true,
37+
"simplified_if_return": true,
38+
"strict_comparison": true,
39+
"ternary_to_null_coalescing": true,
40+
"trim_array_spaces": true,
41+
"use_arrow_functions": true,
42+
"void_return": true,
43+
"yoda_style": true
44+
}
45+
}

src/ArkitectServiceProvider.php

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

3+
declare(strict_types=1);
4+
35
namespace Mortexa\LaravelArkitect;
46

57
use Illuminate\Support\ServiceProvider;

src/Console/MakeArkitectRule.php

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

3+
declare(strict_types=1);
4+
35
namespace Mortexa\LaravelArkitect\Console;
46

57
use Illuminate\Console\GeneratorCommand;

src/Console/TestArchitecture.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Mortexa\LaravelArkitect\Console;
46

57
use Illuminate\Console\Command;
@@ -27,7 +29,7 @@ public function handle(): int
2729
$process = Process::fromShellCommandline($command);
2830
$process->setTimeout(60);
2931
$process->setTty(Process::isTtySupported());
30-
$process->run(function ($type, $line) use (&$process) {
32+
$process->run(function ($type, $line) use (&$process): void {
3133
match ($type) {
3234
$process::ERR => $this->line($line),
3335
default => $this->info($line)

src/Contracts/RuleContract.php

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

3+
declare(strict_types=1);
4+
35
namespace Mortexa\LaravelArkitect\Contracts;
46

57
use Arkitect\Rules\DSL\ArchRule;

src/CreateApplication.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Mortexa\LaravelArkitect;
46

57
use Illuminate\Contracts\Console\Kernel;
@@ -11,7 +13,7 @@ class CreateApplication
1113

1214
public static function app()
1315
{
14-
if (! is_null(static::$app)) {
16+
if (null !== static::$app) {
1517
return static::$app;
1618
}
1719

src/RuleLoader.php

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

3+
declare(strict_types=1);
4+
35
namespace Mortexa\LaravelArkitect;
46

57
use Illuminate\Support\Arr;

src/Rules/BaseRule.php

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

3+
declare(strict_types=1);
4+
35
namespace Mortexa\LaravelArkitect\Rules;
46

57
use Arkitect\ClassSet;

src/Rules/Extending/CommandsExtending.php

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

3+
declare(strict_types=1);
4+
35
namespace Mortexa\LaravelArkitect\Rules\Extending;
46

57
use Arkitect\Expression\ForClasses\Extend;

src/Rules/Extending/ControllersExtending.php

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

3+
declare(strict_types=1);
4+
35
namespace Mortexa\LaravelArkitect\Rules\Extending;
46

57
use Arkitect\Expression\ForClasses\Extend;

0 commit comments

Comments
 (0)