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

NoUnsetOnPropertyFixer - refactor and bugfixes #4022

Merged
merged 1 commit into from Dec 30, 2018
Merged

NoUnsetOnPropertyFixer - refactor and bugfixes #4022

merged 1 commit into from Dec 30, 2018

Conversation

kubawerlos
Copy link
Contributor

Replaces #4020
Fix #3843

@SpacePossum
Copy link
Contributor

Looking good!

For completeness, can you extract tests from these cases;

<?php

function a()
{
    return [1 => 2];
}

unset(a()[b()['a']]);
unset(a()[b()]);
unset(a()['a']);
unset(a(){'a'});

function c(&$a)
{
    return $a;
}

$a = new \stdClass();
$a->a = 1;
unset(c($a)->a);

var_dump($a);
die;

@SpacePossum SpacePossum added this to the 2.12.5 milestone Oct 23, 2018
@keradus keradus changed the title Refactor (with bugfixes) NoUnsetOnPropertyFixer NoUnsetOnPropertyFixer - refactor and bugfixes\ Dec 30, 2018
@keradus keradus changed the title NoUnsetOnPropertyFixer - refactor and bugfixes\ NoUnsetOnPropertyFixer - refactor and bugfixes Dec 30, 2018
@keradus
Copy link
Member

keradus commented Dec 30, 2018

Thank you @kubawerlos.

@keradus keradus merged commit e43137a into PHP-CS-Fixer:2.12 Dec 30, 2018
keradus added a commit that referenced this pull request Dec 30, 2018
This PR was squashed before being merged into the 2.12 branch (closes #4022).

Discussion
----------

NoUnsetOnPropertyFixer - refactor and bugfixes

Replaces #4020
Fix #3843

Commits
-------

e43137a NoUnsetOnPropertyFixer - refactor and bugfixes
@kubawerlos kubawerlos deleted the refactoring/no-unset-on-property branch December 30, 2018 18:10
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

4 participants