https://github.com/nunomaduro/pint-strict-preset
Pint strict preset is an insanely defensive coding style preset for those who demand meticulous precision in their projects.
https://github.com/nunomaduro/pint-strict-preset
pint preset rules strict typing
Last synced: 2 months ago
JSON representation
Pint strict preset is an insanely defensive coding style preset for those who demand meticulous precision in their projects.
- Host: GitHub
- URL: https://github.com/nunomaduro/pint-strict-preset
- Owner: nunomaduro
- Created: 2024-03-04T22:11:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-21T15:18:48.000Z (4 months ago)
- Last Synced: 2025-03-28T20:49:33.003Z (3 months ago)
- Topics: pint, preset, rules, strict, typing
- Homepage:
- Size: 856 KB
- Stars: 116
- Watchers: 7
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![]()
------
Pint strict preset is an insanely defensive coding style preset for those who demand meticulous precision in their projects. To use it, simply create a `pint.json` file with the following contents:
```json
{
"preset": "laravel",
"rules": {
"array_push": true,
"backtick_to_shell_exec": true,
"date_time_immutable": true,
"declare_strict_types": true,
"lowercase_keywords": true,
"lowercase_static_reference": true,
"final_class": true,
"final_internal_class": true,
"final_public_method_for_abstract_class": true,
"fully_qualified_strict_types": true,
"global_namespace_import": {
"import_classes": true,
"import_constants": true,
"import_functions": true
},
"mb_str_functions": true,
"modernize_types_casting": true,
"new_with_parentheses": false,
"no_superfluous_elseif": true,
"no_useless_else": true,
"no_multiple_statements_per_line": true,
"ordered_class_elements": {
"order": [
"use_trait",
"case",
"constant",
"constant_public",
"constant_protected",
"constant_private",
"property_public",
"property_protected",
"property_private",
"construct",
"destruct",
"magic",
"phpunit",
"method_abstract",
"method_public_static",
"method_public",
"method_protected_static",
"method_protected",
"method_private_static",
"method_private"
],
"sort_algorithm": "none"
},
"ordered_interfaces": true,
"ordered_traits": true,
"protected_to_private": true,
"self_accessor": true,
"self_static_accessor": true,
"strict_comparison": true,
"visibility_required": true
}
}
```