Skip to content

Commit e4d0b81

Browse files
committed
feat: ✨ 建立ApiResponseBuilder與Trait
0 parents  commit e4d0b81

File tree

7 files changed

+4274
-0
lines changed

7 files changed

+4274
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/vendor/

.php-cs-fixer.php

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
$rules = [
4+
'@Symfony' => true,
5+
'whitespace_after_comma_in_array' => ['ensure_single_space' => true],
6+
'cast_spaces' => ['space' => 'none'],
7+
'ordered_class_elements' => true,
8+
// 'method_argument_space' => true,
9+
'list_syntax' => true,
10+
'no_useless_return' => true,
11+
'explicit_string_variable' => true,
12+
'yoda_style' => false,
13+
'no_useless_else' => true,
14+
'global_namespace_import' => true,
15+
'combine_consecutive_unsets' => true,
16+
'declare_equal_normalize' => ['space' => 'single'],
17+
'concat_space' => ['spacing' => 'one'],
18+
'ternary_to_null_coalescing' => true,
19+
'multiline_whitespace_before_semicolons' => true,
20+
'array_indentation' => true,
21+
'blank_line_before_statement' => true,
22+
'method_chaining_indentation' => true,
23+
'phpdoc_to_comment' => false,
24+
'phpdoc_var_annotation_correct_order' => true,
25+
26+
// 'phpdoc_add_missing_param_annotation' => true,
27+
// 'class_definition' => true,
28+
];
29+
30+
$finder = PhpCsFixer\Finder::create();
31+
32+
// ignore laravel blade file
33+
$finder->exclude(['vendor'])
34+
->notName('*.blade.php');
35+
36+
return (new PhpCsFixer\Config())
37+
->setRules($rules)
38+
->setIndent(' ')
39+
->setLineEnding("\n")
40+
->setFinder($finder);

composer.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "hankz/laravel-plus-api",
3+
"type": "library",
4+
"license": "MIT",
5+
"autoload": {
6+
"psr-4": {
7+
"Hankz\\LaravelPlusApi\\": "src/"
8+
}
9+
},
10+
"authors": [
11+
{
12+
"name": "hankz",
13+
"email": "hankz1108@gmail.com"
14+
}
15+
],
16+
"require": {
17+
"php": "^7.4|^8.0"
18+
},
19+
"require-dev": {
20+
"laravel/framework": "7"
21+
}
22+
}

0 commit comments

Comments
 (0)