diff --git a/.harper-dictionary.txt b/.harper-dictionary.txt new file mode 100644 index 0000000..5e3b606 --- /dev/null +++ b/.harper-dictionary.txt @@ -0,0 +1,6 @@ +MeliorStan +PHPMD +PHPStan +PHPStan's +cyclomatic +goto diff --git a/README.md b/README.md index d68240f..1cb5a3e 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # MeliorStan -**Advanced PHPStan Rules for Superior Code Quality** +**Advanced PHPStan Rules for Code Quality and Consistency** *Enhance your PHP codebase with intelligent static analysis rules that detect code smells, enforce naming conventions, and promote best practices.* @@ -16,26 +16,26 @@ --- -## ๐Ÿ“‹ Table of Contents +## Table of Contents -- [โœจ Features](#-features) -- [๐Ÿš€ Quick Start](#-quick-start) -- [๐Ÿ“š Available Rules](#-available-rules) -- [๐Ÿ”ง Configuration](#-configuration) -- [๐ŸŽฏ Inspiration](#-inspiration) -- [๐Ÿ“„ License](#-license) -- [๐Ÿ™ Acknowledgments](#-acknowledgments) +- [Features](#-features) +- [Quick Start](#-quick-start) +- [Available Rules](#-available-rules) +- [Configuration](#-configuration) +- [Inspiration](#-inspiration) +- [License](#-license) +- [Acknowledgments](#-acknowledgments) -## โœจ Features +## Features -- **๐Ÿ” Comprehensive Code Analysis**: Detect code smells and potential issues -- **๐Ÿ“ Naming Convention Enforcement**: Ensure consistent naming across your codebase -- **โš™๏ธ Highly Configurable**: Customize rules to match your project's standards -- **๐Ÿš€ Modern PHP Support**: Built for PHP 8.3+ with PHPStan 2.1+ -- **๐Ÿ“– Extensive Documentation**: Detailed guides for each rule -- **๐Ÿงช Well Tested**: Comprehensive test suite ensuring reliability +- **Comprehensive Code Analysis**: Detect code smells and potential issues +- **Naming Convention Enforcement**: Ensure consistent naming across your codebase +- **Highly Configurable**: Customize rules to match your project's standards +- **Modern PHP Support**: Built for PHP 8.3+ with PHPStan 2.1+ +- **Extensive Documentation**: Detailed guides for each rule +- **Well Tested**: Comprehensive test suite ensuring reliability -## ๐Ÿš€ Quick Start +## Quick Start ### Installation @@ -70,17 +70,17 @@ parameters: allow_underscore_prefix: false ``` -## ๐Ÿ“š Available Rules +## Available Rules ### Naming Conventions | Rule | Description | Target | |------|-------------|---------| | **[BooleanGetMethodName](docs/BooleanGetMethodName.md)** | Prevents `get*` methods from returning boolean values | Methods | -| **[CamelCase Method Name](docs/CamelCaseMethodName.md)** | Enforces camelCase for method names | Methods | -| **[CamelCase Parameter Name](docs/CamelCaseParameterName.md)** | Enforces camelCase for parameter names | Parameters | -| **[CamelCase Property Name](docs/CamelCasePropertyName.md)** | Enforces camelCase for property names | Properties | -| **[CamelCase Variable Name](docs/CamelCaseVariableName.md)** | Enforces camelCase for variable names | Variables | +| **[CamelCaseMethodName](docs/CamelCaseMethodName.md)** | Enforces camelCase for method names | Methods | +| **[CamelCaseParameterName](docs/CamelCaseParameterName.md)** | Enforces camelCase for parameter names | Parameters | +| **[CamelCasePropertyName](docs/CamelCasePropertyName.md)** | Enforces camelCase for property names | Properties | +| **[CamelCaseVariableName](docs/CamelCaseVariableName.md)** | Enforces camelCase for variable names | Variables | | **[ConstantNamingConventions](docs/ConstantNamingConventions.md)** | Enforces UPPERCASE for constants | Constants | | **[ConstructorWithNameAsEnclosingClass](docs/ConstructorWithNameAsEnclosingClass.md)** | Prevents methods with same name as their class | Methods | | **[LongClassName](docs/LongClassName.md)** | Limits class/interface/trait/enum name length | Classes, Interfaces, Traits, Enums | @@ -119,7 +119,7 @@ parameters: | **[NumberOfChildren](docs/NumberOfChildren.md)** | Detects classes with too many direct child classes | Class Hierarchy | | **[TooManyMethods](docs/TooManyMethods.md)** | Detects classes with too many methods | Classes, Interfaces, Traits, Enums | -## ๐Ÿ”ง Configuration +## Configuration Each rule supports extensive configuration options. Refer to individual rule documentation for detailed configuration parameters. @@ -157,21 +157,21 @@ parameters: subtract_suffixes: ["Interface", "Trait"] ``` -## ๐ŸŽฏ Inspiration +## Inspiration Originally inspired by [**PHPMD - PHP Mess Detector**](https://phpmd.org/), this project provides modern PHPStan equivalents with enhanced configurability and PHP 8+ features. > **Note**: While inspired by PHPMD, these rules are not exact replicas. They may offer additional or renamed customization options and are adapted for PHPStan's architecture and modern PHP practices. -## ๐Ÿค Contributing +## Contributing We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details. -## ๐Ÿ“„ License +## License This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details. -## ๐Ÿ™ Acknowledgments +## Acknowledgments - [**PHPStan**](https://phpstan.org/) - The foundation of modern PHP static analysis - [**PHPMD**](https://phpmd.org/) - Original inspiration for code quality rules @@ -180,8 +180,6 @@ This project is licensed under the **MIT License** - see the [LICENSE](LICENSE)
-**Made with โค๏ธ for the PHP community** - -[๐Ÿ“– Documentation](docs/) โ€ข [๐Ÿ› Report Issues](https://github.com/orrison/meliorstan/issues) +[Documentation](docs/) โ€ข [Report Issues](https://github.com/orrison/meliorstan/issues)