From 499357cb41a20583f7a9f91970e6e576bcf00580 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Tue, 24 Oct 2017 23:52:44 -0400 Subject: [PATCH] PHPCS fixes --- src/Collection/CollectionTrait.php | 1 + tests/TestCase/Console/ConsoleOptionParserTest.php | 4 ++-- tests/TestCase/Console/ConsoleOutputTest.php | 2 +- tests/TestCase/Console/ShellTest.php | 4 ++-- tests/TestCase/Error/DebuggerTest.php | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Collection/CollectionTrait.php b/src/Collection/CollectionTrait.php index 29e3628cc3c..f63f0644efa 100644 --- a/src/Collection/CollectionTrait.php +++ b/src/Collection/CollectionTrait.php @@ -731,6 +731,7 @@ public function unwrap() public function _unwrap() { deprecationWarning('CollectionTrait::_unwrap() is deprecated. Use CollectionTrait::unwrap() instead.'); + return $this->unwrap(); } diff --git a/tests/TestCase/Console/ConsoleOptionParserTest.php b/tests/TestCase/Console/ConsoleOptionParserTest.php index 2775299aa01..98cfc529ca4 100644 --- a/tests/TestCase/Console/ConsoleOptionParserTest.php +++ b/tests/TestCase/Console/ConsoleOptionParserTest.php @@ -34,7 +34,7 @@ class ConsoleOptionParserTest extends TestCase */ public function testDescriptionDeprecated() { - $this->deprecated(function() { + $this->deprecated(function () { $parser = new ConsoleOptionParser('test', false); $result = $parser->description('A test'); @@ -68,7 +68,7 @@ public function testDescription() */ public function testEplilogDeprecated() { - $this->deprecated(function() { + $this->deprecated(function () { $parser = new ConsoleOptionParser('test', false); $result = $parser->epilog('A test'); diff --git a/tests/TestCase/Console/ConsoleOutputTest.php b/tests/TestCase/Console/ConsoleOutputTest.php index 0772466aa56..9fbc2670c22 100644 --- a/tests/TestCase/Console/ConsoleOutputTest.php +++ b/tests/TestCase/Console/ConsoleOutputTest.php @@ -229,7 +229,7 @@ public function testFormattingMultipleSameTags() */ public function testOutputAsPlain() { - $this->deprecated(function() { + $this->deprecated(function () { $this->output->outputAs(ConsoleOutput::PLAIN); $this->assertSame(ConsoleOutput::PLAIN, $this->output->outputAs()); $this->output->expects($this->once())->method('_write') diff --git a/tests/TestCase/Console/ShellTest.php b/tests/TestCase/Console/ShellTest.php index b72457bd43d..2c21a459596 100644 --- a/tests/TestCase/Console/ShellTest.php +++ b/tests/TestCase/Console/ShellTest.php @@ -168,7 +168,7 @@ public function testConstruct() */ public function testIo() { - $this->deprecated(function() { + $this->deprecated(function () { $this->assertInstanceOf(ConsoleIo::class, $this->Shell->io()); $io = $this->getMockBuilder(ConsoleIo::class) @@ -470,7 +470,7 @@ public function testError() ->method('err') ->with('Searched all...'); - $this->deprecated(function() { + $this->deprecated(function () { $this->Shell->error('Foo Not Found', 'Searched all...'); $this->assertSame($this->Shell->stopped, 1); }); diff --git a/tests/TestCase/Error/DebuggerTest.php b/tests/TestCase/Error/DebuggerTest.php index bb415407915..1d712a0955d 100644 --- a/tests/TestCase/Error/DebuggerTest.php +++ b/tests/TestCase/Error/DebuggerTest.php @@ -146,7 +146,7 @@ public function testExcerpt() */ public function testOutputAs() { - $this->deprecated(function() { + $this->deprecated(function () { Debugger::outputAs('html'); $this->assertEquals('html', Debugger::outputAs()); }); @@ -173,7 +173,7 @@ public function testSetOutputFormat() */ public function testOutputAsException() { - $this->deprecated(function() { + $this->deprecated(function () { Debugger::outputAs('Invalid junk'); }); }