Skip to content
Permalink
Browse files

Code Cleanup

Remove unused use statements from CakePHP core
  • Loading branch information...
pirouet
pirouet committed Mar 30, 2015
1 parent 8514c62 commit 0b41e2c75e9cd813d636a17a8a9bf18a6e7b9f51
Showing with 39 additions and 39 deletions.
  1. +0 −1 src/Cache/Engine/FileEngine.php
  2. +0 −1 src/Collection/Collection.php
  3. +1 −3 src/Controller/Controller.php
  4. +0 −2 src/Core/Configure/Engine/IniConfig.php
  5. +0 −1 src/Core/Configure/Engine/JsonConfig.php
  6. +0 −1 src/Core/Configure/Engine/PhpConfig.php
  7. +3 −1 src/Core/Exception/Exception.php
  8. +0 −1 src/Core/InstanceConfigTrait.php
  9. +0 −1 src/Core/StaticConfigTrait.php
  10. +3 −1 src/Database/Exception.php
  11. +1 −1 src/Database/Exception/MissingDriverException.php
  12. +1 −1 src/Database/Exception/MissingExtensionException.php
  13. +0 −3 src/Database/Expression/FieldTrait.php
  14. +2 −1 src/Database/Type/BinaryType.php
  15. +2 −1 src/Database/Type/DateTimeType.php
  16. +2 −1 src/Database/Type/DateType.php
  17. +2 −1 src/Database/Type/FloatType.php
  18. +2 −1 src/Database/Type/IntegerType.php
  19. +3 −1 src/Database/Type/TimeType.php
  20. +2 −1 src/Database/Type/UuidType.php
  21. +2 −1 src/Network/Http/FormData.php
  22. +2 −1 src/Network/Request.php
  23. +0 −1 src/ORM/Association/SelectableAssociationTrait.php
  24. +0 −1 src/ORM/Behavior/CounterCacheBehavior.php
  25. +0 −1 src/ORM/Behavior/TimestampBehavior.php
  26. +0 −1 src/ORM/Behavior/TreeBehavior.php
  27. +0 −1 src/ORM/ResultSet.php
  28. +0 −1 src/ORM/Table.php
  29. +0 −1 src/Routing/Filter/ControllerFactoryFilter.php
  30. +0 −1 src/TestSuite/TestSuite.php
  31. +5 −1 src/Validation/ValidationSet.php
  32. +5 −1 src/Validation/Validator.php
  33. +0 −1 src/View/Form/FormContext.php
  34. +1 −1 src/View/Helper/FormHelper.php
