Skip to content

Commit

Permalink
Use import cleanup
Browse files Browse the repository at this point in the history
Add missing typehint
  • Loading branch information
euromark committed Jun 21, 2014
1 parent 749cb81 commit e780dda
Show file tree
Hide file tree
Showing 19 changed files with 10 additions and 29 deletions.
2 changes: 0 additions & 2 deletions src/View/AjaxView.php
Expand Up @@ -14,8 +14,6 @@
*/
namespace Cake\View;

use Cake\Controller\Controller;
use Cake\Core\Configure;
use Cake\Event\EventManager;
use Cake\Network\Request;
use Cake\Network\Response;
Expand Down
1 change: 0 additions & 1 deletion src/View/Cell.php
Expand Up @@ -14,7 +14,6 @@
*/
namespace Cake\View;

use Cake\Core\App;
use Cake\Event\EventManager;
use Cake\Event\EventManagerTrait;
use Cake\Model\ModelAwareTrait;
Expand Down
1 change: 0 additions & 1 deletion src/View/Form/EntityContext.php
Expand Up @@ -19,7 +19,6 @@
use Cake\ORM\Entity;
use Cake\ORM\TableRegistry;
use Cake\Utility\Inflector;
use Cake\Validation\Validator;
use Cake\View\Form\ContextInterface;
use Traversable;

Expand Down
2 changes: 0 additions & 2 deletions src/View/Helper.php
Expand Up @@ -14,13 +14,11 @@
*/
namespace Cake\View;

use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Core\InstanceConfigTrait;
use Cake\Core\Plugin;
use Cake\Event\EventListener;
use Cake\Routing\Router;
use Cake\Utility\Hash;
use Cake\Utility\Inflector;

