From 368e458a059fadd708359845a3d263542899ed53 Mon Sep 17 00:00:00 2001 From: Egor Gorbachev Date: Mon, 1 Apr 2019 22:54:34 +0300 Subject: [PATCH 1/2] Fix typo (statically -> dynamically) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 672973fb..aeee53e6 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ * Variables assigned in `while` loop condition and `for` loop initial assignment cannot be used after the loop. * Variables set in foreach that's always looped thanks to non-empty arrays cannot be used after the loop. * Types in `switch` condition and `case` value must match. PHP compares them loosely by default and that can lead to unexpected results. -* Statically declared methods are called statically. +* Statically declared methods are called dynamically. * Disallow `empty()` - it's a very loose comparison (see [manual](https://php.net/empty)), it's recommended to use more strict one. * Disallow variable variables (`$$foo`, `$this->$method()` etc.) * Disallow overwriting variables with foreach key and value variables From cd141aeb40d2cb00bd4bf7a14e49a67455b6475f Mon Sep 17 00:00:00 2001 From: Egor Gorbachev Date: Mon, 1 Apr 2019 23:23:54 +0300 Subject: [PATCH 2/2] Reword "Dynamic call to static method" rule --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aeee53e6..271763ee 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ * Variables assigned in `while` loop condition and `for` loop initial assignment cannot be used after the loop. * Variables set in foreach that's always looped thanks to non-empty arrays cannot be used after the loop. * Types in `switch` condition and `case` value must match. PHP compares them loosely by default and that can lead to unexpected results. -* Statically declared methods are called dynamically. +* Check that statically declared methods are called statically. * Disallow `empty()` - it's a very loose comparison (see [manual](https://php.net/empty)), it's recommended to use more strict one. * Disallow variable variables (`$$foo`, `$this->$method()` etc.) * Disallow overwriting variables with foreach key and value variables