mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Make some forced-optional nullable parameters non-optional, PHP 7.1 style
these parameters did not make any sense to be optional, but were forced to be this way because of the way nullable types worked before 7.1.
This commit is contained in:
@ -55,7 +55,7 @@ abstract class Task{
|
||||
/**
|
||||
* @param TaskHandler|null $taskHandler
|
||||
*/
|
||||
final public function setHandler(TaskHandler $taskHandler = null){
|
||||
final public function setHandler(?TaskHandler $taskHandler){
|
||||
if($this->taskHandler === null or $taskHandler === null){
|
||||
$this->taskHandler = $taskHandler;
|
||||
}
|
||||
|
Reference in New Issue
Block a user