Skip to content

Commit d54e40e

Browse files
committedApr 30, 2020
fix(command): update nuxt-laravel dependency and make package scripts unique
1 parent 4765d5b commit d54e40e

File tree

8 files changed

+790
-218
lines changed

8 files changed

+790
-218
lines changed
 

‎.php_cs

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->notPath('vendor')
5+
->notPath('node_modules')
6+
->notPath('bootstrap/cache')
7+
->notPath('resources/nuxt')
8+
->notPath('public')
9+
->notPath('storage')
10+
->notPath('.vagrant')
11+
->notName('_ide_helper.php')
12+
->notName('_ide_helper_models.php')
13+
->in(__DIR__)
14+
->name('*.php')
15+
->notName('*.blade.php')
16+
->ignoreDotFiles(true)
17+
->ignoreVCS(true)
18+
;
19+
20+
return PhpCsFixer\Config::create()
21+
->registerCustomFixers(new PedroTroller\CS\Fixer\Fixers())
22+
->setRules([
23+
'@Symfony' => true,
24+
'cast_spaces' => [
25+
'space' => 'none',
26+
],
27+
'binary_operator_spaces' => [
28+
'default' => 'single_space',
29+
'operators' => ['=>' => 'align_single_space'],
30+
],
31+
'ordered_imports' => [
32+
'imports_order' => ['class', 'function', 'const'],
33+
'sort_algorithm' => 'alpha',
34+
],
35+
'array_syntax' => ['syntax' => 'short'],
36+
'array_indentation' => true,
37+
'linebreak_after_opening_tag' => true,
38+
'phpdoc_order' => true,
39+
// Custom fixer config
40+
'PedroTroller/ordered_with_getter_and_setter_first' => true,
41+
'PedroTroller/line_break_between_statements' => true,
42+
'PedroTroller/comment_line_to_phpdoc_block' => true,
43+
'PedroTroller/forbidden_functions' => ['comment' => '@TODO: remove'],
44+
'PedroTroller/line_break_between_method_arguments' => [
45+
'max-args' => 4,
46+
'max-length' => 120,
47+
'automatic-argument-merge' => true,
48+
],
49+
])
50+
->setFinder($finder)
51+
;

