-
Notifications
You must be signed in to change notification settings - Fork 201
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
implemented requirements of the PHP 8 #348
base: master
Are you sure you want to change the base?
Conversation
public function __construct($name, $field = null, $origin = null, $ranges = [], $unit = null, $distanceType = null) | ||
{ | ||
public function __construct( | ||
protected string $name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you change properties to protected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
$extendedBoundsMin = null, | ||
$extendedBoundsMax = null, | ||
$keyed = null | ||
private string $name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you changed visibility to private?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, there will be a mixture of properties and method parameters
* @throws \LogicException | ||
*/ | ||
private function isRequiredParametersSet($a) | ||
private function isRequiredParametersSet(array $a): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous implementation returned bool
, why did you changed to void
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Implemented requirements of the PHP 8