@@ -15,7 +15,6 @@
namespace Cake\Cache\Engine;
use Cake\Cache\CacheEngine;
use Cake\Core\Configure;
use Cake\Utility\Inflector;
use Exception;
use LogicException;
@@ -19,7 +19,6 @@
use Cake\Collection\CollectionTrait;
use InvalidArgumentException;
use IteratorIterator;
use JsonSerializable;
/**
* A collection is an immutable list of elements with a handful of functions to
@@ -22,10 +22,8 @@
use Cake\Log\LogTrait;
use Cake\Network\Request;
use Cake\Network\Response;
use Cake\ORM\TableRegistry;
use Cake\Routing\RequestActionTrait;
use Cake\Routing\Router;
use Cake\Utility\Inflector;
use Cake\Utility\MergeVariablesTrait;
use Cake\View\ViewVarsTrait;
use LogicException;
@@ -649,7 +647,7 @@ public function isAction($action)
{
try {
$method = new ReflectionMethod($this, $action);
} catch (\ReflectionException $e) {
} catch (ReflectionException $e) {
return false;
}
if (!$method->isPublic()) {
@@ -16,8 +16,6 @@
use Cake\Core\Configure\ConfigEngineInterface;
use Cake\Core\Configure\FileConfigTrait;
use Cake\Core\Exception\Exception;
use Cake\Core\Plugin;
use Cake\Utility\Hash;
/**
@@ -17,7 +17,6 @@
use Cake\Core\Configure\ConfigEngineInterface;
use Cake\Core\Configure\FileConfigTrait;
use Cake\Core\Exception\Exception;
use Cake\Core\Plugin;
/**
* JSON engine allows Configure to load configuration values from
@@ -17,7 +17,6 @@
use Cake\Core\Configure\ConfigEngineInterface;
use Cake\Core\Configure\FileConfigTrait;
use Cake\Core\Exception\Exception;
use Cake\Core\Plugin;
/**
* PHP engine allows Configure to load configuration values from
@@ -12,11 +12,13 @@
*/
namespace Cake\Core\Exception;
use RuntimeException;
/**
* Base class that all CakePHP Exceptions extend.
*
*/
class Exception extends \RuntimeException
class Exception extends RuntimeException
{
/**
@@ -16,7 +16,6 @@
use Cake\Core\Exception\Exception;
use Cake\Utility\Hash;
use InvalidArgumentException;
/**
* A trait for reading and writing instance config
@@ -16,7 +16,6 @@
use BadMethodCallException;
use InvalidArgumentException;
use UnexpectedValueException;
/**
* A trait that provides a set of static methods to manage configuration
@@ -14,10 +14,12 @@
*/
namespace Cake\Database;
use Cake\Core\Exception;
/**
* Exception for the database package.
*/
class Exception extends \Cake\Core\Exception\Exception
class Exception extends Exception
{
}
@@ -16,7 +16,7 @@
use Cake\Core\Exception\Exception;
class MissingDriverException extends \Cake\Core\Exception\Exception
class MissingDriverException extends Exception
{
/**
@@ -16,7 +16,7 @@
use Cake\Core\Exception\Exception;
class MissingExtensionException extends \Cake\Core\Exception\Exception
class MissingExtensionException extends Exception
{
/**
@@ -14,9 +14,6 @@
*/
namespace Cake\Database\Expression;
use Cake\Database\ExpressionInterface;
use Cake\Database\ValueBinder;
/**
* Contains the field property with a getter and a setter for it
*
@@ -15,6 +15,7 @@
namespace Cake\Database\Type;
use Cake\Core\Exception\Exception;
use Cake\Database\Type;
use Cake\Database\Driver;
use PDO;
@@ -23,7 +24,7 @@
*
* Use to convert binary data between PHP and the database types.
*/
class BinaryType extends \Cake\Database\Type
class BinaryType extends Type
{
/**
@@ -15,13 +15,14 @@
namespace Cake\Database\Type;
use Cake\Database\Driver;
use Cake\Database\Type;
/**
* Datetime type converter.
*
* Use to convert datetime instances to strings & back.
*/
class DateTimeType extends \Cake\Database\Type
class DateTimeType extends Type
{
/**
@@ -15,8 +15,9 @@
namespace Cake\Database\Type;
use Cake\Database\Driver;
use Cake\Database\Type\DateTimeType;
class DateType extends \Cake\Database\Type\DateTimeType
class DateType extends DateTimeType
{
/**
@@ -15,14 +15,15 @@
namespace Cake\Database\Type;
use Cake\Database\Driver;
use Cake\Database\Type;
use PDO;
/**
* Float type converter.
*
* Use to convert float/decimal data between PHP and the database types.
*/
class FloatType extends \Cake\Database\Type
class FloatType extends Type
{
/**
@@ -15,14 +15,15 @@
namespace Cake\Database\Type;
use Cake\Database\Driver;
use Cake\Database\Type;
use PDO;
/**
* Integer type converter.
*
* Use to convert integer data between PHP and the database types.
*/
class IntegerType extends \Cake\Database\Type
class IntegerType extends Type
{
/**
@@ -14,12 +14,14 @@
*/
namespace Cake\Database\Type;
use Cake\Database\Type\DateTimeType;
/**
* Time type converter.
*
* Use to convert time instances to strings & back.
*/
class TimeType extends \Cake\Database\Type\DateTimeType
class TimeType extends DateTimeType
{
/**
@@ -15,13 +15,14 @@
namespace Cake\Database\Type;
use Cake\Database\Driver;
use Cake\Database\Type;
use Cake\Utility\Text;
use PDO;
/**
* Provides behavior for the uuid type
*/
class UuidType extends \Cake\Database\Type
class UuidType extends Type
{
/**
@@ -13,6 +13,7 @@
*/
namespace Cake\Network\Http;
use Countable;
use Cake\Network\Http\FormData\Part;
/**
@@ -23,7 +24,7 @@
* and files.
*
*/
class FormData implements \Countable
class FormData implements Countable
{
/**
@@ -14,6 +14,7 @@
*/
namespace Cake\Network;
use ArrayAccess;
use BadMethodCallException;
use Cake\Core\Configure;
use Cake\Network\Exception\MethodNotAllowedException;
@@ -28,7 +29,7 @@
*
* `$request['controller']` or `$request->controller`.
*/
class Request implements \ArrayAccess
class Request implements ArrayAccess
{
/**
@@ -14,7 +14,6 @@
*/
namespace Cake\ORM\Association;
use Cake\Database\ExpressionInterface;
use Cake\Database\Expression\IdentifierExpression;
use Cake\Database\Expression\TupleComparison;
@@ -18,7 +18,6 @@
use Cake\ORM\Association;
use Cake\ORM\Behavior;
use Cake\ORM\Entity;
use Cake\ORM\Table;
/**
* CounterCache behavior
@@ -18,7 +18,6 @@
use Cake\I18n\Time;
use Cake\ORM\Behavior;
use Cake\ORM\Entity;
use Cake\ORM\Table;
class TimestampBehavior extends Behavior
{
@@ -20,7 +20,6 @@
use Cake\ORM\Behavior;
use Cake\ORM\Entity;
use Cake\ORM\Query;
use Cake\ORM\Table;
/**
* Makes the table to which this is attached to behave like a nested set and
@@ -19,7 +19,6 @@
use Cake\Database\Exception;
use Cake\Database\Type;
use Cake\Datasource\ResultSetInterface;
use JsonSerializable;
use SplFixedArray;
/**
@@ -38,7 +38,6 @@
use Cake\ORM\Rule\IsUnique;
use Cake\Utility\Inflector;
use Cake\Validation\Validator;
use RuntimeException;
/**
* Represents a single database table.
@@ -17,7 +17,6 @@
use Cake\Core\App;
use Cake\Event\Event;
use Cake\Routing\DispatcherFilter;
use Cake\Utility\Inflector;
/**
* A dispatcher filter that builds the controller to dispatch
@@ -17,7 +17,6 @@
namespace Cake\TestSuite;
use Cake\Filesystem\Folder;
/**
* A class to contain test cases and run them with shared fixtures
*
@@ -14,11 +14,15 @@
*/
namespace Cake\Validation;
use ArrayAccess;
use IteratorAggregate;
use Countable;
/**
* ValidationSet object. Holds all validation rules for a field and exposes
* methods to dynamically add or remove validation rules
*/
class ValidationSet implements \ArrayAccess, \IteratorAggregate, \Countable
class ValidationSet implements ArrayAccess, IteratorAggregate, Countable
{
/**
@@ -14,6 +14,10 @@
*/
namespace Cake\Validation;
use ArrayAccess;
use IteratorAggregate;
use Countable;
use Cake\Validation\RulesProvider;
use Cake\Validation\ValidationSet;
@@ -25,7 +29,7 @@
*
* @link http://book.cakephp.org/3.0/en/core-libraries/validation.html
*/
class Validator implements \ArrayAccess, \IteratorAggregate, \Countable
class Validator implements ArrayAccess, IteratorAggregate, Countable
{
/**
@@ -14,7 +14,6 @@
*/
namespace Cake\View\Form;
use Cake\Form\Form;
use Cake\Network\Request;
use Cake\View\Form\ContextInterface;
@@ -2231,7 +2231,7 @@ protected function _datetimeOptions($options)
unset($options['interval'], $options['round']);
if (!isset($options['val'])) {
$val = new \DateTime();
$val = new DateTime();
$currentYear = $val->format('Y');
if (isset($options['year']['end']) && $options['year']['end'] < $currentYear) {
$val->setDate($options['year']['end'], $val->format('n'), $val->format('j'));

0 comments on commit 0b41e2c

Please sign in to comment.
You can’t perform that action at this time.