From 03e07f434065ad1e1617b51c145729b78c7c6ed6 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Fri, 14 Jun 2013 22:42:55 -0400 Subject: [PATCH] cleaned up "use" statements. --- framework/yii/base/View.php | 1 - framework/yii/db/ActiveQuery.php | 5 ----- framework/yii/db/ActiveRecord.php | 3 --- framework/yii/db/ActiveRelation.php | 2 -- framework/yii/db/QueryBuilder.php | 1 - framework/yii/helpers/base/FileHelper.php | 7 +++---- framework/yii/logging/Router.php | 1 - framework/yii/web/AccessControl.php | 1 - framework/yii/web/Application.php | 1 - framework/yii/web/Controller.php | 1 - framework/yii/web/HttpException.php | 1 - framework/yii/web/Request.php | 1 - framework/yii/web/Response.php | 1 - framework/yii/web/User.php | 1 - framework/yii/web/VerbFilter.php | 1 - 15 files changed, 3 insertions(+), 25 deletions(-) diff --git a/framework/yii/base/View.php b/framework/yii/base/View.php index 219a0fb3f3..a931a1b4a4 100644 --- a/framework/yii/base/View.php +++ b/framework/yii/base/View.php @@ -8,7 +8,6 @@ namespace yii\base; use Yii; -use yii\base\Application; use yii\helpers\FileHelper; use yii\helpers\Html; use yii\widgets\Block; diff --git a/framework/yii/db/ActiveQuery.php b/framework/yii/db/ActiveQuery.php index cfe9c3fd4d..65d2d90512 100644 --- a/framework/yii/db/ActiveQuery.php +++ b/framework/yii/db/ActiveQuery.php @@ -8,11 +8,6 @@ namespace yii\db; -use yii\db\Connection; -use yii\db\Command; -use yii\db\QueryBuilder; -use yii\db\Expression; - /** * ActiveQuery represents a DB query associated with an Active Record class. * diff --git a/framework/yii/db/ActiveRecord.php b/framework/yii/db/ActiveRecord.php index 6faebbf0ed..7aab07771a 100644 --- a/framework/yii/db/ActiveRecord.php +++ b/framework/yii/db/ActiveRecord.php @@ -14,9 +14,6 @@ use yii\base\InvalidParamException; use yii\base\ModelEvent; use yii\base\UnknownMethodException; use yii\base\InvalidCallException; -use yii\db\Connection; -use yii\db\TableSchema; -use yii\db\Expression; use yii\helpers\StringHelper; use yii\helpers\Inflector; diff --git a/framework/yii/db/ActiveRelation.php b/framework/yii/db/ActiveRelation.php index 42ae0e7e11..a501c7dffe 100644 --- a/framework/yii/db/ActiveRelation.php +++ b/framework/yii/db/ActiveRelation.php @@ -8,8 +8,6 @@ namespace yii\db; -use yii\db\Connection; -use yii\db\Command; use yii\base\InvalidConfigException; /** diff --git a/framework/yii/db/QueryBuilder.php b/framework/yii/db/QueryBuilder.php index d5e8ef1629..67a8dc3fe7 100644 --- a/framework/yii/db/QueryBuilder.php +++ b/framework/yii/db/QueryBuilder.php @@ -7,7 +7,6 @@ namespace yii\db; -use yii\db\Exception; use yii\base\NotSupportedException; /** diff --git a/framework/yii/helpers/base/FileHelper.php b/framework/yii/helpers/base/FileHelper.php index 979c1baf83..499d3ce0f0 100644 --- a/framework/yii/helpers/base/FileHelper.php +++ b/framework/yii/helpers/base/FileHelper.php @@ -10,7 +10,6 @@ namespace yii\helpers\base; use Yii; -use yii\helpers\StringHelper; /** * Filesystem helper @@ -255,17 +254,17 @@ class FileHelper return false; } $path = str_replace('\\', '/', $path); - $n = StringHelper::strlen($path); + $n = \yii\helpers\StringHelper::strlen($path); if (!empty($options['except'])) { foreach ($options['except'] as $name) { - if (StringHelper::substr($path, -StringHelper::strlen($name), $n) === $name) { + if (\yii\helpers\StringHelper::substr($path, -\yii\helpers\StringHelper::strlen($name), $n) === $name) { return false; } } } if (!empty($options['only'])) { foreach ($options['only'] as $name) { - if (StringHelper::substr($path, -StringHelper::strlen($name), $n) !== $name) { + if (\yii\helpers\StringHelper::substr($path, -\yii\helpers\StringHelper::strlen($name), $n) !== $name) { return false; } } diff --git a/framework/yii/logging/Router.php b/framework/yii/logging/Router.php index f544b72ca9..eae6de6573 100644 --- a/framework/yii/logging/Router.php +++ b/framework/yii/logging/Router.php @@ -9,7 +9,6 @@ namespace yii\logging; use Yii; use yii\base\Component; -use yii\base\Application; /** * Router manages [[Target|log targets]] that record log messages in different media. diff --git a/framework/yii/web/AccessControl.php b/framework/yii/web/AccessControl.php index 7dedaf9fbb..3af2adc3bd 100644 --- a/framework/yii/web/AccessControl.php +++ b/framework/yii/web/AccessControl.php @@ -10,7 +10,6 @@ namespace yii\web; use Yii; use yii\base\Action; use yii\base\ActionFilter; -use yii\web\HttpException; /** * AccessControl provides simple access control based on a set of rules. diff --git a/framework/yii/web/Application.php b/framework/yii/web/Application.php index aa03a46036..5ac0e13669 100644 --- a/framework/yii/web/Application.php +++ b/framework/yii/web/Application.php @@ -8,7 +8,6 @@ namespace yii\web; use Yii; -use yii\web\HttpException; use yii\base\InvalidRouteException; /** diff --git a/framework/yii/web/Controller.php b/framework/yii/web/Controller.php index 22a2ebd806..6214c54461 100644 --- a/framework/yii/web/Controller.php +++ b/framework/yii/web/Controller.php @@ -8,7 +8,6 @@ namespace yii\web; use Yii; -use yii\web\HttpException; use yii\base\InlineAction; /** diff --git a/framework/yii/web/HttpException.php b/framework/yii/web/HttpException.php index c0a23dbd8a..2e677d5e80 100644 --- a/framework/yii/web/HttpException.php +++ b/framework/yii/web/HttpException.php @@ -8,7 +8,6 @@ namespace yii\web; use yii\base\UserException; -use yii\web\Response; /** * HttpException represents an exception caused by an improper request of the end-user. diff --git a/framework/yii/web/Request.php b/framework/yii/web/Request.php index afd2f8ac9c..4f0ff1f125 100644 --- a/framework/yii/web/Request.php +++ b/framework/yii/web/Request.php @@ -8,7 +8,6 @@ namespace yii\web; use Yii; -use yii\web\HttpException; use yii\base\InvalidConfigException; use yii\helpers\SecurityHelper; diff --git a/framework/yii/web/Response.php b/framework/yii/web/Response.php index 348f562d7d..fcb665c5da 100644 --- a/framework/yii/web/Response.php +++ b/framework/yii/web/Response.php @@ -9,7 +9,6 @@ namespace yii\web; use Yii; use yii\base\InvalidConfigException; -use yii\web\HttpException; use yii\base\InvalidParamException; use yii\helpers\FileHelper; use yii\helpers\Html; diff --git a/framework/yii/web/User.php b/framework/yii/web/User.php index 0e9c8224ee..d4646a6bf6 100644 --- a/framework/yii/web/User.php +++ b/framework/yii/web/User.php @@ -9,7 +9,6 @@ namespace yii\web; use Yii; use yii\base\Component; -use yii\web\HttpException; use yii\base\InvalidConfigException; /** diff --git a/framework/yii/web/VerbFilter.php b/framework/yii/web/VerbFilter.php index a3fd662a4e..4f45190726 100644 --- a/framework/yii/web/VerbFilter.php +++ b/framework/yii/web/VerbFilter.php @@ -10,7 +10,6 @@ namespace yii\web; use Yii; use yii\base\ActionEvent; use yii\base\Behavior; -use yii\web\HttpException; /** * VerbFilter is an action filter that filters by HTTP request methods.