Created
March 24, 2022 20:16
-
-
Save iluuu1994/af2c3c75b6a2cb6c7a846c78bac82c46 to your computer and use it in GitHub Desktop.
Accessors for arrays
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Foo { | |
public array $bar { | |
get; | |
/** | |
* @param list<string> $path | |
* @param \Closure(list<string> $path, mixed $value, bool $unset): void $update | |
*/ | |
update(array $path, mixed $value, bool $unset, \Closure $update) {} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment