diff options
-rw-r--r-- | t/t4018/php-abstract-class | 4 | ||||
-rw-r--r-- | t/t4018/php-class | 4 | ||||
-rw-r--r-- | t/t4018/php-final-class | 4 | ||||
-rw-r--r-- | t/t4018/php-function | 4 | ||||
-rw-r--r-- | t/t4018/php-interface | 4 | ||||
-rw-r--r-- | t/t4018/php-method | 7 | ||||
-rw-r--r-- | t/t4018/php-trait | 7 | ||||
-rw-r--r-- | userdiff.c | 2 |
8 files changed, 35 insertions, 1 deletions
diff --git a/t/t4018/php-abstract-class b/t/t4018/php-abstract-class new file mode 100644 index 0000000000..5213e12494 --- /dev/null +++ b/t/t4018/php-abstract-class @@ -0,0 +1,4 @@ +abstract class RIGHT +{ + const FOO = 'ChangeMe'; +} diff --git a/t/t4018/php-class b/t/t4018/php-class new file mode 100644 index 0000000000..7785b6303c --- /dev/null +++ b/t/t4018/php-class @@ -0,0 +1,4 @@ +class RIGHT +{ + const FOO = 'ChangeMe'; +} diff --git a/t/t4018/php-final-class b/t/t4018/php-final-class new file mode 100644 index 0000000000..69f5710552 --- /dev/null +++ b/t/t4018/php-final-class @@ -0,0 +1,4 @@ +final class RIGHT +{ + const FOO = 'ChangeMe'; +} diff --git a/t/t4018/php-function b/t/t4018/php-function new file mode 100644 index 0000000000..35717c51c3 --- /dev/null +++ b/t/t4018/php-function @@ -0,0 +1,4 @@ +function RIGHT() +{ + return 'ChangeMe'; +} diff --git a/t/t4018/php-interface b/t/t4018/php-interface new file mode 100644 index 0000000000..86b49ad5d9 --- /dev/null +++ b/t/t4018/php-interface @@ -0,0 +1,4 @@ +interface RIGHT +{ + public function foo($ChangeMe); +} diff --git a/t/t4018/php-method b/t/t4018/php-method new file mode 100644 index 0000000000..03af1a6d9d --- /dev/null +++ b/t/t4018/php-method @@ -0,0 +1,7 @@ +class Klass +{ + public static function RIGHT() + { + return 'ChangeMe'; + } +} diff --git a/t/t4018/php-trait b/t/t4018/php-trait new file mode 100644 index 0000000000..65b8c82a61 --- /dev/null +++ b/t/t4018/php-trait @@ -0,0 +1,7 @@ +trait RIGHT +{ + public function foo($ChangeMe) + { + return 'foo'; + } +} diff --git a/userdiff.c b/userdiff.c index a69241b25d..36af25e7f9 100644 --- a/userdiff.c +++ b/userdiff.c @@ -114,7 +114,7 @@ PATTERNS("perl", "|<<|<>|<=>|>>"), PATTERNS("php", "^[\t ]*(((public|protected|private|static)[\t ]+)*function.*)$\n" - "^[\t ]*(class.*)$", + "^[\t ]*((((final|abstract)[\t ]+)?class|interface|trait).*)$", /* -- */ "[a-zA-Z_][a-zA-Z0-9_]*" "|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+" |