Conversation
Removed references to properties on `$this` which is not needed as of PHP 5.4, which is the minimum requirement in composer.json. > https://secure.php.net/manual/en/functions.anonymous.php > > As of PHP 5.4.0, when declared in the context of a class, the current > class is automatically bound to it, making $this available inside of > the function's scope.
|
Just a note, not sure whether it applies to this code: Such constructions are sometimes used to avoid cyclic references. |
|
This code does not avoid any references, it is just a complicated way to express a reference to a class property that can be directly accesses instead. This was necessary with PHP 5.3, but it is not necessary anymore in PHP 5.4, so since a0becdb#diff-b5d0ee8c97c7abd7e3fa29b9a27d1780L7 it can be changed. |
clue
left a comment
There was a problem hiding this comment.
@cebe Thank you for your contribution! 👍 I agree that these references aren't needed right now and as such it makes sense to remove these.
Note that I'm currently working on #41 which will eventually remove the complete Request class anyway.
In the meantime, it may make sense to get this suggested PR in 👍
Removed references to properties on
$thiswhich is not needed as ofPHP 5.4, which is the minimum requirement in composer.json.