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

« back to all changes in this revision

Viewing changes to src/lint/linter/__tests__/xhpast/decl-parens-hug-closing.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
 
 
3
function f($x) {}
 
4
function g($x ) {}
 
5
 
 
6
function &h($x) {}
 
7
function &i($x ) {}
 
8
 
 
9
final class X {
 
10
 
 
11
  function a($x) {}
 
12
  function b($x ) {}
 
13
 
 
14
  final public static function &c($x) {}
 
15
  final public static function &d($x ) {}
 
16
 
 
17
  abstract private function e($x);
 
18
  abstract private function f($x );
 
19
 
 
20
}
 
21
 
 
22
f(function($x) {});
 
23
f(function($x ) {});
 
24
f(function($x ) use ($z) {});
 
25
~~~~~~~~~~
 
26
warning:4:14
 
27
warning:7:15
 
28
error:9:13
 
29
warning:12:16
 
30
warning:15:37
 
31
warning:18:33
 
32
warning:23:14
 
33
warning:24:14
 
34
~~~~~~~~~~
 
35
<?php
 
36
 
 
37
function f($x) {}
 
38
function g($x) {}
 
39
 
 
40
function &h($x) {}
 
41
function &i($x) {}
 
42
 
 
43
final class X {
 
44
 
 
45
  function a($x) {}
 
46
  function b($x) {}
 
47
 
 
48
  final public static function &c($x) {}
 
49
  final public static function &d($x) {}
 
50
 
 
51
  abstract private function e($x);
 
52
  abstract private function f($x);
 
53
 
 
54
}
 
55
 
 
56
f(function($x) {});
 
57
f(function($x) {});
 
58
f(function($x) use ($z) {});