Navigation Menu

Skip to content

Commit

Permalink
fixing coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
ceeram committed Dec 11, 2012
1 parent ccde7e8 commit 08bc132
Show file tree
Hide file tree
Showing 55 changed files with 110 additions and 116 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Console/Command/UpgradeShell.php
Expand Up @@ -20,7 +20,7 @@
use Cake\Utility\Inflector;

/**
* A shell class to help developers upgrade applications to CakePHP 2.0
* A shell class to help developers upgrade applications to CakePHP 3.0
*
* @package Cake.Console.Command
*/
Expand Down
5 changes: 2 additions & 3 deletions lib/Cake/Console/Templates/skel/Config/app.php
Expand Up @@ -15,7 +15,6 @@
namespace App\Config;

use Cake\Core\Configure;
use Cake\Core\ClassLoader;

/**
* CakePHP Debug Level:
Expand Down Expand Up @@ -67,7 +66,7 @@
]);

/**
* Uncomment this line and correct your server timezone to fix
* Uncomment this line and correct your server timezone to fix
* any date & time related errors.
*/
//date_default_timezone_set('UTC');
Expand All @@ -77,7 +76,7 @@
* The level of CakePHP security.
*
* - salt - A random string used in security hashing methods.
* - cipherSeed - A random numeric string (digits only) used to seed
* - cipherSeed - A random numeric string (digits only) used to seed
* the xor cipher functions in Security.
*/
Configure::write('Security', [
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Controller.php
Expand Up @@ -24,8 +24,8 @@
use Cake\Event\EventManager;
use Cake\Network\Request;
use Cake\Network\Response;
use Cake\Routing\Router;
use Cake\Routing\RequestActionTrait;
use Cake\Routing\Router;
use Cake\Utility\ClassRegistry;
use Cake\Utility\Inflector;
use Cake\Utility\MergeVariablesTrait;
Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Core/Object.php
Expand Up @@ -28,6 +28,7 @@
class Object {

use LogTrait;

/**
* constructor, no-op
*
Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Error/ExceptionRenderer.php
Expand Up @@ -60,6 +60,7 @@
* @package Cake.Error
*/
class ExceptionRenderer {

/**
* Controller instance.
*
Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Log/LogInterface.php
Expand Up @@ -20,6 +20,7 @@
* @package Cake.Log
*/
interface LogInterface {

/**
* Write method to handle writes being made to the Logger
*
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Routing/DispatcherFilter.php
Expand Up @@ -18,8 +18,8 @@

namespace Cake\Routing;

use Cake\Event\EventListener;
use Cake\Event\Event;
use Cake\Event\EventListener;

/**
* This abstract class represents a filter to be applied to a dispatcher cycle. It acts as as
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Routing/Route/Route.php
Expand Up @@ -141,7 +141,7 @@ public function compiled() {
}

/**
* Compiles the route's regular expression. Modifies defaults property so all necessary
* Compiles the route's regular expression. Modifies defaults property so all necessary
* keys are set and populates $this->names with the named routing elements.
*
* @return array Returns a string regular expression of the compiled route.
Expand Down Expand Up @@ -521,7 +521,7 @@ protected function _writeUrl($params, $pass = array(), $query = array()) {
$out = $params['_base'] . $out;
unset($params['_base']);
}

$out = str_replace('//', '/', $out);

if (
Expand Down
12 changes: 6 additions & 6 deletions lib/Cake/Routing/Router.php
Expand Up @@ -204,7 +204,7 @@ public static function getNamedExpressions() {
/**
* Resource map getter & setter.
*
* Allows you to define the default route configuration for REST routing and
* Allows you to define the default route configuration for REST routing and
* Router::mapResources()
*
* @param array $resourceMap Resource map
Expand Down Expand Up @@ -251,7 +251,7 @@ public static function resourceMap($resourceMap = null) {
* providing patterns for those parameters. Patterns for routing parameters
* do not need capturing groups, as one will be added for each route params.
*
* $options offers several 'special' keys that have special meaning
* $options offers several 'special' keys that have special meaning
* in the $options array.
*
* - `pass` is used to define which of the routed parameters should be shifted
Expand Down Expand Up @@ -366,7 +366,7 @@ public static function redirect($route, $url, $options = array()) {
* Plugins will create lower_case underscored resource routes. e.g
* `/comments/comment`
*
* Connect resource routes for the Posts controller in the
* Connect resource routes for the Posts controller in the
* Admin prefix:
*
* {{{
Expand Down Expand Up @@ -579,7 +579,7 @@ public static function promote($which = null) {
* Add a url filter to Router.
*
* Url filter functions are applied to every array $url provided to
* Router::url() before the urls are sent to the route collection.
* Router::url() before the urls are sent to the route collection.
*
* Callback functions should expect the following parameters:
*
Expand Down Expand Up @@ -803,7 +803,7 @@ public static function url($url = null, $options = array()) {
*
* @param Cake\Network\Request|array $params The params array or
* Cake\Network\Request object that needs to be reversed.
* @param boolean $full Set to true to include the full url including the
* @param boolean $full Set to true to include the full url including the
* protocol when reversing the url.
* @return string The string that is the reversed result of the array
*/
Expand Down Expand Up @@ -874,7 +874,7 @@ public static function normalize($url = '/') {
* A list of valid extension can be passed to this method, i.e. Router::parseExtensions('rss', 'xml');
* If no parameters are given, anything after the first . (dot) after the last / in the URL will be
* parsed, excluding querystring parameters (i.e. ?q=...).
*
*
* @return void
* @see RequestHandler::startup()
*/
Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Test/TestApp/Controller/Admin/PostsController.php
Expand Up @@ -21,6 +21,7 @@
* For testing prefix routing.
*/
class PostsController extends Controller {

/**
* components
*
Expand Down
4 changes: 1 addition & 3 deletions lib/Cake/Test/TestApp/Controller/AuthTestController.php
Expand Up @@ -59,7 +59,7 @@ class AuthTestController extends Controller {
*
* @return void
*/
function __construct($request, $response) {
public function __construct($request = null, $response = null) {
$request->addParams(Router::parse('/auth_test'));
$request->here = '/auth_test';
$request->webroot = '/';
Expand Down Expand Up @@ -97,7 +97,6 @@ public function admin_add() {
* @return void
*/
public function logout() {

}

/**
Expand Down Expand Up @@ -137,7 +136,6 @@ public function redirect($url, $status = null, $exit = true) {
* @return void
*/
public function isAuthorized() {

}

}
Expand Up @@ -37,7 +37,7 @@ class TestAuthComponent extends AuthComponent {
*
* @return void
*/
function _stop($status = 0) {
protected function _stop($status = 0) {
$this->testStop = true;
}

Expand Down
34 changes: 17 additions & 17 deletions lib/Cake/Test/TestApp/Controller/RequestActionController.php
Expand Up @@ -25,31 +25,31 @@
class RequestActionController extends AppController {

/**
* uses property
*
* @var array
* @access public
*/
* uses property
*
* @var array
* @access public
*/
public $uses = ['Post'];

/**
* test_request_action method
*
* @access public
* @return void
*/
* test_request_action method
*
* @access public
* @return void
*/
public function test_request_action() {
return 'This is a test';
}

/**
* another_ra_test method
*
* @param mixed $id
* @param mixed $other
* @access public
* @return void
*/
* another_ra_test method
*
* @param mixed $id
* @param mixed $other
* @access public
* @return void
*/
public function another_ra_test($id, $other) {
return $id + $other;
}
Expand Down
1 change: 0 additions & 1 deletion lib/Cake/Test/TestApp/Controller/SomePagesController.php
Expand Up @@ -66,7 +66,6 @@ public function responseGenerator() {
}

protected function _fail() {

}

}
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/TestApp/Model/PaginatorControllerPost.php
Expand Up @@ -80,7 +80,7 @@ public function beforeFind($query) {
*/
public function find($conditions = null, $fields = array(), $order = null, $recursive = null) {
if ($conditions == 'popular') {
$conditions = array($this->name . '.' . $this->primaryKey .' > ' => '1');
$conditions = array($this->name . '.' . $this->primaryKey . ' > ' => '1');
$options = Hash::merge($fields, compact('conditions'));
return parent::find('all', $options);
}
Expand Down
2 changes: 2 additions & 0 deletions lib/Cake/Test/TestApp/Model/PersisterTwo.php
Expand Up @@ -21,7 +21,9 @@
namespace TestApp\Model;

class PersisterTwo extends AppModel {

public $useTable = 'posts';

public $name = 'PersisterTwo';

public $actsAs = array('PersisterOneBehavior', 'TestPlugin.TestPluginPersisterOne');
Expand Down
Expand Up @@ -11,7 +11,7 @@
* @since CakePHP(tm) v 3.0.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace TestApp\Controller\Admin;
namespace TestPlugin\Controller\Admin;

use Cake\Controller\Controller;

Expand All @@ -21,6 +21,7 @@
* For testing prefix routing.
*/
class CommentsController extends Controller {

/**
* components
*
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/TestCase/Cache/CacheTest.php
Expand Up @@ -208,7 +208,7 @@ public function testConfigSettingDefaultConfigKey() {
public function testConfigured() {
Cache::drop('default');
$result = Cache::configured();
$this->assertContains('_cake_core_', $result);
$this->assertContains('_cake_core_', $result);
$this->assertNotContains('default', $result, 'Unconnected engines should not display.');

Cache::engine('default');
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Test/TestCase/Cache/Engine/RedisEngineTest.php
Expand Up @@ -13,10 +13,10 @@
*/

namespace Cake\Test\TestCase\Cache\Engine;
use Cake\TestSuite\TestCase;
use Cake\Cache\Engine\RedisEngine;
use Cake\Cache\Cache;
use Cake\Cache\Engine\RedisEngine;
use Cake\Core\Configure;
use Cake\TestSuite\TestCase;

/**
* RedisEngineTest class
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/TestCase/Configure/IniReaderTest.php
Expand Up @@ -51,7 +51,7 @@ class IniReaderTest extends TestCase {
*/
public function setUp() {
parent::setUp();
$this->path = CAKE . 'Test/TestApp/Config'. DS;
$this->path = CAKE . 'Test/TestApp/Config' . DS;
}

/**
Expand Down
8 changes: 4 additions & 4 deletions lib/Cake/Test/TestCase/Configure/PhpReaderTest.php
Expand Up @@ -51,7 +51,7 @@ class PhpReaderTest extends TestCase {
*/
public function setUp() {
parent::setUp();
$this->path = CAKE . 'Test/TestApp/Config'. DS;
$this->path = CAKE . 'Test/TestApp/Config' . DS;
}

/**
Expand Down Expand Up @@ -144,18 +144,18 @@ public function testDump() {
$expected = <<<PHP
<?php
\$config = array (
'One' =>
'One' =>
array (
'two' => 'value',
'three' =>
'three' =>
array (
'four' => 'value four',
),
'is_null' => NULL,
'bool_false' => false,
'bool_true' => true,
),
'Asset' =>
'Asset' =>
array (
'timestamp' => 'force',
),
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Test/TestCase/Console/Command/Task/ModelTaskTest.php
Expand Up @@ -818,7 +818,7 @@ public function testBakeWithPlugin() {
$this->Task->plugin = 'ControllerTest';

//fake plugin path
Plugin::load('ControllerTest', array('path' => APP . 'Plugin/ControllerTest/'));
Plugin::load('ControllerTest', array('path' => APP . 'Plugin/ControllerTest/'));
$path = APP . 'Plugin/ControllerTest/Model/BakeArticle.php';
$this->Task->expects($this->once())->method('createFile')
->with($path, $this->stringContains('BakeArticle extends ControllerTestAppModel'));
Expand Down Expand Up @@ -957,7 +957,7 @@ public function testExecuteIntoAll() {
*
* @return void
*/
public function testExecuteIntoAllOddTables() {
public function testExecuteIntoAllOddTables() {
$out = $this->getMock('Cake\Console\ConsoleOutput', array(), array(), '', false);
$in = $this->getMock('Cake\Console\ConsoleInput', array(), array(), '', false);
$this->Task = $this->getMock('Cake\Console\Command\Task\ModelTask',
Expand Down Expand Up @@ -1012,7 +1012,7 @@ public function testExecuteIntoAllOddTables() {
*
* @return void
*/
public function testExecuteIntoBakeOddTables() {
public function testExecuteIntoBakeOddTables() {
$out = $this->getMock('Cake\Console\ConsoleOutput', array(), array(), '', false);
$in = $this->getMock('Cake\Console\ConsoleInput', array(), array(), '', false);
$this->Task = $this->getMock('Cake\Console\Command\Task\ModelTask',
Expand Down
Expand Up @@ -604,7 +604,7 @@ public function testBakeWithPlugin() {

//fake plugin path
Plugin::load('TestTest', array('path' => APP . 'Plugin/TestTest/'));
$path = APP . 'Plugin/TestTest/Test/TestCase/View/Helper/FormHelperTest.php';
$path = APP . 'Plugin/TestTest/Test/TestCase/View/Helper/FormHelperTest.php';
$this->Task->expects($this->once())->method('createFile')
->with($path, $this->anything());

Expand Down

0 comments on commit 08bc132

Please sign in to comment.