summaryrefslogtreecommitdiff
path: root/test/scanners/php/elvis.in.php
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2009-12-28 07:27:12 +0000
committermurphy <murphy@rubychan.de>2009-12-28 07:27:12 +0000
commit432aeb74d5a49e6f0efd1063113cef099c93aef6 (patch)
treef300ae05c2418721ea188ca1acc763cff06e71b7 /test/scanners/php/elvis.in.php
parent1982b2bf7e7bfa333838cf2f3e7613c00d2a67c3 (diff)
downloadcoderay-432aeb74d5a49e6f0efd1063113cef099c93aef6.tar.gz
Copying changes and fixes for 0.9.0rc3 from terminal-encoder branch over to trunk.
Diffstat (limited to 'test/scanners/php/elvis.in.php')
-rw-r--r--test/scanners/php/elvis.in.php28
1 files changed, 27 insertions, 1 deletions
diff --git a/test/scanners/php/elvis.in.php b/test/scanners/php/elvis.in.php
index aee46c0..4626a93 100644
--- a/test/scanners/php/elvis.in.php
+++ b/test/scanners/php/elvis.in.php
@@ -1 +1,27 @@
-$this?$is+NO:$label
+$this?$is+NO:$label;
+
+// Two labels:
+foo: switch (TYPE(v)) {
+ case T_CLASS: case T_MODULE:
+ rb_str_append(s, rb_inspect(v));
+ break;
+ default:
+ bar:
+ rb_str_append(s, rb_any_to_s(v));
+ break;
+}
+// These are two more labels:
+function(call);
+label2: label3: a = b + c;
+
+// Another label:
+if (1) {
+ label4: a = b + c;
+}
+
+// Not a label.
+test(
+ a?
+ b:
+ c
+) \ No newline at end of file