~ubuntu-branches/ubuntu/vivid/phabricator/vivid-proposed

« back to all changes in this revision

Viewing changes to arcanist/src/lint/linter/__tests__/xhpast/space-around-operators.lint-test

  • Committer: Package Import Robot
  • Author(s): Richard Sellam
  • Date: 2014-10-23 20:49:26 UTC
  • mfrom: (0.2.1) (0.1.1)
  • Revision ID: package-import@ubuntu.com-20141023204926-vq80u1op4df44azb
Tags: 0~git20141023-1
Initial release (closes: #703046)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
$a + $b;
 
3
$a+$b;
 
4
$a +$b;
 
5
$a+ $b;
 
6
$a = -$b;
 
7
$a=-$b;
 
8
$a-=$b;
 
9
$a -=$b;
 
10
$a-= $b;
 
11
$a===$b;
 
12
$a.$b;
 
13
function x($n=null) {}
 
14
function x($n = null) {}
 
15
 
 
16
$y /* ! */ += // ?
 
17
$z;
 
18
$obj->method();
 
19
Dog::bark();
 
20
$prev = ($total == 1) ? $navids[0] : $navids[$total-1];
 
21
$next = ($total == 1) ? $navids[0] : $navids[$current+1];
 
22
if ($x instanceof z &&$w) {}
 
23
if ($x instanceof z && $w) {}
 
24
f(1,2);
 
25
~~~~~~~~~~
 
26
warning:3:3
 
27
warning:4:4
 
28
warning:5:3
 
29
warning:7:3
 
30
warning:8:3
 
31
warning:9:4
 
32
warning:10:3
 
33
warning:11:3
 
34
warning:13:14
 
35
warning:20:52
 
36
warning:21:54
 
37
warning:22:21
 
38
warning:24:4
 
39
~~~~~~~~~~
 
40
<?php
 
41
$a + $b;
 
42
$a + $b;
 
43
$a + $b;
 
44
$a + $b;
 
45
$a = -$b;
 
46
$a = -$b;
 
47
$a -= $b;
 
48
$a -= $b;
 
49
$a -= $b;
 
50
$a === $b;
 
51
$a.$b;
 
52
function x($n = null) {}
 
53
function x($n = null) {}
 
54
 
 
55
$y /* ! */ += // ?
 
56
$z;
 
57
$obj->method();
 
58
Dog::bark();
 
59
$prev = ($total == 1) ? $navids[0] : $navids[$total - 1];
 
60
$next = ($total == 1) ? $navids[0] : $navids[$current + 1];
 
61
if ($x instanceof z && $w) {}
 
62
if ($x instanceof z && $w) {}
 
63
f(1, 2);