1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-10-24 17:48:50 +02:00
phorge-arcanist/src/lint/linter/__tests__/xhpast/parens-hug-contents.lint-test
vrana 0b45ec30be Move files in Arcanist one level up
Summary:
- `kill_init.php`
- Manually change library map.
- Manually rename `/data/` test dirs.
- [src/lint/linter] `git mv base/ArcanistLinterTestCase.php __tests__/`
- `arc liberate`

Test Plan: Browse around to make sure I like it better, especially `repository/api`, and `workflow`.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Koolvin

Maniphest Tasks: T1103

Differential Revision: https://secure.phabricator.com/D2637
2012-06-01 11:56:00 -07:00

67 lines
968 B
Text

<?php
if ( $x ) { }
f( );
q( );
g();
if ($x) { }
else if ( $y ) { }
$obj->m(
$x,
$y,
$z);
for ( $ii = 0; $ii < 1; $ii++ ) { }
foreach ( $x as $y ) { }
function q( $x ) { }
final class X {
public function f( $y ) {
}
}
foreach ( $z as $k => $v ) {
}
some_call( /* respect authorial intent */ $b,
$a // if comments are present
);
~~~~~~~~~~
warning:2:5
warning:2:8
warning:3:3
warning:4:3
warning:7:10
warning:7:13
warning:13:6
warning:13:30
warning:14:10
warning:14:19
warning:15:12
warning:15:15
error:16:13 XHP19 Class-Filename Mismatch
warning:17:21
warning:17:24
warning:20:10
warning:20:25
~~~~~~~~~~
<?php
if ($x) { }
f();
q();
g();
if ($x) { }
else if ($y) { }
$obj->m(
$x,
$y,
$z);
for ($ii = 0; $ii < 1; $ii++) { }
foreach ($x as $y) { }
function q($x) { }
final class X {
public function f($y) {
}
}
foreach ($z as $k => $v) {
}
some_call( /* respect authorial intent */ $b,
$a // if comments are present
);