com php-langspec: Avoid static call to non-static method: tests/traits/traits.phpt
| From: | Nikita Popov | Date: | Mon, 08 Apr 2019 07:12:32 +0000 |
| Subject: | com php-langspec: Avoid static call to non-static method: tests/traits/traits.phpt | ||
| Groups: | php.standards.cvs | ||
| Request: | Send a blank email to standards--cvs+get-437@lists.php.net to get a copy of this message | ||
Commit: 2f0881e79809cb0e910b38208f60a46106a60cf3
Author: Nikita Popov <nikita.ppv@gmail.com> Mon, 8 Apr 2019 09:12:32 +0200
Parents: 231e64995d5e6446101aa3da0d5ef62e2b5f204f
Branches: master
Link: http://git.php.net/?p=php-langspec.git;a=commitdiff;h=2f0881e79809cb0e910b38208f60a46106a60cf3
Log:
Avoid static call to non-static method
Changed paths:
M tests/traits/traits.phpt
Diff:
diff --git a/tests/traits/traits.phpt b/tests/traits/traits.phpt
index 4aebc6d..6887bad 100644
--- a/tests/traits/traits.phpt
+++ b/tests/traits/traits.phpt
@@ -238,9 +238,8 @@ trait T7
}
}
-T7::f(); // calls f like a static function with class name being the trait name
+// T7::f(); // Static call to non-static method is not allowed
-echo "-------\n";
T7::g();
/*
@@ -336,10 +335,6 @@ $v = 1
Inside T6::f
$v = 2
===================== Using a Trait without a Class =========================
-%AInside T7
-Inside T7
-Inside T7::f
--------
Inside T7
Inside T7
Inside T7::g