Skip to content
New issue

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

Fix breaking syntax on removing useless one-line return type hint #931

Merged
merged 1 commit into from
Mar 24, 2020

Conversation

nightlinus
Copy link
Contributor

Fixing useless return type hint was breaking php syntax
Example

<?php
declare(strict_types=1);
/**
 * Date: 2/16/2018
 * Time: 1:42 PM
 *
 * @package
 * @author
 */
class TestClass
{

    /** @return string */
    public function test(): string
    {
    }
}

Transformed into

<?php
declare(strict_types=1);
/**
 * Date: 2/16/2018
 * Time: 1:42 PM
 *
 * @package
 */
    public function test(): string
    {
    }
}

Because of error in detecting changeStart offset.

@kukulich
Copy link
Contributor

@nightlinus Could you please change commit message to format `SniffName: What is changed" ? See my commits https://github.com/slevomat/coding-standard/commits/master

@nightlinus
Copy link
Contributor Author

@nightlinus Could you please change commit message to format `SniffName: What is changed" ? See my commits https://github.com/slevomat/coding-standard/commits/master

yep, done

@kukulich kukulich merged commit 5d1c5f1 into slevomat:master Mar 24, 2020
@kukulich kukulich added the Bug label Mar 24, 2020
@kukulich kukulich added this to the 6.2.0 milestone Mar 24, 2020
@nightlinus
Copy link
Contributor Author

Thank you, amazing speed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants