~ubuntu-branches/ubuntu/wily/phabricator/wily

« back to all changes in this revision

Viewing changes to src/lint/linter/__tests__/xhpast/duplicate-key-in-array.lint-test

  • Committer: Package Import Robot
  • Author(s): Richard Sellam
  • Date: 2014-11-01 23:20:06 UTC
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: package-import@ubuntu.com-20141101232006-mvlnp0cil67tsboe
Tags: upstream-0~git20141101/arcanist
Import upstream version 0~git20141101, component arcanist

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
$a = array(
 
3
  'a' => 'val1',
 
4
  $a => 'val2',
 
5
  'a' => val3(),
 
6
  1 => val4(),
 
7
  '1' => val5(),
 
8
  1 => $val6,
 
9
  'b' => 'val7',
 
10
  b() => 'val8',
 
11
);
 
12
static $b = array(
 
13
  1 => 'one',
 
14
  2 => 'two',
 
15
  2 => 'TWO',
 
16
);
 
17
$c = array();
 
18
$d = array(
 
19
  A => 'ay',
 
20
  A => 'aye',
 
21
  'A' => 'AYE',
 
22
);
 
23
$e = array(
 
24
  self::B => 'bee',
 
25
  self::B => 'bea',
 
26
  self::b() => 'ehh',
 
27
  self::$b => 'weh',
 
28
  B => 'b',
 
29
  C::B => 'cb',
 
30
);
 
31
$f = array(
 
32
  $a => 'var',
 
33
  'a' => 'lit',
 
34
  $a => 'var2',
 
35
);
 
36
~~~~~~~~~~
 
37
error:5:3
 
38
error:8:3
 
39
error:15:3
 
40
error:20:3
 
41
error:25:3
 
42
error:34:3