This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
76e512c
commit 9e09deb
Showing
64 changed files
with
2,190 additions
and
3,668 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"brace_style": "collapse", | ||
"break_chained_methods": true, | ||
"comma_first": false, | ||
"e4x": true, | ||
"editorconfig": true, | ||
"end_with_newline": true, | ||
"eol": "\n", | ||
"indent_char": " ", | ||
"indent_inner_html": true, | ||
"indent_level": 0, | ||
"indent_scripts": "separate", | ||
"indent_size": "2", | ||
"indent_with_tabs": false, | ||
"jslint_happy": true, | ||
"keep_array_indentation": true, | ||
"max_preserve_newlines": "2", | ||
"operator_position": "before-newline", | ||
"preserve_newlines": true, | ||
"space_after_anon_function": true, | ||
"space_after_named_function": true, | ||
"space_before_conditional": true, | ||
"space_in_empty_paren": true, | ||
"space_in_paren": true, | ||
"unescape_strings": true, | ||
"unindent_chained_methods": false, | ||
"wrap_line_length": "120" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"parse": {}, | ||
"mangle": { | ||
"reserved": ["log", "debug", "perf_begin", "perf_end"] | ||
}, | ||
"compress": { | ||
"drop_console": true, | ||
"hoist_funs": true, | ||
"passes": 10, | ||
"pure_getters": true, | ||
"pure_funcs": ["log", "debug", "perf_begin", "perf_end"], | ||
"reduce_funcs": true | ||
}, | ||
"output": { | ||
"comments": "/^!/", | ||
"wrap_iife": true | ||
}, | ||
"annotations": false, | ||
"ie": true, | ||
"keep_fargs": false, | ||
"keep_fnames": false, | ||
"module": false, | ||
"nameCache": null, | ||
"sourceMap": false, | ||
"toplevel": false, | ||
"v8": true, | ||
"warnings": false, | ||
"webkit": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?php | ||
|
||
/** | ||
* Defer.php aims to help you concentrate on web performance optimization. | ||
* (c) 2019-2023 SHIN Company https://shin.company | ||
* | ||
* PHP Version >=5.6 | ||
* | ||
* @category Web_Performance_Optimization | ||
* @package AppSeeds | ||
* @author Mai Nhut Tan <shin@shin.company> | ||
* @copyright 2019-2023 SHIN Company | ||
* @license https://code.shin.company/defer.php/blob/master/LICENSE MIT | ||
* @link https://code.shin.company/defer.php | ||
* @see https://code.shin.company/defer.php/blob/master/README.md | ||
*/ | ||
|
||
define('WEBHOME', '/var/www/html'); | ||
|
||
$header = <<<'EOF' | ||
Defer.php aims to help you concentrate on web performance optimization. | ||
(c) 2019-2023 SHIN Company https://shin.company | ||
PHP Version >=5.6 | ||
@category Web_Performance_Optimization | ||
@package AppSeeds | ||
@author Mai Nhut Tan <shin@shin.company> | ||
@copyright 2019-2023 SHIN Company | ||
@license https://code.shin.company/defer.php/blob/master/LICENSE MIT | ||
@link https://code.shin.company/defer.php | ||
@see https://code.shin.company/defer.php/blob/master/README.md | ||
EOF; | ||
|
||
$rules = [ | ||
'@PhpCsFixer' => true, | ||
'concat_space' => ['spacing' => 'one'], | ||
'empty_loop_body' => ['style' => 'braces'], | ||
'header_comment' => ['header' => $header, 'comment_type' => 'PHPDoc'], | ||
'increment_style' => ['style' => 'post'], | ||
'no_superfluous_phpdoc_tags' => false, | ||
'phpdoc_summary' => true, | ||
'phpdoc_to_comment' => false, | ||
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], | ||
'self_static_accessor' => false, | ||
'yoda_style' => false, | ||
|
||
'multiline_whitespace_before_semicolons' => [ | ||
'strategy' => 'no_multi_line', | ||
], | ||
|
||
'phpdoc_align' => ['align' => 'vertical'], | ||
|
||
'binary_operator_spaces' => [ | ||
'default' => 'single_space', | ||
'operators' => [ | ||
'||' => 'align_single_space_minimal', | ||
'or' => 'align_single_space_minimal', | ||
'=' => 'align_single_space_minimal', | ||
'=>' => 'align_single_space_minimal', | ||
'<=>' => 'align_single_space_minimal', | ||
], | ||
], | ||
|
||
'visibility_required' => [ | ||
'elements' => ['method', 'property'], | ||
], | ||
]; | ||
|
||
$finder = \PhpCsFixer\Finder::create() | ||
->in(dirname(__DIR__)) | ||
->name('*.php') | ||
->exclude('_old') | ||
->exclude('cache') | ||
->ignoreDotFiles(false) | ||
->ignoreVCS(true); | ||
|
||
return (new \PhpCsFixer\Config()) | ||
->setFinder($finder) | ||
->setRules($rules) | ||
->setLineEnding("\n") | ||
->setUsingCache(false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
parameters: | ||
level: 8 | ||
phpVersion: 70100 | ||
fileExtensions: | ||
- php | ||
paths: | ||
- /var/www/html/ | ||
excludePaths: | ||
- /var/www/html/_*/* | ||
- /var/www/html/mode_modules/* | ||
- /var/www/html/vendor/* | ||
ignoreErrors: | ||
- '#has no return type specified#' | ||
checkMissingIterableValueType: false | ||
checkGenericClassInNonGenericObjectType: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* Defer.php aims to help you concentrate on web performance optimization. | ||
* (c) 2019-2023 SHIN Company https://shin.company | ||
* | ||
* PHP Version >=5.6 | ||
* | ||
* @category Web_Performance_Optimization | ||
* @package AppSeeds | ||
* @author Mai Nhut Tan <shin@shin.company> | ||
* @copyright 2019-2023 SHIN Company | ||
* @license https://code.shin.company/defer.php/blob/master/LICENSE MIT | ||
* @link https://code.shin.company/defer.php | ||
* @see https://code.shin.company/defer.php/blob/master/README.md | ||
*/ | ||
|
||
use Rector\CodingStyle\Rector\FuncCall\ConsistentPregDelimiterRector; | ||
use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector; | ||
use Rector\Config\RectorConfig; | ||
use Rector\Set\ValueObject\DowngradeLevelSetList; | ||
use Rector\Set\ValueObject\LevelSetList; | ||
use Rector\Set\ValueObject\SetList; | ||
|
||
return static function (RectorConfig $rectorConfig): void { | ||
$rectorConfig->disableParallel(); | ||
$rectorConfig->importNames(); | ||
$rectorConfig->indent(' ', 4); | ||
$rectorConfig->phpstanConfig(__DIR__ . '/phpstan.neon'); | ||
|
||
// scan paths | ||
$rectorConfig->paths([ | ||
'/var/www/html/', | ||
]); | ||
|
||
// skip paths and rules | ||
$rectorConfig->skip([ | ||
'/var/www/html/_*/', | ||
'/var/www/html/cache/', | ||
'/var/www/html/node_modules/', | ||
'/var/www/html/vendor/', | ||
]); | ||
|
||
// rule sets | ||
$rectorConfig->sets([ | ||
LevelSetList::UP_TO_PHP_82, | ||
SetList::DEAD_CODE, | ||
SetList::EARLY_RETURN, | ||
SetList::CODE_QUALITY, | ||
SetList::CODING_STYLE, | ||
DowngradeLevelSetList::DOWN_TO_PHP_55, | ||
]); | ||
|
||
$rectorConfig->rules([ | ||
NewlineAfterStatementRector::class, | ||
]); | ||
|
||
// extra rules | ||
$rectorConfig->ruleWithConfiguration(ConsistentPregDelimiterRector::class, [ | ||
ConsistentPregDelimiterRector::DELIMITER => '/', | ||
]); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
.php_cs.cache | ||
composer.phar | ||
_* | ||
.DS_Store | ||
*.cache | ||
/cache/ | ||
/node_modules/ | ||
/vendor/ | ||
/cache/ | ||
/.scannerwork | ||
composer.lock | ||
package-lock.json |
Oops, something went wrong.