mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-26 14:20:04 +08:00
25 lines
500 B
Plaintext
Vendored
25 lines
500 B
Plaintext
Vendored
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
|
|
}
|
|
}
|