Skip to content

Commit 756ab92

Browse files
committed
wip
1 parent 2590bc2 commit 756ab92

29 files changed

+590
-9582
lines changed

.gitattributes

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
2-
/.editorconfig export-ignore
3-
/.gitattributes export-ignore
4-
/.gitignore export-ignore
5-
/.php-cs-fixer.php export-ignore
6-
/phpstan.neon export-ignore
7-
/phpunit.xml export-ignore
8-
/tests export-ignore
2+
3+
.github/ export-ignore
4+
docs/ export-ignore
5+
tests/ export-ignore
6+
.editorconfig export-ignore
7+
.gitattributes export-ignore
8+
.gitignore export-ignore
9+
.php-cs-fixer.php export-ignore
10+
phpunit.xml export-ignore

.github/workflows/tests.yml

Whitespace-only changes.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
vendor/
12
.php-cs-fixer.cache
23
.phpunit.result.cache
3-
vendor/
4+
composer.lock
5+
testing.sh

.php-cs-fixer.php

Lines changed: 31 additions & 183 deletions
Original file line numberDiff line numberDiff line change
@@ -1,191 +1,39 @@
11
<?php
22

3-
// Thanks to https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200#gistcomment-3755709
4-
5-
use PhpCsFixer\Config;
6-
use PhpCsFixer\Finder;
7-
8-
$rules = [
9-
'array_syntax' => [
10-
'syntax' => 'short',
11-
],
12-
'binary_operator_spaces' => [
13-
'default' => 'single_space',
14-
'operators' => [
15-
'=>' => null,
16-
],
17-
],
18-
'blank_line_after_namespace' => true,
19-
'blank_line_after_opening_tag' => true,
20-
'blank_line_before_statement' => [
21-
'statements' => [
22-
'return',
23-
],
24-
],
25-
'braces' => true,
26-
'cast_spaces' => true,
27-
'class_attributes_separation' => [
28-
'elements' => [
29-
'const' => 'one',
30-
'method' => 'one',
31-
'property' => 'one',
32-
'trait_import' => 'none',
33-
],
34-
],
35-
'class_definition' => [
36-
'multi_line_extends_each_single_line' => true,
37-
'single_item_single_line' => true,
38-
'single_line' => true,
39-
],
40-
'concat_space' => [
41-
'spacing' => 'none',
42-
],
43-
'constant_case' => [
44-
'case' => 'lower',
45-
],
46-
'declare_equal_normalize' => true,
47-
'elseif' => true,
48-
'encoding' => true,
49-
'full_opening_tag' => true,
50-
'fully_qualified_strict_types' => true,
51-
'function_declaration' => true,
52-
'function_typehint_space' => true,
53-
'general_phpdoc_tag_rename' => true,
54-
'heredoc_to_nowdoc' => true,
55-
'include' => true,
56-
'increment_style' => [
57-
'style' => 'post',
58-
],
59-
'indentation_type' => true,
60-
'line_ending' => true,
61-
'linebreak_after_opening_tag' => true,
62-
'lowercase_cast' => true,
63-
'lowercase_keywords' => true,
64-
'lowercase_static_reference' => true,
65-
'magic_constant_casing' => true,
66-
'magic_method_casing' => true,
67-
'method_argument_space' => true,
68-
'multiline_whitespace_before_semicolons' => [
69-
'strategy' => 'no_multi_line',
70-
],
71-
'native_function_casing' => true,
72-
'no_alias_functions' => true,
73-
'no_blank_lines_after_class_opening' => true,
74-
'no_blank_lines_after_phpdoc' => true,
75-
'no_closing_tag' => true,
76-
'no_empty_phpdoc' => true,
77-
'no_empty_statement' => true,
78-
'no_extra_blank_lines' => [
79-
'tokens' => [
80-
'extra',
81-
'throw',
82-
'use',
83-
],
84-
],
85-
'no_leading_import_slash' => true,
86-
'no_leading_namespace_whitespace' => true,
87-
'no_mixed_echo_print' => [
88-
'use' => 'echo',
89-
],
90-
'no_multiline_whitespace_around_double_arrow' => true,
91-
'no_short_bool_cast' => true,
92-
'no_singleline_whitespace_before_semicolons' => true,
93-
'no_spaces_after_function_name' => true,
94-
'no_spaces_around_offset' => [
95-
'positions' => [
96-
'inside',
97-
'outside',
98-
],
99-
],
100-
'no_spaces_inside_parenthesis' => true,
101-
'no_trailing_comma_in_list_call' => true,
102-
'no_trailing_comma_in_singleline_array' => true,
103-
'no_trailing_whitespace' => true,
104-
'no_trailing_whitespace_in_comment' => true,
105-
'no_unneeded_control_parentheses' => [
106-
'statements' => [
107-
'break',
108-
'clone',
109-
'continue',
110-
'echo_print',
111-
'return',
112-
'switch_case',
113-
'yield',
114-
],
115-
],
116-
'no_unreachable_default_argument_value' => true,
117-
'no_unused_imports' => true,
118-
'no_useless_return' => true,
119-
'no_whitespace_before_comma_in_array' => true,
120-
'no_whitespace_in_blank_line' => true,
121-
'normalize_index_brace' => true,
122-
'not_operator_with_successor_space' => true,
123-
'object_operator_without_whitespace' => true,
124-
'ordered_imports' => [
125-
'sort_algorithm' => 'alpha',
126-
],
127-
'phpdoc_indent' => true,
128-
'phpdoc_inline_tag_normalizer' => true,
129-
'phpdoc_no_access' => true,
130-
'phpdoc_no_package' => true,
131-
'phpdoc_no_useless_inheritdoc' => true,
132-
'phpdoc_scalar' => true,
133-
'phpdoc_single_line_var_spacing' => true,
134-
'phpdoc_summary' => true,
135-
'phpdoc_tag_type' => true,
136-
'phpdoc_to_comment' => true,
137-
'phpdoc_trim' => true,
138-
'phpdoc_types' => true,
139-
'phpdoc_var_without_name' => true,
140-
'psr_autoloading' => true,
141-
'self_accessor' => true,
142-
'short_scalar_cast' => true,
143-
'simplified_null_return' => false,
144-
'single_blank_line_at_eof' => true,
145-
'single_blank_line_before_namespace' => true,
146-
'single_import_per_statement' => true,
147-
'single_line_after_imports' => true,
148-
'single_line_comment_style' => [
149-
'comment_types' => [
150-
'hash',
151-
],
152-
],
153-
'single_quote' => true,
154-
'space_after_semicolon' => true,
155-
'standardize_not_equals' => true,
156-
'switch_case_semicolon_to_colon' => true,
157-
'switch_case_space' => true,
158-
'ternary_operator_spaces' => true,
159-
'trailing_comma_in_multiline' => [
160-
'elements' => [
161-
'arrays',
162-
],
163-
],
164-
'trim_array_spaces' => true,
165-
'unary_operator_spaces' => true,
166-
'visibility_required' => [
167-
'elements' => [
168-
'property',
169-
'method',
170-
'const',
171-
],
172-
],
173-
'whitespace_after_comma_in_array' => true,
174-
];
175-
176-
$finder = Finder::create()
3+
$finder = Symfony\Component\Finder\Finder::create()
1774
->in([
178-
__DIR__.'/config',
179-
__DIR__.'/src',
180-
__DIR__.'/tests',
5+
__DIR__ . '/src',
6+
__DIR__ . '/tests',
1817
])
1828
->name('*.php')
183-
->notName('*.blade.php')
1849
->ignoreDotFiles(true)
18510
->ignoreVCS(true);
18611

