Skip to content

Commit b5aad5f

Browse files
Update deps, add php-cs-fix config (#56)
* Added .php-cs-fixer.dist.php file to configure PHP-CS-Fixer rules and ignore certain paths and files. Updated composer.json to include the spatie/crawler package as a dependency. * Fix styling * Fix styling * Renamed the file to and removed from the file. These changes were made to improve the organization of the project and to exclude unnecessary files from version control. --------- Co-authored-by: thejmitchener <[email protected]>
1 parent fb7e044 commit b5aad5f

10 files changed

+243
-259
lines changed

.github/ISSUE_TEMPLATE/bug.yml

-66
This file was deleted.
File renamed without changes.

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.idea
22
.phpunit.cache
33
build
4-
composer.lock
54
coverage
65
docs
76
phpunit.xml

.php-cs-fixer.cache

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"php":"8.3.15","version":"3.66.2","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"braces_position":true,"class_definition":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline","keep_multiple_spaces_after_comma":true},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"single_space_around_construct":{"constructs_followed_by_a_single_space":["abstract","as","case","catch","class","do","else","elseif","final","for","foreach","function","if","interface","namespace","private","protected","public","static","switch","trait","try","use_lambda","while"],"constructs_preceded_by_a_single_space":["as","else","elseif","use_lambda"]},"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":{"elements":["method","property"]},"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"ordered_imports":{"sort_algorithm":"alpha"},"no_unused_imports":true,"not_operator_with_successor_space":true,"trailing_comma_in_multiline":true,"phpdoc_scalar":true,"unary_operator_spaces":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["break","continue","declare","return","throw","try"]},"phpdoc_single_line_var_spacing":true,"phpdoc_var_without_name":true,"class_attributes_separation":{"elements":{"method":"one"}},"single_trait_insert_per_statement":true},"hashes":{"src\/Http\/Controllers\/SitemapController.php":"c89aa04af77006a7b9a32e99b15fbf14","src\/SitemapServiceProvider.php":"6607143f7515cae2512968b0db1525fa","src\/Commands\/SitemapGenerateCommand.php":"fe5aae683f839425311f5fb74766c69f","src\/Sitemap.php":"0e7262b324e2205e1661ad67adab541e","tests\/Feature\/Command\/SitemapGenerateCommandTest.php":"2616351921baf1a0effcc6d241dc5614","tests\/Feature\/SitemapNotFoundExceptionTest.php":"0ecc5116b8eb3083e35a46c032ab18e8","tests\/Pest.php":"8eff0d57a2a1bddf445db734b52ab59b","tests\/ArchTest.php":"3ee5b69122c072917aa2cac591256b77","tests\/TestCase.php":"e95a12322a76363a860c0b19f3088003"}}

.php-cs-fixer.dist.php

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
3+
$finder = Symfony\Component\Finder\Finder::create()
4+
->notPath('bootstrap/*')
5+
->notPath('storage/*')
6+
->notPath('resources/view/mail/*')
7+
->in([
8+
__DIR__ . '/src',
9+
__DIR__ . '/tests',
10+
])
11+
->name('*.php')
12+
->notName('*.blade.php')
13+
->ignoreDotFiles(true)
14+
->ignoreVCS(true);
15+
16+
return (new PhpCsFixer\Config())
17+
->setRules([
18+
'@PSR2' => true,
19+
'array_syntax' => ['syntax' => 'short'],
20+
'ordered_imports' => ['sort_algorithm' => 'alpha'],
21+
'no_unused_imports' => true,
22+
'not_operator_with_successor_space' => true,
23+
'trailing_comma_in_multiline' => true,
24+
'phpdoc_scalar' => true,
25+
'unary_operator_spaces' => true,
26+
'binary_operator_spaces' => true,
27+
'blank_line_before_statement' => [
28+
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
29+
],
30+
'phpdoc_single_line_var_spacing' => true,
31+
'phpdoc_var_without_name' => true,
32+
'class_attributes_separation' => [
33+
'elements' => [
34+
'method' => 'one',
35+
],
36+
],
37+
'method_argument_space' => [
38+
'on_multiline' => 'ensure_fully_multiline',
39+
'keep_multiple_spaces_after_comma' => true,
40+
],
41+
'single_trait_insert_per_statement' => true,
42+
])
43+
->setFinder($finder);

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"require": {
2424
"php": "^8.2",
2525
"spatie/laravel-package-tools": "^1.14.0",
26-
"spatie/laravel-sitemap": "^7.2"
26+
"spatie/laravel-sitemap": "^7.2",
27+
"spatie/crawler": "^8.4.0"
2728
},
2829
"require-dev": {
2930
"laravel/pint": "^1.0",

0 commit comments

Comments
 (0)