Skip to content

Commit

Permalink
Merge pull request #4739 from antograssiot/3.0-fix-cs
Browse files Browse the repository at this point in the history
3.0  CS correction
  • Loading branch information
lorenzo committed Sep 26, 2014
2 parents 5b3dc05 + 2db3683 commit ab1ff33
Show file tree
Hide file tree
Showing 34 changed files with 48 additions and 43 deletions.
2 changes: 1 addition & 1 deletion src/Cache/CacheRegistry.php
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions src/Collection/Iterator/BufferedIterator.php
Expand Up @@ -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;

Expand Down Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Configure/Engine/IniConfig.php
Expand Up @@ -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;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Datasource/ResultSetDecorator.php
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Network/Email/SmtpTransport.php
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Network/Response.php
Expand Up @@ -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;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/ORM/Association/SelectableAssociationTrait.php
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Shell/BakeShell.php
Expand Up @@ -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;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Shell/Task/SimpleBakeTask.php
Expand Up @@ -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;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/TestSuite/Fixture/FixtureManager.php
Expand Up @@ -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;

Expand Down
3 changes: 2 additions & 1 deletion src/TestSuite/IntegrationTestCase.php
Expand Up @@ -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
Expand Down Expand Up @@ -239,6 +239,7 @@ public function delete($url) {
* @param string $method The HTTP method
* @param array|null $data The request data.
* @return void
* @throws \Exception
*/
protected function _sendRequest($url, $method, $data = []) {
$request = $this->_buildRequest($url, $method, $data);
Expand Down
2 changes: 1 addition & 1 deletion src/View/Helper/FormHelper.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/View/Widget/WidgetRegistry.php
Expand Up @@ -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;

/**
Expand Down
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Database/Expression/CaseExpressionTest.php
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion tests/TestCase/Log/Engine/ConsoleLogTest.php
Expand Up @@ -64,7 +64,10 @@ public function testlogToFileStream() {
* test default value of stream 'outputAs'
*/
public function testDefaultOutputAs() {
if (DS === '\\' && !(bool)env('ANSICON')) {
if (
(DS === '\\' && !(bool)env('ANSICON')) ||
(function_exists('posix_isatty') && !posix_isatty(null))
) {
$expected = ConsoleOutput::PLAIN;
} else {
$expected = ConsoleOutput::COLOR;
Expand Down
2 changes: 2 additions & 0 deletions tests/TestCase/Log/Engine/FileLogTest.php
Expand Up @@ -34,6 +34,7 @@ class StringObject {
public function __toString() {
return 'Hey!';
}

}

/**
Expand All @@ -50,6 +51,7 @@ class JsonObject implements JsonSerializable {
public function jsonSerialize() {
return ['hello' => 'world'];
}

}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Log/LogTraitTest.php
Expand Up @@ -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');
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Model/Behavior/TranslateBehaviorTest.php
Expand Up @@ -175,7 +175,6 @@ public function testFindSingleLocaleAssociatedEnv() {
]
];
$this->assertSame($expected, $results);

}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Shell/BakeShellTest.php
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Shell/CommandListShellTest.php
Expand Up @@ -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;

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Shell/CompletionShellTest.php
Expand Up @@ -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;

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Shell/OrmCacheShellTest.php
Expand Up @@ -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;

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Shell/Task/CellTaskTest.php
Expand Up @@ -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;

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Shell/Task/ControllerTaskTest.php
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Shell/Task/FixtureTaskTest.php
Expand Up @@ -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;

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Shell/Task/ModelTaskTest.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Shell/Task/SimpleBakeTaskTest.php
Expand Up @@ -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;

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Shell/Task/TemplateTaskTest.php
Expand Up @@ -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;

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Shell/Task/TestTaskTest.php
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Shell/Task/ViewTaskTest.php
Expand Up @@ -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;

/**
Expand Down

0 comments on commit ab1ff33

Please sign in to comment.