Update tests to follow new syntax.
一些检查报告了错误
The build has failed.

这个提交包含在:
2019-03-17 19:48:52 +01:00
父节点 c26f8cd777
当前提交 ff73690111
共有 14 个文件被更改,包括 43 次插入43 次删除

查看文件

@@ -1,11 +1,11 @@
final class Test {
private $value;
private int $value;
private function __construct() {
private void __construct() {
}
/* This is singleton */
public function getInstance() {
public object getInstance() {
static object $instance;
if(!$instance) {
$instance = new Test();
@@ -13,17 +13,17 @@ final class Test {
return $instance;
}
public function get() {
public int get() {
return $this->value;
}
public function set(int $value = 0) {
public int set(int $value = 0) {
$this->value = $value;
}
}
final class Program {
public function main() {
public void main() {
object $testA = Test::getInstance();
$testA->set(5);
object $testB = Test::getInstance();