187-
return (new Config())
188-
->setFinder($finder)
189-
->setRules($rules)
190-
->setRiskyAllowed(true)
191-
->setUsingCache(true);
12+
return (new PhpCsFixer\Config())
13+
->setRules([
14+
'@PSR2' => true,
15+
'array_syntax' => ['syntax' => 'short'],
16+
'ordered_imports' => ['sort_algorithm' => 'alpha'],
17+
'no_unused_imports' => true,
18+
'not_operator_with_successor_space' => true,
19+
'trailing_comma_in_multiline' => true,
20+
'phpdoc_scalar' => true,
21+
'unary_operator_spaces' => true,
22+
'binary_operator_spaces' => true,
23+
'blank_line_before_statement' => [
24+
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
25+
],
26+
'phpdoc_single_line_var_spacing' => true,
27+
'phpdoc_var_without_name' => true,
28+
'class_attributes_separation' => [
29+
'elements' => [
30+
'method' => 'one',
31+
],
32+
],
33+
'method_argument_space' => [
34+
'on_multiline' => 'ensure_fully_multiline',
35+
'keep_multiple_spaces_after_comma' => true,
36+
],
37+
'single_trait_insert_per_statement' => true,
38+
])
39+
->setFinder($finder);

CHANGELOG.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
# Changelog
22

3-
Semua perubahan penting pada proyek ini akan didokumentasikan dalam file ini.
4-
5-
Formatnya didasarkan pada [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6-
dan proyek ini mematuhi [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
3+
All notable changes to `laravel-api-response` will be documented in this file.
74

85
## [v1.0.0](https://github.com/kodepandai/laravel-modular/compare/62e6f25...v1.0.0)
96

107
### Added
118

12-
- Modular, bisa registrasikan: `configs`, `views`, `view-components`, `translations`, `migrations`, `routes`, `commands`, `helpers`, `middlewares`, `service-providers`.
13-
- Support Laravel versi 9
9+
- Modular can loads:
10+
- Views
11+
- Migration

LICENSE.md

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,7 @@
1-
Copyright 2021 PT. Dirga Surya
2-
3-
All rights reserved.
4-
5-
=====
6-
7-
Hak Cipta 2021 PT. Dirga Surya
8-
9-
Seluruh hak cipta dilindungi undang-undang.
10-
11-
=====
12-
13-
Part of this laravel-module code are copied from spatie/laravel-package-tools.
14-
Below are the license from spatie/laravel-package-tools.
15-
16-
----
17-
181
The MIT License (MIT)
192

20-
Copyright (c) spatie freek@spatie.be
3+
Copyright (c) 2022 Kode Pandai - https://github.com/kodepandai
4+
Copyright (c) 2022 spatie freek@spatie.be
215

226
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
237

0 commit comments

Comments
 (0)