-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomposer.json
More file actions
89 lines (89 loc) · 4.09 KB
/
composer.json
File metadata and controls
89 lines (89 loc) · 4.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{
"name": "ycodetech/phpcs-standard",
"description": "yCodeTech's custom PHP_CodeSniffer standard with opinionated coding rules and best practices",
"type": "phpcodesniffer-standard",
"keywords": [
"phpcs",
"php_codesniffer",
"phpcodesniffer-standard",
"standards",
"coding-standard"
],
"license": "MIT",
"authors": [
{
"name": "yCodeTech",
"email": "studocwho@hotmail.com"
}
],
"require": {
"php": ">=7.2",
"squizlabs/php_codesniffer": "^3.13||^4.0@dev",
"dealerdirect/phpcodesniffer-composer-installer": "^1.1"
},
"require-dev": {
"phpunit/phpunit": "^8.5||^9.6",
"phpcsstandards/phpcsdevtools": "^1.0",
"php-parallel-lint/php-parallel-lint": "^1.4"
},
"autoload": {
"psr-4": {
"yCodeTech\\": "yCodeTech/"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"scripts": {
"lint": "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --exclude vendor --exclude .git --exclude test_utils",
"cs": "@php ./vendor/bin/phpcs --standard=yCodeTech",
"cbf": "@php ./vendor/bin/phpcbf --standard=yCodeTech",
"test-phpcs4": [
"Composer\\Config::disableProcessTimeout",
"@php ./vendor/bin/phpunit --no-coverage"
],
"test-phpcs3": [
"Composer\\Config::disableProcessTimeout",
"@php ./vendor/bin/phpunit --filter yCodeTech --no-coverage ./vendor/squizlabs/php_codesniffer/tests/AllTests.php"
],
"test": [
"Composer\\Config::disableProcessTimeout",
"@php -r \"echo 'Determining PHPCS version...\n'; $version = shell_exec('vendor/bin/phpcs --version 2>nul || vendor\\\\bin\\\\phpcs.bat --version'); if ($version && is_string($version) && preg_match('/([0-9]+)\\./', $version, $matches)) { $major = $matches[1]; } else { $major = '3'; } $script = ($major >= 4) ? 'test-phpcs4' : 'test-phpcs3'; echo 'Running ' . $script . '...' . \"\"\n\"\"; system('composer run-script ' . $script);\""
],
"cs-test-file": "@cs ./test_utils/TestFile.php",
"fix-test-file": "@cbf ./test_utils/TestFile.php",
"restore-test-file": "bash ./test_utils/restore_errors.sh",
"cs-tests": "@cs ./yCodeTech/Tests/ --extensions=inc",
"test-all": [
"@cs-test-file",
"@cs-tests",
"@test-phpcs4"
],
"list-tokens": "@php ./vendor/bin/phpcs --standard=PHPCSDebug ./test_utils/TestFile.php",
"check-completeness": "@php ./vendor/bin/phpcs-check-feature-completeness ./yCodeTech",
"generate-docs": "@php ./vendor/bin/phpcs --sniffs=yCodeTech.Commenting.DocblockFormat,yCodeTech.Commenting.FunctionComment,yCodeTech.Types.DisallowTypeLongNames --generator=markdown > docs.md"
},
"scripts-descriptions": {
"lint": "Run PHP Parallel Lint to check for syntax errors in PHP files.",
"cs": "Run PHPCS to check for coding standards violations.",
"cbf": "Run PHPCBF to fix coding standards violations.",
"test-phpcs4": "PHPCS 4.x: Run PHPUnit tests without code coverage.",
"test-phpcs3": "PHPCS 3.x: Run PHPUnit tests without code coverage.",
"test": "Run the appropriate PHPUnit composer script based on the installed PHPCS version, (test-phpcs4 or test-phpcs3).",
"cs-test-file": "Run PHPCS on the test file.",
"fix-test-file": "Run PHPCBF on the test file.",
"restore-test-file": "Restore the test file to its original state.",
"cs-tests": "Run PHPCS on all sniff unit tests.",
"test-all": "Run @cs-test-file, @cs-tests, and @test-phpcs4 in sequence.",
"list-tokens": "List all tokens used in the test file.",
"check-completeness": "Check the completeness of the PHPCS standard.",
"generate-docs": "Generate markdown documentation for the PHPCS standard."
}
}