Browse Source

Merge pull request #4638 from cakephp/3.0-use

Remove unneeded use statements.
Mark Story 11 years ago
parent
commit
5e12b4d413

+ 4 - 4
src/Controller/Component/CookieComponent.php

@@ -122,17 +122,17 @@ class CookieComponent extends Component {
 /**
  * Constructor
  *
- * @param ComponentRegistry $collection A ComponentRegistry for this component
+ * @param ComponentRegistry $registry A ComponentRegistry for this component
  * @param array $config Array of config.
  */
-	public function __construct(ComponentRegistry $collection, array $config = array()) {
-		parent::__construct($collection, $config);
+	public function __construct(ComponentRegistry $registry, array $config = array()) {
+		parent::__construct($registry, $config);
 
 		if (!$this->_config['key']) {
 			$this->config('key', Security::salt());
 		}
 
-		$controller = $collection->getController();
+		$controller = $registry->getController();
 		if ($controller && isset($controller->request)) {
 			$this->_request = $controller->request;
 		} else {

+ 4 - 4
src/Controller/Component/FlashComponent.php

@@ -47,12 +47,12 @@ class FlashComponent extends Component {
 /**
  * Constructor
  *
- * @param ComponentRegistry $collection A ComponentRegistry for this component
+ * @param ComponentRegistry $registry A ComponentRegistry for this component
  * @param array $config Array of config.
  */
-	public function __construct(ComponentRegistry $collection, array $config = []) {
-		parent::__construct($collection, $config);
-		$this->_session = $collection->getController()->request->session();
+	public function __construct(ComponentRegistry $registry, array $config = []) {
+		parent::__construct($registry, $config);
+		$this->_session = $registry->getController()->request->session();
 	}
 
 /**

+ 4 - 4
src/Controller/Component/RequestHandlerComponent.php

@@ -114,14 +114,14 @@ class RequestHandlerComponent extends Component {
 /**
  * Constructor. Parses the accepted content types accepted by the client using HTTP_ACCEPT
  *
- * @param ComponentRegistry $collection ComponentRegistry object.
+ * @param ComponentRegistry $registry ComponentRegistry object.
  * @param array $config Array of config.
  */
-	public function __construct(ComponentRegistry $collection, array $config = array()) {
-		parent::__construct($collection, $config);
+	public function __construct(ComponentRegistry $registry, array $config = array()) {
+		parent::__construct($registry, $config);
 		$this->addInputType('xml', array(array($this, 'convertXml')));
 
-		$Controller = $collection->getController();
+		$Controller = $registry->getController();
 		$this->request = $Controller->request;
 		$this->response = $Controller->response;
 	}

+ 4 - 4
src/Controller/Component/SessionComponent.php

@@ -40,12 +40,12 @@ class SessionComponent extends Component {
 /**
  * Constructor. Parses the accepted content types accepted by the client using HTTP_ACCEPT
  *
- * @param ComponentRegistry $collection ComponentRegistry object.
+ * @param ComponentRegistry $registry ComponentRegistry object.
  * @param array $config Array of config.
  */
-	public function __construct(ComponentRegistry $collection, array $config = array()) {
-		parent::__construct($collection, $config);
-		$this->_session = $collection->getController()->request->session();
+	public function __construct(ComponentRegistry $registry, array $config = array()) {
+		parent::__construct($registry, $config);
+		$this->_session = $registry->getController()->request->session();
 	}
 
 /**

+ 0 - 1
src/Database/Expression/CaseExpression.php

@@ -15,7 +15,6 @@
 namespace Cake\Database\Expression;
 
 use Cake\Database\ExpressionInterface;
-use Cake\Database\Expression\QueryExpression;
 use Cake\Database\ValueBinder;
 
 /**

+ 0 - 1
src/Datasource/QueryTrait.php

@@ -18,7 +18,6 @@ use Cake\Collection\Iterator\MapReduce;
 use Cake\Datasource\QueryCacher;
 use Cake\Datasource\RepositoryInterface;
 use Cake\Datasource\ResultSetDecorator;
-use Cake\Event\Event;
 
 /**
  * Contains the characteristics for an object that is attached to a repository and

+ 0 - 1
src/Error/BaseErrorHandler.php

@@ -17,7 +17,6 @@ namespace Cake\Error;
 use Cake\Core\Configure;
 use Cake\Error\Debugger;
 use Cake\Log\Log;
-use Cake\Network\Exception\InternalErrorException;
 use Cake\Routing\Router;
 
 /**

+ 0 - 1
src/Error/Debugger.php

@@ -14,7 +14,6 @@
  */
 namespace Cake\Error;
 
-use Cake\Core\Configure;
 use Cake\Log\Log;
 use Cake\Utility\Hash;
 use Cake\Utility\Security;

+ 0 - 2
src/I18n/I18n.php

@@ -16,10 +16,8 @@ namespace Cake\I18n;
 
 use Aura\Intl\Exception as LoadException;
 use Aura\Intl\FormatterLocator;
-use Aura\Intl\Package;
 use Aura\Intl\PackageLocator;
 use Aura\Intl\TranslatorFactory;
-use Aura\Intl\TranslatorLocator;
 use Cake\I18n\Formatter\IcuFormatter;
 use Cake\I18n\Formatter\SprintfFormatter;
 use Locale;

+ 0 - 1
src/Log/Engine/ConsoleLog.php

@@ -15,7 +15,6 @@
 namespace Cake\Log\Engine;
 
 use Cake\Console\ConsoleOutput;
-use Cake\Core\Exception\Exception;
 use InvalidArgumentException;
 
 /**

+ 0 - 1
src/Network/Response.php

@@ -18,7 +18,6 @@ use Cake\Core\Configure;
 use Cake\Network\Exception\NotFoundException;
 use Cake\Filesystem\File;
 use InvalidArgumentException;
-use RuntimeException;
 
 /**
  * Cake Response is responsible for managing the response text, status and headers of a HTTP response.

+ 0 - 1
src/Routing/Router.php

@@ -14,7 +14,6 @@
  */
 namespace Cake\Routing;
 
-use Cake\Core\App;
 use Cake\Core\Configure;
 use Cake\Network\Request;
 use Cake\Routing\RouteBuilder;

+ 0 - 1
src/Shell/Task/SimpleBakeTask.php

@@ -16,7 +16,6 @@ namespace Cake\Shell\Task;
 
 use Cake\Shell\Task\BakeTask;
 use Cake\Core\Configure;
-use Cake\Core\Plugin;
 use Cake\Utility\Inflector;
 
 /**

+ 0 - 5
src/Shell/TestShell.php

@@ -18,12 +18,7 @@
  */
 namespace Cake\Shell;
 
-use Cake\Console\ConsoleOptionParser;
 use Cake\Console\Shell;
-use Cake\TestSuite\TestLoader;
-use Cake\TestSuite\TestSuiteCommand;
-use Cake\TestSuite\TestSuiteDispatcher;
-use Cake\Utility\Inflector;
 
 /**
  * Stub that tells people how to run tests with PHPUnit.

+ 1 - 1
src/TestSuite/ControllerTestCase.php

@@ -353,7 +353,7 @@ abstract class ControllerTestCase extends TestCase {
  * @throws \Cake\Controller\Error\MissingControllerException When controllers could not be created.
  * @throws \Cake\Controller\Error\MissingComponentException When components could not be created.
  */
-	public function generate($controller, array $mocks = array(), $request = null) {
+	public function generate($controller, array $mocks = array(), Request $request = null) {
 		$className = App::className($controller, 'Controller', 'Controller');
 		if (!$className) {
 			list($plugin, $controller) = pluginSplit($controller);

+ 4 - 5
src/TestSuite/Fixture/FixtureManager.php

@@ -15,7 +15,6 @@
 namespace Cake\TestSuite\Fixture;
 
 use Cake\Core\Configure;
-use Cake\Core\Plugin;
 use Cake\Database\Connection;
 use Cake\Datasource\ConnectionManager;
 use Cake\Core\Exception\Exception;
@@ -53,7 +52,7 @@ class FixtureManager {
 /**
  * Inspects the test to look for unloaded fixtures and loads them
  *
- * @param \Cake\TestSuite\TestCase $test the test case to inspect
+ * @param \Cake\TestSuite\TestCase $test The test case to inspect.
  * @return void
  */
 	public function fixturize($test) {
@@ -123,7 +122,7 @@ class FixtureManager {
 /**
  * Looks for fixture files and instantiates the classes accordingly
  *
- * @param \Cake\TestSuite\Testcase $test The test suite to load fixtures for.
+ * @param \Cake\TestSuite\TestCase $test The test suite to load fixtures for.
  * @return void
  * @throws \UnexpectedValueException when a referenced fixture does not exist.
  */
@@ -210,7 +209,7 @@ class FixtureManager {
 /**
  * Creates the fixtures tables and inserts data on them.
  *
- * @param \Cake\TestSuite\TestCase $test the test to inspect for fixture loading
+ * @param \Cake\TestSuite\TestCase $test The test to inspect for fixture loading.
  * @return void
  * @throws \Cake\Core\Exception\Exception When fixture records cannot be inserted.
  */
@@ -290,7 +289,7 @@ class FixtureManager {
 /**
  * Truncates the fixtures tables
  *
- * @param \Cake\TestSuite\TestCase $test the test to inspect for fixture unloading
+ * @param \Cake\TestSuite\TestCase $test The test to inspect for fixture unloading.
  * @return void
  */
 	public function unload($test) {