/**
Expand Down
5 changes: 3 additions & 2 deletions src/View/Helper/CacheHelper.php
Expand Up @@ -17,6 +17,7 @@
namespace Cake\View\Helper;

use Cake\Core\Configure;
use Cake\Event\Event;
use Cake\Utility\Inflector;
use Cake\View\Helper;

Expand Down Expand Up @@ -70,7 +71,7 @@ protected function _enabled() {
* @param string $output The output for the file.
* @return string Updated content.
*/
public function afterRenderFile($event, $viewFile, $output) {
public function afterRenderFile(Event $event, $viewFile, $output) {
if ($this->_enabled()) {
return $this->_parseContent($viewFile, $output);
}
Expand All @@ -83,7 +84,7 @@ public function afterRenderFile($event, $viewFile, $output) {
* @param string $layoutFile Layout file name.
* @return void
*/
public function afterLayout($event, $layoutFile) {
public function afterLayout(Event $event, $layoutFile) {
if ($this->_enabled()) {
$this->_View->assign(
'content',
Expand Down
2 changes: 0 additions & 2 deletions src/View/Helper/FlashHelper.php
Expand Up @@ -14,9 +14,7 @@
*/
namespace Cake\View\Helper;

use Cake\Network\Session;
use Cake\View\Helper;
use Cake\View\View;

/**
* FlashHelper class to render flash messages.
Expand Down
2 changes: 0 additions & 2 deletions src/View/Helper/FormHelper.php
Expand Up @@ -17,7 +17,6 @@
use Cake\Core\Configure;
use Cake\Error;
use Cake\ORM\Entity;
use Cake\ORM\TableRegistry;
use Cake\Routing\Router;
use Cake\Utility\Hash;
use Cake\Utility\Inflector;
Expand All @@ -29,7 +28,6 @@
use Cake\View\Helper;
use Cake\View\Helper\IdGeneratorTrait;
use Cake\View\Helper\StringTemplateTrait;
use Cake\View\StringTemplate;
use Cake\View\View;
use Cake\View\Widget\WidgetRegistry;
use DateTime;
Expand Down
3 changes: 0 additions & 3 deletions src/View/Helper/HtmlHelper.php
Expand Up @@ -14,11 +14,8 @@
*/
namespace Cake\View\Helper;

use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Error;
use Cake\Network\Response;
use Cake\Utility\Inflector;
use Cake\View\Helper;
use Cake\View\Helper\StringTemplateTrait;
use Cake\View\View;
Expand Down
1 change: 0 additions & 1 deletion src/View/Helper/NumberHelper.php
Expand Up @@ -16,7 +16,6 @@

use Cake\Core\App;
use Cake\Error;
use Cake\Utility\Hash;
use Cake\View\Helper;
use Cake\View\View;

Expand Down
4 changes: 2 additions & 2 deletions src/View/Helper/PaginatorHelper.php
Expand Up @@ -14,9 +14,9 @@
*/
namespace Cake\View\Helper;

use Cake\Event\Event;
use Cake\Utility\Inflector;
use Cake\View\Helper;
use Cake\View\View;

/**
* Pagination Helper class for easy generation of pagination links.
Expand Down Expand Up @@ -76,7 +76,7 @@ class PaginatorHelper extends Helper {
* @param string $viewFile The view file being rendered.
* @return void
*/
public function beforeRender($event, $viewFile) {
public function beforeRender(Event $event, $viewFile) {
$this->config(
'options.url',
array_merge($this->request->params['pass'], $this->request->query)
Expand Down
2 changes: 0 additions & 2 deletions src/View/Helper/SessionHelper.php
Expand Up @@ -14,10 +14,8 @@
*/
namespace Cake\View\Helper;

use Cake\Network\Session;
use Cake\View\Helper;
use Cake\View\Helper\StringTemplateTrait;
use Cake\View\View;

/**
* Session Helper.
Expand Down
2 changes: 1 addition & 1 deletion src/View/Helper/StringTemplateTrait.php
Expand Up @@ -63,7 +63,7 @@ public function formatTemplate($name, $data) {
*/
public function templater() {
if (empty($this->_templater)) {
$class = $this->config('templateClass') ?: '\Cake\View\StringTemplate';
$class = $this->config('templateClass') ?: 'Cake\View\StringTemplate';
$this->_templater = new $class;

$templates = $this->config('templates');
Expand Down
1 change: 0 additions & 1 deletion src/View/Helper/TextHelper.php
Expand Up @@ -16,7 +16,6 @@

use Cake\Core\App;
use Cake\Error;
use Cake\Utility\Hash;
use Cake\View\Helper;
use Cake\View\View;

Expand Down
1 change: 0 additions & 1 deletion src/View/HelperRegistry.php
Expand Up @@ -15,7 +15,6 @@
namespace Cake\View;

use Cake\Core\App;
use Cake\Event\EventManager;
use Cake\Event\EventManagerTrait;
use Cake\Utility\ObjectRegistry;
use Cake\View\View;
Expand Down
1 change: 0 additions & 1 deletion src/View/JsonView.php
Expand Up @@ -14,7 +14,6 @@
*/
namespace Cake\View;

use Cake\Controller\Controller;
use Cake\Core\Configure;
use Cake\Event\EventManager;
use Cake\Network\Request;
Expand Down
1 change: 0 additions & 1 deletion src/View/View.php
Expand Up @@ -15,7 +15,6 @@
namespace Cake\View;

use Cake\Cache\Cache;
use Cake\Controller\Controller;
use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Core\Plugin;
Expand Down
4 changes: 2 additions & 2 deletions src/View/Widget/DateTime.php
Expand Up @@ -14,9 +14,9 @@
*/
namespace Cake\View\Widget;

use Cake\Utility\Time;
use Cake\View\Form\ContextInterface;
use Cake\View\StringTemplate;
use Cake\View\Widget\SelectBox;
use Cake\View\Widget\WidgetInterface;

/**
Expand Down Expand Up @@ -62,7 +62,7 @@ class DateTime implements WidgetInterface {
* @param \Cake\View\StringTemplate $templates Templates list.
* @param \Cake\View\Widget\SelectBox $selectBox Selectbox widget instance.
*/
public function __construct($templates, $selectBox) {
public function __construct(StringTemplate $templates, SelectBox $selectBox) {
$this->_select = $selectBox;
$this->_templates = $templates;
}
Expand Down
1 change: 0 additions & 1 deletion src/View/XmlView.php
Expand Up @@ -14,7 +14,6 @@
*/
namespace Cake\View;

use Cake\Controller\Controller;
use Cake\Core\Configure;
use Cake\Event\EventManager;
use Cake\Network\Request;
Expand Down
3 changes: 2 additions & 1 deletion tests/TestCase/View/Helper/PaginatorHelperTest.php
Expand Up @@ -15,6 +15,7 @@
namespace Cake\Test\TestCase\View\Helper;

use Cake\Core\Configure;
use Cake\Event\Event;
use Cake\Network\Request;
use Cake\Routing\Router;
use Cake\TestSuite\TestCase;
Expand Down Expand Up @@ -738,7 +739,7 @@ public function testPassedArgsMergingWithUrlOptions() {

$this->Paginator->request->params['pass'] = array(2);
$this->Paginator->request->query = array('page' => 1, 'foo' => 'bar', 'x' => 'y');
$this->Paginator->beforeRender(null, 'posts/index');
$this->Paginator->beforeRender(new Event('Foo.bar'), 'posts/index');

$result = $this->Paginator->sort('title');
$expected = array(
Expand Down

0 comments on commit e780dda

Please sign in to comment.