Skip to content

Commit 3276ca1

Browse files
committed
Initial Commit
0 parents  commit 3276ca1

File tree

11 files changed

+5317
-0
lines changed

11 files changed

+5317
-0
lines changed

.github/workflows/php.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: PHP Composer
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Validate composer.json and composer.lock
21+
run: composer validate --strict
22+
23+
- name: Cache Composer packages
24+
id: composer-cache
25+
uses: actions/cache@v3
26+
with:
27+
path: vendor
28+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
29+
restore-keys: |
30+
${{ runner.os }}-php-
31+
32+
- name: Install dependencies
33+
run: composer install --prefer-dist --no-progress
34+
35+
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
36+
# Docs: https://getcomposer.org/doc/articles/scripts.md
37+
38+
# - name: Run test suite
39+
# run: composer run-script test

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/vendor
2+
/.fleet
3+
/.idea
4+
/.vscode
5+
/.zed
6+
.DS_Store
7+
.php-cs-fixer.cache
8+
.phpunit.result.cache

.php-cs-fixer.php

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
<?php
2+
3+
use PhpCsFixer\Config;
4+
use PhpCsFixer\Finder;
5+
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
6+
7+
$finder = Finder::create()
8+
->in(__DIR__)
9+
->name('*.php')
10+
->exclude(['vendor', 'storage'])
11+
->notName('*.blade.php');
12+
13+
return (new Config())
14+
->setParallelConfig(ParallelConfigFactory::detect())
15+
->setRules([
16+
'@PSR12' => true,
17+
'array_indentation' => true,
18+
'array_syntax' => ['syntax' => 'short'],
19+
'combine_consecutive_unsets' => true,
20+
'class_attributes_separation' => ['elements' => ['method' => 'one',]],
21+
'multiline_whitespace_before_semicolons' => false,
22+
'single_quote' => true,
23+
24+
'binary_operator_spaces' => [
25+
'operators' => [
26+
'=>' => 'align',
27+
'=' => 'align',
28+
]
29+
],
30+
// 'blank_line_after_opening_tag' => true,
31+
// 'blank_line_before_statement' => true,
32+
'braces' => [
33+
'allow_single_line_closure' => true,
34+
],
35+
// 'cast_spaces' => true,
36+
// 'class_definition' => array('singleLine' => true),
37+
'concat_space' => ['spacing' => 'one'],
38+
'declare_equal_normalize' => true,
39+
'function_typehint_space' => true,
40+
'single_line_comment_style' => ['comment_types' => ['hash']],
41+
'include' => true,
42+
'lowercase_cast' => true,
43+
// 'native_function_casing' => true,
44+
// 'new_with_braces' => true,
45+
'no_blank_lines_after_class_opening' => true,
46+
// 'no_blank_lines_after_phpdoc' => true,
47+
// 'no_blank_lines_before_namespace' => true,
48+
'no_empty_comment' => true,
49+
'no_empty_phpdoc' => true,
50+
// 'no_empty_statement' => true,
51+
'no_extra_blank_lines' => [
52+
'tokens' => [
53+
'curly_brace_block',
54+
'extra',
55+
// 'parenthesis_brace_block',
56+
// 'square_brace_block',
57+
'throw',
58+
'use',
59+
]
60+
],
61+
// 'no_leading_import_slash' => true,
62+
// 'no_leading_namespace_whitespace' => true,
63+
// 'no_mixed_echo_print' => array('use' => 'echo'),
64+
'no_multiline_whitespace_around_double_arrow' => true,
65+
// 'no_short_bool_cast' => true,
66+
// 'no_singleline_whitespace_before_semicolons' => true,
67+
'no_spaces_around_offset' => true,
68+
// 'no_trailing_comma_in_list_call' => true,
69+
'no_trailing_comma_in_singleline_array' => true,
70+
// 'no_unneeded_control_parentheses' => true,
71+
// 'no_unused_imports' => true,
72+
'no_whitespace_before_comma_in_array' => true,
73+
'no_whitespace_in_blank_line' => true,
74+
// 'normalize_index_brace' => true,
75+
'object_operator_without_whitespace' => true,
76+
// 'php_unit_fqcn_annotation' => true,
77+
// 'phpdoc_align' => true,
78+
// 'phpdoc_annotation_without_dot' => true,
79+
// 'phpdoc_indent' => true,
80+
// 'phpdoc_inline_tag' => true,
81+
// 'phpdoc_no_access' => true,
82+
// 'phpdoc_no_alias_tag' => true,
83+
// 'phpdoc_no_empty_return' => true,
84+
// 'phpdoc_no_package' => true,
85+
// 'phpdoc_no_useless_inheritdoc' => true,
86+
// 'phpdoc_return_self_reference' => true,
87+
// 'phpdoc_scalar' => true,
88+
// 'phpdoc_separation' => true,
89+
// 'phpdoc_single_line_var_spacing' => true,
90+
// 'phpdoc_summary' => true,
91+
// 'phpdoc_to_comment' => true,
92+
// 'phpdoc_trim' => true,
93+
// 'phpdoc_types' => true,
94+
// 'phpdoc_var_without_name' => true,
95+
// 'increment_style' => true,
96+
// 'return_type_declaration' => true,
97+
// 'self_accessor' => true,
98+
// 'short_scalar_cast' => true,
99+
// 'single_blank_line_before_namespace' => true,
100+
// 'single_class_element_per_statement' => true,
101+
// 'space_after_semicolon' => true,
102+
// 'standardize_not_equals' => true,
103+
'ternary_operator_spaces' => true,
104+
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
105+
'trim_array_spaces' => true,
106+
'unary_operator_spaces' => true,
107+
'whitespace_after_comma_in_array' => true,
108+
'space_after_semicolon' => true,
109+
'single_blank_line_at_eof' => true
110+
])
111+
->setFinder($finder)
112+
;

0 commit comments

Comments
 (0)