‎.php_cs.cache

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"php":"7.2.30-1+ubuntu19.10.1+deb.sury.org+1","version":"2.16.3:v2.16.3#83baf823a33a1cbd5416c8626935cf3f843c10b0","indent":" ","lineEnding":"\n","rules":{"array_syntax":{"syntax":"short"},"binary_operator_spaces":{"default":"single_space","operators":{"=>":"align_single_space"}},"blank_line_after_opening_tag":true,"blank_line_before_statement":{"statements":["return"]},"braces":{"allow_single_line_closure":true},"cast_spaces":{"space":"none"},"class_attributes_separation":{"elements":["method"]},"class_definition":{"single_line":true},"concat_space":true,"declare_equal_normalize":true,"function_typehint_space":true,"include":true,"increment_style":true,"lowercase_cast":true,"lowercase_static_reference":true,"magic_constant_casing":true,"magic_method_casing":true,"method_argument_space":true,"native_function_casing":true,"native_function_type_declaration_casing":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_blank_lines_after_phpdoc":true,"no_empty_comment":true,"no_empty_phpdoc":true,"no_empty_statement":true,"no_extra_blank_lines":{"tokens":["curly_brace_block","extra","parenthesis_brace_block","square_brace_block","throw","use"]},"no_leading_import_slash":true,"no_leading_namespace_whitespace":true,"no_mixed_echo_print":true,"no_multiline_whitespace_around_double_arrow":true,"no_short_bool_cast":true,"no_singleline_whitespace_before_semicolons":true,"no_spaces_around_offset":true,"no_superfluous_phpdoc_tags":{"allow_mixed":true,"allow_unused_params":true},"no_trailing_comma_in_list_call":true,"no_trailing_comma_in_singleline_array":true,"no_unneeded_control_parentheses":true,"no_unneeded_curly_braces":{"namespaces":true},"no_unused_imports":true,"no_whitespace_before_comma_in_array":true,"no_whitespace_in_blank_line":true,"normalize_index_brace":true,"object_operator_without_whitespace":true,"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"alpha"},"php_unit_fqcn_annotation":true,"phpdoc_align":{"tags":["method","param","property","return","throws","type","var"]},"phpdoc_annotation_without_dot":true,"phpdoc_indent":true,"phpdoc_inline_tag":true,"phpdoc_no_access":true,"phpdoc_no_alias_tag":true,"phpdoc_no_package":true,"phpdoc_no_useless_inheritdoc":true,"phpdoc_return_self_reference":true,"phpdoc_scalar":true,"phpdoc_separation":true,"phpdoc_single_line_var_spacing":true,"phpdoc_summary":true,"phpdoc_to_comment":true,"phpdoc_trim":true,"phpdoc_trim_consecutive_blank_line_separation":true,"phpdoc_types":true,"phpdoc_types_order":{"null_adjustment":"always_last","sort_algorithm":"none"},"phpdoc_var_without_name":true,"return_type_declaration":true,"semicolon_after_instruction":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_class_element_per_statement":true,"single_line_comment_style":{"comment_types":["hash"]},"single_line_throw":true,"single_quote":true,"single_trait_insert_per_statement":true,"space_after_semicolon":{"remove_in_empty_for_expressions":true},"standardize_increment":true,"standardize_not_equals":true,"ternary_operator_spaces":true,"trailing_comma_in_multiline_array":true,"trim_array_spaces":true,"unary_operator_spaces":true,"whitespace_after_comma_in_array":true,"yoda_style":true,"blank_line_after_namespace":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"no_break_comment":true,"no_closing_tag":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true,"array_indentation":true,"linebreak_after_opening_tag":true,"phpdoc_order":true,"PedroTroller\/ordered_with_getter_and_setter_first":true,"PedroTroller\/line_break_between_statements":true,"PedroTroller\/comment_line_to_phpdoc_block":true,"PedroTroller\/forbidden_functions":{"comment":"@TODO: remove"},"PedroTroller\/line_break_between_method_arguments":{"max-args":4,"max-length":120,"automatic-argument-merge":true}},"hashes":{"routes\/nuxt.php":2686990015,"config\/nuxt.php":513523166,"src\/Http\/Controllers\/NuxtController.php":3245259725,"src\/Console\/Commands\/InstallCommand.php":3948397049,"src\/LaravelNuxtServiceProvider.php":1881323117,"src\/Facades\/Nuxt.php":2080118913}}

‎composer.json

+20-2
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,31 @@
2525
},
2626
"minimum-stability": "dev",
2727
"prefer-stable": true,
28+
"scripts": {
29+
"lint:php-cs-fixer": "php-cs-fixer fix --dry-run --diff --ansi",
30+
"lint:phpcs": "phpcs . --colors",
31+
"lint:phpmd": "phpmd . ansi phpmd.xml",
32+
"lint": [
33+
"@lint:php-cs-fixer",
34+
"@lint:phpcs",
35+
"@lint:phpmd"
36+
],
37+
"lint:fix": [
38+
"php-cs-fixer fix --ansi",
39+
"phpcbf . --colors"
40+
],
41+
"lint:staged": "grumphp run --ansi"
42+
},
2843
"require": {
29-
"laravel/framework": "^7.0"
44+
"laravel/framework": "^7.0",
45+
"friendsofphp/php-cs-fixer": "^2.16",
46+
"pedrotroller/php-cs-custom-fixer": "^2.21"
3047
},
3148
"require-dev": {
3249
"phpmd/phpmd": "^2.8",
3350
"squizlabs/php_codesniffer": "^3.5",
34-
"phpro/grumphp": "^0.18.0"
51+
"phpro/grumphp": "^0.18.0",
52+
"illuminate/support": "^7.0"
3553
},
3654
"autoload": {
3755
"psr-4": {

0 commit comments

Comments
 (0)