Skip to content

Commit 60e9de7

Browse files
authored
Update ecs.php
1 parent 42a6ea9 commit 60e9de7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ecs.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,20 @@
133133
use SlevomatCodingStandard\Sniffs\Commenting\RequireOneLinePropertyDocCommentSniff;
134134
use Symplify\EasyCodingStandard\Config\ECSConfig;
135135

136+
// The definitions below fix issue with issue on annotations
137+
// [ERROR] System error: "Undefined constant "T_TYPE_CLOSE_PARENTHESIS""Run ECS with "--debug" option and post the report
138+
// here: https://github.com/symplify/symplify/issues/new in src/EventListener/AttachmentListener.php:527
139+
// Reference to files:
140+
// - vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Commenting/RequireOneLinePropertyDocCommentSniff.php:29
141+
// - vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/TokenHelper.php:520
142+
if (!defined('T_TYPE_OPEN_PARENTHESIS')) {
143+
define('T_TYPE_OPEN_PARENTHESIS', 'PHPCS_T_TYPE_OPEN_PARENTHESIS');
144+
}
145+
146+
if (!defined('T_TYPE_CLOSE_PARENTHESIS')) {
147+
define('T_TYPE_CLOSE_PARENTHESIS', 'PHPCS_T_TYPE_CLOSE_PARENTHESIS');
148+
}
149+
136150
return static function (ECSConfig $ecsConfig): void {
137151
$ecsConfig->rules([
138152
BinaryOperatorSpacesFixer::class,

0 commit comments

Comments
 (0)