We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SlevomatCodingStandard.Classes.ConstructorPropertyPromotionSpacing
SlevomatCodingStandard.Classes.ConstructorPropertyPromotionSpacing 🔧
Checks that there is a certain number of blank lines between promoted properties in constructor.
Sniff provides the following settings:
minLinesCountBeforeWithComment
maxLinesCountBeforeWithComment
minLinesCountBeforeWithoutComment
maxLinesCountBeforeWithoutComment
final class AddAddress implements Command { public function __construct( #[NotBlank] public string $street, #[NotBlank] #[Regex(pattern: '/^[0-9]{5}$/', message: 'postcode.must_be_5_digit_number')] public string $postcode, #[NotBlank] public string $city, ) { } }
final readonly class AddAddressHandler implements CommandHandler { public function __construct( private AddressRepository $repository, private EventBus $eventBus, ) { } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Documentation
SlevomatCodingStandard.Classes.ConstructorPropertyPromotionSpacing 🔧
Checks that there is a certain number of blank lines between promoted properties in constructor.
Sniff provides the following settings:
minLinesCountBeforeWithComment
: minimum number of lines before promoted property with a documentation comment or attribute (default value is 1)maxLinesCountBeforeWithComment
: maximum number of lines before promoted property with a documentation comment or attribute (default value is 1)minLinesCountBeforeWithoutComment
: minimum number of lines before promoted property without a documentation comment or attribute (default value is 0)maxLinesCountBeforeWithoutComment
: maximum number of lines before promoted property without a documentation comment or attribute (default value is 1)Code Samples
The text was updated successfully, but these errors were encountered: