Skip to content

Instantly share code, notes, and snippets.

@xtrasmal
Last active May 25, 2023 10:50
Show Gist options
  • Select an option

  • Save xtrasmal/44e8002d82d8fab2c477a4307742585d to your computer and use it in GitHub Desktop.

Select an option

Save xtrasmal/44e8002d82d8fab2c477a4307742585d to your computer and use it in GitHub Desktop.

Revisions

  1. xtrasmal revised this gist May 25, 2023. No changes.
  2. xtrasmal revised this gist May 25, 2023. No changes.
  3. xtrasmal created this gist May 25, 2023.
    141 changes: 141 additions & 0 deletions pint.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,141 @@
    {
    "preset": "laravel",
    "rules": {
    "array_indentation": true,
    "array_syntax": true,
    "assign_null_coalescing_to_coalesce_equal": true,
    "binary_operator_spaces": true,
    "blank_line_after_namespace": true,
    "blank_line_after_opening_tag": true,
    "blank_line_before_statement": true,
    "blank_line_between_import_groups": true,
    "braces": {
    "allow_single_line_anonymous_class_with_empty_body": true,
    "allow_single_line_closure": false,
    "position_after_anonymous_constructs": "same",
    "position_after_control_structures": "same",
    "position_after_functions_and_oop_constructs": "next"
    },
    "cast_spaces": false,
    "class_attributes_separation": {
    "elements": {
    "case": "none",
    "const": "none",
    "method": "one",
    "property": "none",
    "trait_import": "none"
    }
    },
    "class_definition": {
    "inline_constructor_arguments": false,
    "single_item_single_line": true,
    "space_before_parenthesis": true
    },
    "clean_namespace": true,
    "compact_nullable_typehint": true,
    "concat_space": true,
    "constant_case": true,
    "declare_equal_normalize": true,
    "declare_strict_types": true,
    "elseif": true,
    "encoding": true,
    "full_opening_tag": true,
    "function_declaration": true,
    "heredoc_indentation": true,
    "indentation_type": true,
    "line_ending": true,
    "list_syntax": true,
    "lowercase_cast": true,
    "lowercase_keywords": true,
    "lowercase_static_reference": true,
    "method_argument_space": {
    "on_multiline": "ensure_fully_multiline"
    },
    "new_with_braces": true,
    "no_blank_lines_after_class_opening": true,
    "no_break_comment": true,
    "no_closing_tag": true,
    "no_empty_statement": true,
    "no_leading_import_slash": true,
    "no_space_around_double_colon": true,
    "no_spaces_after_function_name": true,
    "no_spaces_inside_parenthesis": true,
    "no_trailing_whitespace": true,
    "no_trailing_whitespace_in_comment": true,
    "no_unneeded_curly_braces": true,
    "no_unset_cast": true,
    "no_unused_imports": true,
    "no_useless_else": true,
    "no_useless_nullsafe_operator": true,
    "no_useless_return": true,
    "no_whitespace_before_comma_in_array": {
    "after_heredoc": true
    },
    "no_whitespace_in_blank_line": true,
    "normalize_index_brace": true,
    "ordered_class_elements": {
    "order": [
    "use_trait",
    "case",
    "constant_public",
    "constant_protected",
    "constant_private",
    "property_public",
    "property_protected",
    "property_private",
    "construct",
    "destruct",
    "magic",
    "phpunit",
    "method_abstract",
    "method_static",
    "method_public",
    "method_public_static",
    "method_protected",
    "method_protected_static",
    "method_private",
    "method_private_static",
    "method_public_abstract",
    "method_protected_abstract",
    "method_private_abstract",
    "method_public_abstract_static",
    "method_protected_abstract_static",
    "method_private_abstract_static"
    ]
    },
    "ordered_imports": {
    "imports_order": [
    "class",
    "function",
    "const"
    ],
    "sort_algorithm": "alpha"
    },
    "protected_to_private": true,
    "return_assignment": true,
    "return_type_declaration": true,
    "short_scalar_cast": true,
    "single_blank_line_at_eof": true,
    "single_blank_line_before_namespace": true,
    "single_class_element_per_statement": {
    "elements": [
    "const",
    "property"
    ]
    },
    "single_import_per_statement": {
    "group_to_single_imports": false
    },
    "single_line_after_imports": true,
    "single_trait_insert_per_statement": true,
    "switch_case_semicolon_to_colon": true,
    "switch_case_space": true,
    "ternary_operator_spaces": true,
    "ternary_to_null_coalescing": true,
    "trailing_comma_in_multiline": {
    "after_heredoc": true
    },
    "visibility_required": true,
    "yoda_style": true
    }
    }