1
@codingStandardsChangeSetting Generic.WhiteSpace.ScopeIndent tabIndent false
2
<meta name="twitter:site" content="<?php echo $metaTagsData['twitter:site']; ?>">
18
echo 'hello'; // no error here as its more than 4 spaces.
47
if ($form->validate()) {
48
$safe = $form->getSubmitValues();
56
function __construct()
58
// $this->open(); // error here
61
public function open()
63
// Some inline stuff that shouldn't error
64
if (TRUE) echo 'hello';
65
foreach ($tokens as $token) echo $token;
69
* This is a comment 1.
70
* This is a comment 2.
71
* This is a comment 3.
72
* This is a comment 4.
74
public function close()
80
foreach ($tokens as $token) {
99
foreach ($tokens as $token) {
100
for ($i = 0; $i < $token; $i++) {
112
This is another c style comment 1.
113
This is another c style comment 2.
114
This is another c style comment 3.
115
This is another c style comment 4.
116
This is another c style comment 5.
119
/* This is a T_COMMENT
125
/** This is a T_DOC_COMMENT
129
This T_COMMENT has a newline in it.
133
public function read()
142
'hello again' => array(
152
public function parse()
155
foreach ($t as $ndx => $token) {
156
if (is_array($token)) {
159
$ts[] = array("token" => $token, "value" => '');
161
$last = count($ts) - 1;
167
$ts[0]['token'] != T_CLASS &&
168
$ts[$last - 2]['token'] == T_OBJECT_OPERATOR &&
169
$ts[$last - 3]['token'] == T_VARIABLE ) {
176
array_push($braces, $token);
184
public function test()
198
if ($a === true || $a === true || $a === true || $a === true ||
199
$a === true || $a === true || $a === true || $a === true) {
205
/* First comment line
212
/* First comment line
222
/* taken from http://de3.php.net/manual/en/reserved.php */
224
/* taken from http://de3.php.net/manual/en/reserved.php */
228
foreach ($elements as $element) {
231
} else if ($somethingElse) {
238
string that spans $numLines lines
245
string that spans nultiple lines
252
string that spans nultiple lines
265
function temp($foo, $bar) {
306
function myFunction()
364
// Testing anon function.
394
$myFunction = function() {
403
protected $_protectedArray = array(
404
'normalString' => 'That email address is already in use!',
405
'offendingString' => <<<'STRING'
406
Each line of this string is always said to be at column 0,
407
no matter how many spaces are placed
408
at the beginning of each line
409
and the ending STRING on the next line is reported as having to be indented.
416
public static function myFunction()
418
if (empty($keywords) === FALSE) {
429
$var = call_user_func(
430
$new_var = function () use (&$a) {
441
public function getAnonFn()
444
'functions' => Array(
445
'function1' => function ($a, $b, $c) {
448
return Array($a, $b, $c);
458
if ($myvar == 'test') {
465
if ($myvar == 'test') {
472
if ($myvar == 'test') {
479
if (isset($_GET["test"])) {
480
if ($_GET["test"] <> "") {
510
<?php if (isset($param)) { ?>
515
'fn' => function ($a) {
523
'fn' => function ($a) {
531
foreach ($bar as $baz) {
561
<title><?= CHtml::encode($this->pageTitle); ?></title>
579
function foo(){return function(){};}
581
$mockedDatabase->expects($this->at(2))
582
->with($this->callback(
589
/** @var Database $mockedDatabase */
590
/** @var Container $mockedContainer */
592
echo $string->append('foo')
607
if ($arg2 == 'foo') {
614
if ($tokens[$stackPtr]['content']{0} === '#') {
615
} else if ($tokens[$stackPtr]['content']{0} === '/'
616
&& $tokens[$stackPtr]['content']{1} === '/'
620
$var = call_user_func(
623
$new_var = function() {
667
$failingTests[$testName][] = array(
668
'comment' => self::_replaceKeywords($failingComment, $result),
669
'screenshot' => Test::getScreenshotPath(
671
$result['class_name'],
677
$this->mockedDatabase
686
$this->subject->recordLogin();
702
if (static::$a[$b] === null) {
703
static::$a[$b] = new static(
712
return static::$a[$b];
717
'bar' => function ($baz) {
735
class PHP_CodeSniffer_Tokenizers_JS
738
public $scopeOpeners = array(
742
T_RETURN => T_RETURN,
759
$str = 'the items I want to show are: ' .
774
'foo' => foo(function () {
779
$domains = array_unique(
782
$urlObject = new \Purl\Url($url);
783
return $urlObject->registerableDomain;
798
echo "a is neither 5 nor 6";
803
elseif ($baz) $foo = 2;
816
myMethod as renamedMethod;
823
myMethod as renamedMethod;
830
'key1' => function ($bar) {
833
'key2' => function ($foo) {
840
} catch (\Exception $e) {
844
echo 'finally false';