diff options
author | Grégoire Pineau <lyrixx@lyrixx.info> | 2017-06-19 01:41:02 +0200 |
---|---|---|
committer | Jordi Boggiano <j.boggiano@seld.be> | 2017-06-19 01:41:02 +0200 |
commit | 5a041bab8f16c88cb7f4767f2fc32434c67d1dc2 (patch) | |
tree | 0767597f2891a899b67333189f4cc4e4a9ea8fe6 /tests/Monolog/Handler/RotatingFileHandlerTest.php | |
parent | 91a0f40927b58e01579ea12469eef5ce2a833687 (diff) | |
download | monolog-5a041bab8f16c88cb7f4767f2fc32434c67d1dc2.zip monolog-5a041bab8f16c88cb7f4767f2fc32434c67d1dc2.tar.gz monolog-5a041bab8f16c88cb7f4767f2fc32434c67d1dc2.tar.bz2 |
Use callable typehint where possible + Removed dead code (#996)
* Removed dead code
* Use callable typehint where possible
* Removed PHP5.3 workaround
Diffstat (limited to 'tests/Monolog/Handler/RotatingFileHandlerTest.php')
-rw-r--r-- | tests/Monolog/Handler/RotatingFileHandlerTest.php | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/Monolog/Handler/RotatingFileHandlerTest.php b/tests/Monolog/Handler/RotatingFileHandlerTest.php index 1eb6413..be36eff 100644 --- a/tests/Monolog/Handler/RotatingFileHandlerTest.php +++ b/tests/Monolog/Handler/RotatingFileHandlerTest.php @@ -19,13 +19,7 @@ use Monolog\Test\TestCase; */ class RotatingFileHandlerTest extends TestCase { - /** - * This var should be private but then the anonymous function - * in the `setUp` method won't be able to set it. `$this` cant't - * be used in the anonymous function in `setUp` because PHP 5.3 - * does not support it. - */ - public $lastError; + private $lastError; public function setUp() { @@ -35,10 +29,8 @@ class RotatingFileHandlerTest extends TestCase $this->markTestSkipped($dir.' must be writable to test the RotatingFileHandler.'); } $this->lastError = null; - $self = $this; - // workaround with &$self used for PHP 5.3 - set_error_handler(function ($code, $message) use (&$self) { - $self->lastError = [ + set_error_handler(function ($code, $message) { + $this->lastError = [ 'code' => $code, 'message' => $message, ]; |