From 58784a5276ede17e5bcda4af4102cfe3efb6644f Mon Sep 17 00:00:00 2001 From: antograssiot Date: Fri, 26 Sep 2014 08:48:37 +0200 Subject: [PATCH] fix CS --- src/Cache/CacheRegistry.php | 2 +- src/Collection/Iterator/BufferedIterator.php | 6 +++--- src/Core/Configure/Engine/IniConfig.php | 2 +- src/Datasource/ResultSetDecorator.php | 2 +- src/Network/Email/SmtpTransport.php | 2 +- src/Network/Response.php | 2 +- src/ORM/Association/SelectableAssociationTrait.php | 2 +- src/Shell/BakeShell.php | 2 +- src/Shell/Task/SimpleBakeTask.php | 2 +- src/TestSuite/Fixture/FixtureManager.php | 2 +- src/TestSuite/IntegrationTestCase.php | 2 +- src/View/Helper/FormHelper.php | 2 +- src/View/Widget/WidgetRegistry.php | 2 +- tests/TestCase/Collection/Iterator/BufferedIteratorTest.php | 2 +- tests/TestCase/Database/Expression/CaseExpressionTest.php | 2 +- tests/TestCase/Log/Engine/FileLogTest.php | 1 + tests/TestCase/Log/LogTraitTest.php | 2 +- tests/TestCase/Model/Behavior/TranslateBehaviorTest.php | 1 - tests/TestCase/Shell/BakeShellTest.php | 2 +- tests/TestCase/Shell/CommandListShellTest.php | 4 ++-- tests/TestCase/Shell/CompletionShellTest.php | 4 ++-- tests/TestCase/Shell/OrmCacheShellTest.php | 2 +- tests/TestCase/Shell/Task/CellTaskTest.php | 2 +- tests/TestCase/Shell/Task/ControllerTaskTest.php | 4 ++-- tests/TestCase/Shell/Task/FixtureTaskTest.php | 4 ++-- tests/TestCase/Shell/Task/ModelTaskTest.php | 4 ++-- tests/TestCase/Shell/Task/TemplateTaskTest.php | 2 +- tests/TestCase/Shell/Task/TestTaskTest.php | 4 ++-- tests/TestCase/Shell/Task/ViewTaskTest.php | 4 ++-- tests/TestCase/View/Helper/HtmlHelperTest.php | 4 ++-- tests/TestCase/View/Widget/WidgetRegistryTest.php | 2 +- tests/test_app/TestApp/Model/Table/AuthorsTable.php | 2 +- 32 files changed, 41 insertions(+), 41 deletions(-) diff --git a/src/Cache/CacheRegistry.php b/src/Cache/CacheRegistry.php index 8e5bc1dbe64..00ff2ca7829 100644 --- a/src/Cache/CacheRegistry.php +++ b/src/Cache/CacheRegistry.php @@ -14,10 +14,10 @@ */ namespace Cake\Cache; +use BadMethodCallException; use Cake\Core\App; use Cake\Core\ObjectRegistry; use RuntimeException; -use BadMethodCallException; /** * An object registry for cache engines. diff --git a/src/Collection/Iterator/BufferedIterator.php b/src/Collection/Iterator/BufferedIterator.php index fe6fb3c2405..8142ffcc5dd 100644 --- a/src/Collection/Iterator/BufferedIterator.php +++ b/src/Collection/Iterator/BufferedIterator.php @@ -56,14 +56,14 @@ class BufferedIterator extends Collection implements Countable { * Whether or not the internal iterator's rewind method was already * called * - * @var boolean + * @var bool */ protected $_started = false; /** * Whether or not the internal iterator has reached its end. * - * @var boolean + * @var bool */ protected $_finished = false; @@ -114,7 +114,7 @@ public function rewind() { /** * Returns whether or not the iterator has more elements * - * @return boolean + * @return bool */ public function valid() { if ($this->_buffer->offsetExists($this->_index)) { diff --git a/src/Core/Configure/Engine/IniConfig.php b/src/Core/Configure/Engine/IniConfig.php index 33fb76afcd2..baf1c39bfab 100644 --- a/src/Core/Configure/Engine/IniConfig.php +++ b/src/Core/Configure/Engine/IniConfig.php @@ -15,8 +15,8 @@ namespace Cake\Core\Configure\Engine; use Cake\Core\Configure\ConfigEngineInterface; -use Cake\Core\Plugin; use Cake\Core\Exception\Exception; +use Cake\Core\Plugin; use Cake\Utility\Hash; /** diff --git a/src/Datasource/ResultSetDecorator.php b/src/Datasource/ResultSetDecorator.php index bfe742936fd..82c1406b804 100644 --- a/src/Datasource/ResultSetDecorator.php +++ b/src/Datasource/ResultSetDecorator.php @@ -14,8 +14,8 @@ */ namespace Cake\Datasource; -use Cake\Datasource\ResultSetInterface; use Cake\Collection\Collection; +use Cake\Datasource\ResultSetInterface; /** * Generic ResultSet decorator. This will make any traversable object appear to diff --git a/src/Network/Email/SmtpTransport.php b/src/Network/Email/SmtpTransport.php index ed4facf4b9b..ced5d68e458 100644 --- a/src/Network/Email/SmtpTransport.php +++ b/src/Network/Email/SmtpTransport.php @@ -14,8 +14,8 @@ */ namespace Cake\Network\Email; -use Cake\Network\Socket; use Cake\Network\Exception\SocketException; +use Cake\Network\Socket; /** * Send mail using SMTP protocol diff --git a/src/Network/Response.php b/src/Network/Response.php index f4fee1f859f..0833601a14f 100644 --- a/src/Network/Response.php +++ b/src/Network/Response.php @@ -15,8 +15,8 @@ namespace Cake\Network; use Cake\Core\Configure; -use Cake\Network\Exception\NotFoundException; use Cake\Filesystem\File; +use Cake\Network\Exception\NotFoundException; use InvalidArgumentException; /** diff --git a/src/ORM/Association/SelectableAssociationTrait.php b/src/ORM/Association/SelectableAssociationTrait.php index c88c00451d7..1f30efdc381 100644 --- a/src/ORM/Association/SelectableAssociationTrait.php +++ b/src/ORM/Association/SelectableAssociationTrait.php @@ -14,8 +14,8 @@ */ namespace Cake\ORM\Association; -use Cake\Database\Expression\TupleComparison; use Cake\Database\Expression\IdentifierExpression; +use Cake\Database\Expression\TupleComparison; /** * Represents a type of association that that can be fetched using another query diff --git a/src/Shell/BakeShell.php b/src/Shell/BakeShell.php index 81ddf1087dc..ca9acdd210d 100644 --- a/src/Shell/BakeShell.php +++ b/src/Shell/BakeShell.php @@ -17,10 +17,10 @@ use Cake\Cache\Cache; use Cake\Console\Shell; use Cake\Core\Configure; +use Cake\Core\ConventionsTrait; use Cake\Core\Plugin; use Cake\Datasource\ConnectionManager; use Cake\Model\Model; -use Cake\Core\ConventionsTrait; use Cake\Utility\Inflector; /** diff --git a/src/Shell/Task/SimpleBakeTask.php b/src/Shell/Task/SimpleBakeTask.php index 690d722b069..54c55b66a0f 100644 --- a/src/Shell/Task/SimpleBakeTask.php +++ b/src/Shell/Task/SimpleBakeTask.php @@ -15,9 +15,9 @@ namespace Cake\Shell\Task; use Cake\Console\Shell; -use Cake\Shell\Task\BakeTask; use Cake\Core\Configure; use Cake\Core\Plugin; +use Cake\Shell\Task\BakeTask; use Cake\Utility\Inflector; /** diff --git a/src/TestSuite/Fixture/FixtureManager.php b/src/TestSuite/Fixture/FixtureManager.php index 9aea46b10aa..b74aa376a16 100644 --- a/src/TestSuite/Fixture/FixtureManager.php +++ b/src/TestSuite/Fixture/FixtureManager.php @@ -15,9 +15,9 @@ namespace Cake\TestSuite\Fixture; use Cake\Core\Configure; +use Cake\Core\Exception\Exception; use Cake\Database\Connection; use Cake\Datasource\ConnectionManager; -use Cake\Core\Exception\Exception; use Cake\TestSuite\Fixture\TestFixture; use Cake\Utility\Inflector; diff --git a/src/TestSuite/IntegrationTestCase.php b/src/TestSuite/IntegrationTestCase.php index 1e9b6c31fd0..551921afc3e 100644 --- a/src/TestSuite/IntegrationTestCase.php +++ b/src/TestSuite/IntegrationTestCase.php @@ -19,8 +19,8 @@ use Cake\Network\Session; use Cake\Routing\DispatcherFactory; use Cake\Routing\Router; -use Cake\TestSuite\TestCase; use Cake\TestSuite\Stub\Response; +use Cake\TestSuite\TestCase; /** * A test case class intended to make integration tests of diff --git a/src/View/Helper/FormHelper.php b/src/View/Helper/FormHelper.php index 44331d42935..be420b557ba 100644 --- a/src/View/Helper/FormHelper.php +++ b/src/View/Helper/FormHelper.php @@ -14,9 +14,9 @@ */ namespace Cake\View\Helper; +use Cake\Collection\Collection; use Cake\Core\Configure; use Cake\Core\Exception\Exception; -use Cake\Collection\Collection; use Cake\ORM\Entity; use Cake\Routing\Router; use Cake\Utility\Hash; diff --git a/src/View/Widget/WidgetRegistry.php b/src/View/Widget/WidgetRegistry.php index 8c7d074a513..700ef33bdba 100644 --- a/src/View/Widget/WidgetRegistry.php +++ b/src/View/Widget/WidgetRegistry.php @@ -15,10 +15,10 @@ namespace Cake\View\Widget; use Cake\Core\App; +use Cake\Core\Configure\Engine\PhpConfig; use Cake\View\StringTemplate; use Cake\View\View; use Cake\View\Widget\WidgetInterface; -use Cake\Core\Configure\Engine\PhpConfig; use \ReflectionClass; /** diff --git a/tests/TestCase/Collection/Iterator/BufferedIteratorTest.php b/tests/TestCase/Collection/Iterator/BufferedIteratorTest.php index ea1c916fcb0..a03277c6aa7 100644 --- a/tests/TestCase/Collection/Iterator/BufferedIteratorTest.php +++ b/tests/TestCase/Collection/Iterator/BufferedIteratorTest.php @@ -61,7 +61,7 @@ public function testCount() { $buffered = $iterator->toArray(); $this->assertSame((array)$items, $buffered); - $iterator = new BufferedIterator(new NoRewindIterator($items->getIterator())); + $iterator = new BufferedIterator(new NoRewindIterator($items->getIterator())); $this->assertCount(3, $iterator); $buffered = $iterator->toArray(); $this->assertSame((array)$items, $buffered); diff --git a/tests/TestCase/Database/Expression/CaseExpressionTest.php b/tests/TestCase/Database/Expression/CaseExpressionTest.php index 64716f2fa4d..ccaddbccf0b 100644 --- a/tests/TestCase/Database/Expression/CaseExpressionTest.php +++ b/tests/TestCase/Database/Expression/CaseExpressionTest.php @@ -13,10 +13,10 @@ */ namespace Cake\Test\TestCase\Database\Expression; +use Cake\Database\Expression\CaseExpression; use Cake\Database\Expression\QueryExpression; use Cake\Database\ValueBinder; use Cake\TestSuite\TestCase; -use Cake\Database\Expression\CaseExpression; /** * Tests CaseExpression class diff --git a/tests/TestCase/Log/Engine/FileLogTest.php b/tests/TestCase/Log/Engine/FileLogTest.php index 84236ad0abf..f53d6193e20 100644 --- a/tests/TestCase/Log/Engine/FileLogTest.php +++ b/tests/TestCase/Log/Engine/FileLogTest.php @@ -34,6 +34,7 @@ class StringObject { public function __toString() { return 'Hey!'; } + } /** diff --git a/tests/TestCase/Log/LogTraitTest.php b/tests/TestCase/Log/LogTraitTest.php index ad7b8618fbe..0cec744d864 100644 --- a/tests/TestCase/Log/LogTraitTest.php +++ b/tests/TestCase/Log/LogTraitTest.php @@ -42,7 +42,7 @@ public function testLog() { $mock->expects($this->at(1)) ->method('log') - ->with('debug',array(1, 2)); + ->with('debug', array(1, 2)); Log::config('trait_test', ['engine' => $mock]); $subject = $this->getObjectForTrait('Cake\Log\LogTrait'); diff --git a/tests/TestCase/Model/Behavior/TranslateBehaviorTest.php b/tests/TestCase/Model/Behavior/TranslateBehaviorTest.php index a8d53cab479..3a31c6bb8da 100644 --- a/tests/TestCase/Model/Behavior/TranslateBehaviorTest.php +++ b/tests/TestCase/Model/Behavior/TranslateBehaviorTest.php @@ -175,7 +175,6 @@ public function testFindSingleLocaleAssociatedEnv() { ] ]; $this->assertSame($expected, $results); - } /** diff --git a/tests/TestCase/Shell/BakeShellTest.php b/tests/TestCase/Shell/BakeShellTest.php index 1efe3a5d1c4..5b5e0e056e6 100644 --- a/tests/TestCase/Shell/BakeShellTest.php +++ b/tests/TestCase/Shell/BakeShellTest.php @@ -14,11 +14,11 @@ */ namespace Cake\Test\TestCase\Shell; -use Cake\Shell\BakeShellShell; use Cake\Controller\Controller; use Cake\Core\App; use Cake\Core\Configure; use Cake\Core\Plugin; +use Cake\Shell\BakeShellShell; use Cake\TestSuite\TestCase; class BakeShellTest extends TestCase { diff --git a/tests/TestCase/Shell/CommandListShellTest.php b/tests/TestCase/Shell/CommandListShellTest.php index a738a9be05a..ee1e8c95166 100644 --- a/tests/TestCase/Shell/CommandListShellTest.php +++ b/tests/TestCase/Shell/CommandListShellTest.php @@ -16,12 +16,12 @@ */ namespace Cake\Test\TestCase\Shell; -use Cake\Shell\CommandListShell; -use Cake\Shell\Task\CommandTask; use Cake\Console\ConsoleIo; use Cake\Console\ConsoleOutput; use Cake\Core\App; use Cake\Core\Plugin; +use Cake\Shell\CommandListShell; +use Cake\Shell\Task\CommandTask; use Cake\TestSuite\TestCase; /** diff --git a/tests/TestCase/Shell/CompletionShellTest.php b/tests/TestCase/Shell/CompletionShellTest.php index 79311fa660a..62bce7dd6dc 100644 --- a/tests/TestCase/Shell/CompletionShellTest.php +++ b/tests/TestCase/Shell/CompletionShellTest.php @@ -14,12 +14,12 @@ */ namespace Cake\Test\TestCase\Shell; -use Cake\Shell\CompletionShell; -use Cake\Shell\Task\CommandTask; use Cake\Console\ConsoleIo; use Cake\Console\ConsoleOutput; use Cake\Console\Shell; use Cake\Core\Plugin; +use Cake\Shell\CompletionShell; +use Cake\Shell\Task\CommandTask; use Cake\TestSuite\TestCase; /** diff --git a/tests/TestCase/Shell/OrmCacheShellTest.php b/tests/TestCase/Shell/OrmCacheShellTest.php index cab256d3057..bc3d74a151a 100644 --- a/tests/TestCase/Shell/OrmCacheShellTest.php +++ b/tests/TestCase/Shell/OrmCacheShellTest.php @@ -15,8 +15,8 @@ namespace Cake\Test\TestCase\Shell; use Cake\Cache\Cache; -use Cake\Shell\OrmCacheShell; use Cake\Datasource\ConnectionManager; +use Cake\Shell\OrmCacheShell; use Cake\TestSuite\TestCase; /** diff --git a/tests/TestCase/Shell/Task/CellTaskTest.php b/tests/TestCase/Shell/Task/CellTaskTest.php index 7dcb3f4c050..44f2adf8e18 100644 --- a/tests/TestCase/Shell/Task/CellTaskTest.php +++ b/tests/TestCase/Shell/Task/CellTaskTest.php @@ -14,9 +14,9 @@ */ namespace Cake\Test\TestCase\Shell\Task; -use Cake\Shell\Task\TemplateTask; use Cake\Core\Configure; use Cake\Core\Plugin; +use Cake\Shell\Task\TemplateTask; use Cake\TestSuite\TestCase; /** diff --git a/tests/TestCase/Shell/Task/ControllerTaskTest.php b/tests/TestCase/Shell/Task/ControllerTaskTest.php index 2e70a63a45f..eadd047a9f6 100644 --- a/tests/TestCase/Shell/Task/ControllerTaskTest.php +++ b/tests/TestCase/Shell/Task/ControllerTaskTest.php @@ -14,13 +14,13 @@ */ namespace Cake\Test\TestCase\Shell\Task; -use Cake\Shell\Task\ControllerTask; -use Cake\Shell\Task\TemplateTask; use Cake\Console\Shell; use Cake\Core\App; use Cake\Core\Plugin; use Cake\ORM\Table; use Cake\ORM\TableRegistry; +use Cake\Shell\Task\ControllerTask; +use Cake\Shell\Task\TemplateTask; use Cake\TestSuite\TestCase; use Cake\View\Helper; diff --git a/tests/TestCase/Shell/Task/FixtureTaskTest.php b/tests/TestCase/Shell/Task/FixtureTaskTest.php index 9f3020e8183..804404e743d 100644 --- a/tests/TestCase/Shell/Task/FixtureTaskTest.php +++ b/tests/TestCase/Shell/Task/FixtureTaskTest.php @@ -14,11 +14,11 @@ */ namespace Cake\Test\TestCase\Shell\Task; -use Cake\Shell\Task\FixtureTask; -use Cake\Shell\Task\TemplateTask; use Cake\Core\Plugin; use Cake\Datasource\ConnectionManager; use Cake\ORM\TableRegistry; +use Cake\Shell\Task\FixtureTask; +use Cake\Shell\Task\TemplateTask; use Cake\TestSuite\TestCase; /** diff --git a/tests/TestCase/Shell/Task/ModelTaskTest.php b/tests/TestCase/Shell/Task/ModelTaskTest.php index 4da7f392ed2..8bad773e9df 100644 --- a/tests/TestCase/Shell/Task/ModelTaskTest.php +++ b/tests/TestCase/Shell/Task/ModelTaskTest.php @@ -14,12 +14,12 @@ */ namespace Cake\Test\TestCase\Shell\Task; -use Cake\Shell\Task\ModelTask; -use Cake\Shell\Task\TemplateTask; use Cake\Core\Configure; use Cake\Core\Plugin; use Cake\Model\Model; use Cake\ORM\TableRegistry; +use Cake\Shell\Task\ModelTask; +use Cake\Shell\Task\TemplateTask; use Cake\TestSuite\TestCase; use Cake\Utility\ClassRegistry; use Cake\Utility\Inflector; diff --git a/tests/TestCase/Shell/Task/TemplateTaskTest.php b/tests/TestCase/Shell/Task/TemplateTaskTest.php index bf9541bafc0..aa4f04624fb 100644 --- a/tests/TestCase/Shell/Task/TemplateTaskTest.php +++ b/tests/TestCase/Shell/Task/TemplateTaskTest.php @@ -14,8 +14,8 @@ */ namespace Cake\Test\TestCase\Shell\Task; -use Cake\Shell\Task\TemplateTask; use Cake\Core\App; +use Cake\Shell\Task\TemplateTask; use Cake\TestSuite\TestCase; /** diff --git a/tests/TestCase/Shell/Task/TestTaskTest.php b/tests/TestCase/Shell/Task/TestTaskTest.php index d5c0c88cc85..ae624623ca4 100644 --- a/tests/TestCase/Shell/Task/TestTaskTest.php +++ b/tests/TestCase/Shell/Task/TestTaskTest.php @@ -14,8 +14,6 @@ */ namespace Cake\Test\TestCase\Shell\Task; -use Cake\Shell\Task\TemplateTask; -use Cake\Shell\Task\TestTask; use Cake\Controller\Controller; use Cake\Core\App; use Cake\Core\Configure; @@ -24,6 +22,8 @@ use Cake\Network\Response; use Cake\ORM\Table; use Cake\ORM\TableRegistry; +use Cake\Shell\Task\TemplateTask; +use Cake\Shell\Task\TestTask; use Cake\TestSuite\TestCase; use TestApp\Controller\PostsController; use TestApp\Model\Table\ArticlesTable; diff --git a/tests/TestCase/Shell/Task/ViewTaskTest.php b/tests/TestCase/Shell/Task/ViewTaskTest.php index a37664eadd4..c81c8b0215d 100644 --- a/tests/TestCase/Shell/Task/ViewTaskTest.php +++ b/tests/TestCase/Shell/Task/ViewTaskTest.php @@ -14,13 +14,13 @@ */ namespace Cake\Test\TestCase\Shell\Task; -use Cake\Shell\Task\TemplateTask; -use Cake\Shell\Task\ViewTask; use Cake\Controller\Controller; use Cake\Core\Configure; use Cake\Core\Plugin; use Cake\ORM\Table; use Cake\ORM\TableRegistry; +use Cake\Shell\Task\TemplateTask; +use Cake\Shell\Task\ViewTask; use Cake\TestSuite\TestCase; /** diff --git a/tests/TestCase/View/Helper/HtmlHelperTest.php b/tests/TestCase/View/Helper/HtmlHelperTest.php index 7208dadba1f..181e16a69fb 100644 --- a/tests/TestCase/View/Helper/HtmlHelperTest.php +++ b/tests/TestCase/View/Helper/HtmlHelperTest.php @@ -18,13 +18,13 @@ use Cake\Core\App; use Cake\Core\Configure; use Cake\Core\Plugin; +use Cake\Filesystem\File; +use Cake\Filesystem\Folder; use Cake\Model\Model; use Cake\Network\Request; use Cake\Routing\Router; use Cake\TestSuite\TestCase; use Cake\Utility\ClassRegistry; -use Cake\Filesystem\File; -use Cake\Filesystem\Folder; use Cake\View\Helper\FormHelper; use Cake\View\Helper\HtmlHelper; use Cake\View\View; diff --git a/tests/TestCase/View/Widget/WidgetRegistryTest.php b/tests/TestCase/View/Widget/WidgetRegistryTest.php index 3f7cacdd797..8e37cd9da0b 100644 --- a/tests/TestCase/View/Widget/WidgetRegistryTest.php +++ b/tests/TestCase/View/Widget/WidgetRegistryTest.php @@ -14,11 +14,11 @@ */ namespace Cake\Test\TestCase\View\Widget; +use Cake\Core\Plugin; use Cake\TestSuite\TestCase; use Cake\View\StringTemplate; use Cake\View\View; use Cake\View\Widget\WidgetRegistry; -use Cake\Core\Plugin; /** * WidgetRegistry test case diff --git a/tests/test_app/TestApp/Model/Table/AuthorsTable.php b/tests/test_app/TestApp/Model/Table/AuthorsTable.php index b83da8bf175..ba21a6f01ab 100644 --- a/tests/test_app/TestApp/Model/Table/AuthorsTable.php +++ b/tests/test_app/TestApp/Model/Table/AuthorsTable.php @@ -11,8 +11,8 @@ */ namespace TestApp\Model\Table; -use Cake\ORM\Table; use Cake\ORM\Query; +use Cake\ORM\Table; /** * Author table class