PHP Classes

File: vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/IncrementDecrementUsageUnitTest.inc

Recommend this page to a friend!
  Classes of Adeleye Ayodeji   Download Installed Plugin   vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/IncrementDecrementUsageUnitTest.inc   Download  
File: vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/IncrementDecrementUsageUnitTest.inc
Role: Example script
Content type: text/plain
Description: Example script
Class: Download Installed Plugin
Download a WordPress plugin as a ZIP archive
Author: By
Last change:
Date: 2 days ago
Size: 978 bytes
 

Contents

Class file image Download
<?php
$var
= ($var + 1);
$var = ($one + 1);
$var = ($var + 2);
$var = ($one + $two + 1);
$var += 1;
$var += 2;
$var += $one;
$var += (1 + 2)
$var = myFunction($var, ($one + 1));

$var = ($var - 1);
$var = ($one - 1);
$var = ($var - 2);
$var = ($one - $two - 1);
$var -= 1;
$var -= 2;
$var -= $one;
$var -= (1 + 2)
$var = myFunction($var, ($one - 1));

$var -= $var - 1;
$var += $var - 1;

$id = $id.'_'.($i-- - $x--).'_'.$x;
$id = $id.'_'.(++$i - $x--).'_'.$x;
$id = $id.'_'.(--$i - $x++).'_'.$x;

$id = $id.'_'.$i++;
$id = $id.'_'.($i++);
$id = $id.'_'.$i--.'_';
$id = $id.'_'.($i--).'_';

$var = (1 - $var);
$var = (1 + $var);

$expected[$i]['sort_order'] = ($i + 1);
$expected[($i + 1)]['sort_order'] = ($i + 1);

$id = $id.($obj->i++).$id;
$id = $obj?->i++.$id;
$id = $obj?->i++*10;

$var+=1;
$var-=1;

$var=$var+1;
$var=$var-1;

$var /*comment*/ +=1;
$var
   
// phpcs:ignore Something
   
-=1;

$var += /*comment*/ 1;
$var = ( $var /*comment*/ - 1 /*comment*/);