Skip to content

Commit

Permalink
Fix CS/WS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jun 28, 2019
1 parent 688e4bd commit 900be38
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Util/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function __construct(bool $convertDeprecationsToExceptions, bool $convert

public function __invoke(int $errorNumber, string $errorString, string $errorFile, int $errorLine): bool
{
/**
/*
* Do not raise an exception when the error suppression operator (@) was used.
*
* @see https://github.com/sebastianbergmann/phpunit/issues/3739
Expand Down
12 changes: 10 additions & 2 deletions tests/end-to-end/regression/GitHub/3739/Issue3739Test.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Issue3739;

use PHPUnit\Framework\TestCase;
Expand All @@ -7,12 +15,12 @@ class Issue3739
{
public function unlinkFileThatDoesNotExistWithErrorSuppression(): bool
{
return @unlink(__DIR__ . '/DOES_NOT_EXIST');
return @\unlink(__DIR__ . '/DOES_NOT_EXIST');
}

public function unlinkFileThatDoesNotExistWithoutErrorSuppression(): bool
{
return unlink(__DIR__ . '/DOES_NOT_EXIST');
return \unlink(__DIR__ . '/DOES_NOT_EXIST');
}
}

Expand Down

0 comments on commit 900be38

Please sign in to comment.