mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-27 12:10:06 +08:00
25 lines
500 B
Plaintext
25 lines
500 B
Plaintext
|
class Box<T> {
|
||
|
// ^ type
|
||
|
// ^ type
|
||
|
protected T $data;
|
||
|
// ^ keyword
|
||
|
// ^ type
|
||
|
|
||
|
public function __construct(T $data) {
|
||
|
// ^ type
|
||
|
// ^ parameter
|
||
|
// ^ keyword.function
|
||
|
// ^ keyword
|
||
|
// ^ method
|
||
|
$this->data = $data;
|
||
|
}
|
||
|
|
||
|
public function getData(): T {
|
||
|
// ^ method
|
||
|
// ^ keyword
|
||
|
return $this->data;
|
||
|
// ^ operator
|
||
|
// ^ variable.builtin
|
||
|
}
|
||
|
}
|