Update tests to follow new syntax.
Some checks reported errors
The build has failed.

This commit is contained in:
2019-03-17 19:48:52 +01:00
parent c26f8cd777
commit ff73690111
14 changed files with 43 additions and 43 deletions

View File

@@ -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();