Code-TidyAll

 view release on metacpan or  search on metacpan

php/PHP_CodeSniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.inc.fixed  view on Meta::CPAN

    $file = '...'.substr($file, (($padding * -1) + 3));
}

if (substr($basename, -5) !== 'Sniff') {
    $i = ($this->_tokens[$i]['parenthesis_closer'] + 1);
}

$pos = $this->_getShortCommentEndPos();
if ($pos === -1) {
    $stackPtr = ($tokens[$next][$to] - 1);
    $stackPtr = ($tokens[$next][$pattern[$i]['to']] + 1);
    $var = (($var1 + $var2) + $var3 + $var4)
}

$commentStart = ($phpcsFile->findPrevious(T_DOC_COMMENT, ($commentEnd - 1), null, true) + 1);
$commentEnd   = ($this->_phpcsFile->findNext(T_DOC_COMMENT, ($commentStart + 1), null, true) - 1);
$expected    .= '...'.substr($tokens[($stackPtr - 2)]['content'], -5).$tokens[$stackPtr]['content'];

if (($tokens[($nextToken - 1)]['code']) !== T_WHITESPACE) {
    $errorPos = ($params[(count($params) - 1)]->getLine() + $commentStart);
}

while (($nextSpace = $phpcsFile->findNext(T_WHITESPACE, ($nextSpace + 1), $nextBreak)) !== false) {
}

foreach ($attributes as $id => &$attribute) {
}

class MyClass
{


    public function &myFunction(array &$one, array &$two)
    {

    }//end myFunction()


}//end class

if ($index < -1) $index = 0;
if ($index < - 1) $index = 0;

$three = ceil($one / $two);
$three = ceil(($one / $two) / $four);
$three = ceil($one / ($two / $four));

$four = -0.25;

$three = ceil($one[1] / $two);

switch ($number % 10) {
    case -1:
        $suffix = 'st';
    break;
}

$expectedPermission = array(
                       'granted'        => 4,
                       'denied'         => 1,
                       'cascade'        => TRUE,
                       'blockergranted' => 2,
                       'blockerdenied'  => - 3,
                       'effective'      => TRUE,
                      );

$value = ((int) isset($blah) + 2);
$value = ((int) isset($blah) + (int) isset($foo) + (int) isset($bar));

(doSomething(getValue($var, 2)) - $y);

$codeFiles = (array($global => $codeFiles[$global]) + $codeFiles);

$var = array(-1);
$var = [-1];
$var = [0, -1, -2];

$cntPages = ceil(count($items) / self::ON_PAGE);

error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
error_reporting(E_ALL & ~E_NOTICE | ~E_WARNING);
$results = $stmt->fetchAll(\PDO::FETCH_ASSOC | \PDO::FETCH_GROUP | \PDO::FETCH_UNIQUE);
$di = new \RecursiveDirectoryIterator($path, (\RecursiveDirectoryIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS));
foo(1 + 2 + 3);

if (empty($foo[-1]) === true) {
    $foo[-1] = 'foo';
}

try {
} catch (AException | BException $e) {
}

$var = ($foo['blah'] + []);

$a = 2 * ${x} - ${minus};

$foo = ($bar ?? $baz ?? '');

$foo = $myString{-1};

$value = ((binary) $blah + b"binary $foo");

$test = (1 * static::TEST);
$test = myfunc(1 * static::TEST);



( run in 1.218 second using v1.01-cache-2.11-cpan-39bf76dae61 )