summaryrefslogtreecommitdiff
path: root/test/scanners/php/elvis.in.php
blob: 4626a939e5531226a858398b220acdaf6faa51ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$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
)