Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save eeree/609cce9b389f9a9629493e720d067fe6 to your computer and use it in GitHub Desktop.
Save eeree/609cce9b389f9a9629493e720d067fe6 to your computer and use it in GitHub Desktop.
src\test\resources\files\Rule\CleanCode\ErrorControlOperator\ testAppliedToClassesAndMethods.php
<?php
class testAppliedToClassesAndMethods
{
private $baz = 'baz';
public function testAppliedToClassesAndMethods()
{
$foo = @$this->fooBar();
++$foo;
@!$foo = 1 / 0;
if (@is_readable(__FILE__)) {
$bar = new DateTime('now');
@$baz = $bar;
}
$bar = !$foo;
}
private function fooBar()
{
@$foo = $this->baz / 0;
@$baz = !$foo;
return 2;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment