You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.
function test()
{
$userHelper = [1,2];
unset($options[0]);
}
Refactoring the secound line in the function will fail to take account for the unsetting changing $options and it needing to be retuned or passed by reference.
function test()
{
$options = [1,2];
$this->asd($options);
}
private function asd($options)
{
unset($options[0]);
}
expected
function test()
{
$options = [1,2];
$options = $this->asd($options);
}
private function asd($options)
{
unset($options[0]);
return $options;
}
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Refactoring the secound line in the function will fail to take account for the unsetting changing $options and it needing to be retuned or passed by reference.
expected
The text was updated successfully, but these errors were encountered: