Skip to content

Don't mess with lines between docblock comment and var type.#1707

Merged
TomasVotruba merged 1 commit intorectorphp:masterfrom
ravanscafi:varconstant
Jul 8, 2019
Merged

Don't mess with lines between docblock comment and var type.#1707
TomasVotruba merged 1 commit intorectorphp:masterfrom
ravanscafi:varconstant

Conversation

@ravanscafi
Copy link
Copy Markdown
Contributor

Previously, this code:

/**
 * My comment.
 *
 * @var array
 */
public const CONST = [
    'string'
];

would become:

/**
 * My comment.
 * @var string[]
 */
public const CONST = [
    'string'
];

messing with code standards/style (removing the line between comment and @var).

Now it stays as is:

/**
 * My comment.
 *
 * @var string[]
 */
public const CONST = [
    'string'
];

(without breaking anything else)

@TomasVotruba
Copy link
Copy Markdown
Member

Thanks

@TomasVotruba TomasVotruba merged commit 797e8ad into rectorphp:master Jul 8, 2019
@ravanscafi ravanscafi deleted the varconstant branch July 8, 2019 16:39
TomasVotruba added a commit that referenced this pull request Jan 21, 2022
rectorphp/rector-src@fca5611 [Php74] Skip curly variable in string quoted on CurlyToSquareBracketArrayStringRector (#1707)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants