Browse Source

Merge pull request #3891 from dereuromark/3.0-cs

fix cs
Mark Story 11 years ago
parent
commit
40022abb36

+ 1 - 1
src/Database/Expression/QueryExpression.php

@@ -434,7 +434,7 @@ class QueryExpression implements ExpressionInterface, Countable {
 			if ($numericKey && empty($c)) {
 				continue;
 			}
-			
+
 			if (is_callable($c)) {
 				$expr = new QueryExpression([], $typeMap);
 				$c = $c($expr, $this);

+ 17 - 17
src/Routing/Router.php

@@ -1149,23 +1149,23 @@ class Router {
 	}
 
 /**
-* Add plugin routes.
-*
-* This method creates a scoped route collection that includes
-* relevant plugin information.
-*
-* The plugin name will be inflected to the underscore version to create
-* the routing path. If you want a custom path name, use the `path` option.
-*
-* Routes connected in the scoped collection will have the correct path segment
-* prepended, and have a matching plugin routing key set.
-*
-* @param string $path The path name to use for the prefix.
-* @param array|callable $options Either the options to use, or a callback.
-* @param callable $callback The callback to invoke that builds the plugin routes.
-*   Only required when $options is defined.
-* @return void
-*/
+ * Add plugin routes.
+ *
+ * This method creates a scoped route collection that includes
+ * relevant plugin information.
+ *
+ * The plugin name will be inflected to the underscore version to create
+ * the routing path. If you want a custom path name, use the `path` option.
+ *
+ * Routes connected in the scoped collection will have the correct path segment
+ * prepended, and have a matching plugin routing key set.
+ *
+ * @param string $path The path name to use for the prefix.
+ * @param array|callable $options Either the options to use, or a callback.
+ * @param callable $callback The callback to invoke that builds the plugin routes.
+ *   Only required when $options is defined.
+ * @return void
+ */
 	public static function plugin($name, $options = [], $callback = null) {
 		if ($callback === null) {
 			$callback = $options;

+ 17 - 17
src/Routing/ScopedRouteCollection.php

@@ -481,23 +481,23 @@ class ScopedRouteCollection {
 	}
 
 /**
-* Add plugin routes.
-*
-* This method creates a new scoped route collection that includes
-* relevant plugin information.
-*
-* The plugin name will be inflected to the underscore version to create
-* the routing path. If you want a custom path name, use the `path` option.
-*
-* Routes connected in the scoped collection will have the correct path segment
-* prepended, and have a matching plugin routing key set.
-*
-* @param string $path The path name to use for the prefix.
-* @param array|callable $options Either the options to use, or a callback.
-* @param callable $callback The callback to invoke that builds the plugin routes.
-*   Only required when $options is defined.
-* @return void
-*/
+ * Add plugin routes.
+ *
+ * This method creates a new scoped route collection that includes
+ * relevant plugin information.
+ *
+ * The plugin name will be inflected to the underscore version to create
+ * the routing path. If you want a custom path name, use the `path` option.
+ *
+ * Routes connected in the scoped collection will have the correct path segment
+ * prepended, and have a matching plugin routing key set.
+ *
+ * @param string $path The path name to use for the prefix.
+ * @param array|callable $options Either the options to use, or a callback.
+ * @param callable $callback The callback to invoke that builds the plugin routes.
+ *   Only required when $options is defined.
+ * @return void
+ */
 	public function plugin($name, $options = [], $callback = null) {
 		if ($callback === null) {
 			$callback = $options;

+ 1 - 2
tests/TestCase/Console/Command/Task/ModelTaskTest.php

@@ -716,8 +716,7 @@ class ModelTaskTest extends TestCase {
 		$this->assertContains("->add('email', 'valid', ['rule' => 'email'])", $result);
 		$this->assertContains(
 			"->add('email', 'unique', ['rule' => 'validateUnique', 'provider' => 'table'])",
-			$result)
-		;
+			$result);
 		$this->assertContains("->allowEmpty('id', 'create')", $result);
 		$this->assertContains("->allowEmpty('email')", $result);
 		$this->assertContains("->validatePresence('name', 'create')", $result);

+ 23 - 23
tests/TestCase/Database/ConnectionTest.php

@@ -111,7 +111,7 @@ class ConnectionTest extends TestCase {
  *
  * @expectedException \Cake\Database\Error\MissingConnectionException
  * @return void
- **/
+ */
 	public function testWrongCredentials() {
 		$config = ConnectionManager::config('test');
 		$this->skipIf(isset($config['dsn']), 'Datasource has dsn, skipping.');
@@ -123,7 +123,7 @@ class ConnectionTest extends TestCase {
  * Tests creation of prepared statements
  *
  * @return void
- **/
+ */
 	public function testPrepare() {
 		$sql = 'SELECT 1 + 1';
 		$result = $this->connection->prepare($sql);
@@ -141,7 +141,7 @@ class ConnectionTest extends TestCase {
  * Tests executing a simple query using bound values
  *
  * @return void
- **/
+ */
 	public function testExecuteWithArguments() {
 		$sql = 'SELECT 1 + ?';
 		$statement = $this->connection->execute($sql, [1], array('integer'));
@@ -169,7 +169,7 @@ class ConnectionTest extends TestCase {
  * Tests executing a query with params and associated types
  *
  * @return void
- **/
+ */
 	public function testExecuteWithArgumentsAndTypes() {
 		$sql = "SELECT '2012-01-01' = ?";
 		$statement = $this->connection->execute($sql, [new \DateTime('2012-01-01')], ['date']);
@@ -183,7 +183,7 @@ class ConnectionTest extends TestCase {
  *
  * @expectedException \InvalidArgumentException
  * @return void
- **/
+ */
 	public function testExecuteWithMissingType() {
 		$sql = 'SELECT ?';
 		$statement = $this->connection->execute($sql, [new \DateTime('2012-01-01')], ['bar']);
@@ -193,7 +193,7 @@ class ConnectionTest extends TestCase {
  * Tests executing a query with no params also works
  *
  * @return void
- **/
+ */
 	public function testExecuteWithNoParams() {
 		$sql = 'SELECT 1';
 		$statement = $this->connection->execute($sql);
@@ -207,7 +207,7 @@ class ConnectionTest extends TestCase {
  * Tests it is possible to insert data into a table using matching types by key name
  *
  * @return void
- **/
+ */
 	public function testInsertWithMatchingTypes() {
 		$data = ['id' => '3', 'title' => 'a title', 'body' => 'a body'];
 		$result = $this->connection->insert(
@@ -228,7 +228,7 @@ class ConnectionTest extends TestCase {
  * Tests it is possible to insert data into a table using matching types by array position
  *
  * @return void
- **/
+ */
 	public function testInsertWithPositionalTypes() {
 		$data = ['id' => '3', 'title' => 'a title', 'body' => 'a body'];
 		$result = $this->connection->insert(
@@ -249,7 +249,7 @@ class ConnectionTest extends TestCase {
  * Tests an statement class can be reused for multiple executions
  *
  * @return void
- **/
+ */
 	public function testStatementReusing() {
 		$total = $this->connection->execute('SELECT COUNT(*) AS total FROM things');
 		$result = $total->fetch('assoc');
@@ -271,7 +271,7 @@ class ConnectionTest extends TestCase {
  * Tests rows can be updated without specifying any conditions nor types
  *
  * @return void
- **/
+ */
 	public function testUpdateWithoutConditionsNorTypes() {
 		$title = 'changed the title!';
 		$body = 'changed the body!';
@@ -285,7 +285,7 @@ class ConnectionTest extends TestCase {
  * Tests it is possible to use key => value conditions for update
  *
  * @return void
- **/
+ */
 	public function testUpdateWithConditionsNoTypes() {
 		$title = 'changed the title!';
 		$body = 'changed the body!';
@@ -299,7 +299,7 @@ class ConnectionTest extends TestCase {
  * Tests it is possible to use key => value and string conditions for update
  *
  * @return void
- **/
+ */
 	public function testUpdateWithConditionsCombinedNoTypes() {
 		$title = 'changed the title!';
 		$body = 'changed the body!';
@@ -313,7 +313,7 @@ class ConnectionTest extends TestCase {
  * Tests you can bind types to update values
  *
  * @return void
- **/
+ */
 	public function testUpdateWithTypes() {
 		$title = 'changed the title!';
 		$body = new \DateTime('2012-01-01');
@@ -332,7 +332,7 @@ class ConnectionTest extends TestCase {
  * Tests you can bind types to update values
  *
  * @return void
- **/
+ */
 	public function testUpdateWithConditionsAndTypes() {
 		$title = 'changed the title!';
 		$body = new \DateTime('2012-01-01');
@@ -349,7 +349,7 @@ class ConnectionTest extends TestCase {
  * Tests delete from table with no conditions
  *
  * @return void
- **/
+ */
 	public function testDeleteNoConditions() {
 		$this->connection->delete('things');
 		$result = $this->connection->execute('SELECT * FROM things');
@@ -360,7 +360,7 @@ class ConnectionTest extends TestCase {
 /**
  * Tests delete from table with conditions
  * @return void
- **/
+ */
 	public function testDeleteWithConditions() {
 		$this->connection->delete('things', ['id' => '1-rest-is-ommited'], ['id' => 'integer']);
 		$result = $this->connection->execute('SELECT * FROM things');
@@ -382,7 +382,7 @@ class ConnectionTest extends TestCase {
  * Tests that it is possible to use simple database transactions
  *
  * @return void
- **/
+ */
 	public function testSimpleTransactions() {
 		$this->connection->begin();
 		$this->connection->delete('things', ['id' => 1]);
@@ -403,7 +403,7 @@ class ConnectionTest extends TestCase {
  * with early rollback algorithm
  *
  * @return void
- **/
+ */
 	public function testVirtualNestedTrasanction() {
 		//starting 3 virtual transaction
 		$this->connection->begin();
@@ -426,7 +426,7 @@ class ConnectionTest extends TestCase {
  * with early rollback algorithm
  *
  * @return void
- **/
+ */
 	public function testVirtualNestedTrasanction2() {
 		//starting 3 virtual transaction
 		$this->connection->begin();
@@ -447,7 +447,7 @@ class ConnectionTest extends TestCase {
  * with early rollback algorithm
  *
  * @return void
- **/
+ */
 
 	public function testVirtualNestedTrasanction3() {
 		//starting 3 virtual transaction
@@ -470,7 +470,7 @@ class ConnectionTest extends TestCase {
  * Tests that it is possible to real use  nested transactions
  *
  * @return void
- **/
+ */
 	public function testSavePoints() {
 		$this->skipIf(!$this->connection->useSavePoints(true));
 
@@ -498,7 +498,7 @@ class ConnectionTest extends TestCase {
  * Tests that it is possible to real use  nested transactions
  *
  * @return void
- **/
+ */
 
 	public function testSavePoints2() {
 		$this->skipIf(!$this->connection->useSavePoints(true));
@@ -526,7 +526,7 @@ class ConnectionTest extends TestCase {
  * Tests connection can quote values to be safely used in query strings
  *
  * @return void
- **/
+ */
 	public function testQuote() {
 		$this->skipIf(!$this->connection->supportsQuoting());
 		$expected = "'2012-01-01'";

+ 1 - 1
tests/TestCase/Database/Expression/FunctionExpressionTest.php

@@ -19,7 +19,7 @@ use Cake\Database\ValueBinder;
 /**
  * Tests FunctionExpression class
  *
- **/
+ */
 class FunctionExpressionTest extends \Cake\TestSuite\TestCase {
 
 /**

+ 1 - 1
tests/TestCase/Database/Expression/IdentifierExpressionTest.php

@@ -22,7 +22,7 @@ use Cake\TestSuite\TestCase;
 /**
  * Tests IdentifierExpression class
  *
- **/
+ */
 class IdentifierExpressionTest extends TestCase {
 
 /**

+ 1 - 1
tests/TestCase/Database/Expression/TupleComparisonTest.php

@@ -22,7 +22,7 @@ use Cake\TestSuite\TestCase;
 /**
  * Tests TupleComparison class
  *
- **/
+ */
 class TupleComparisonTest extends TestCase {
 
 /**

+ 1 - 1
tests/TestCase/Database/FunctionsBuilderTest.php

@@ -19,7 +19,7 @@ use Cake\Database\ValueBinder;
 /**
  * Tests FunctionsBuilder class
  *
- **/
+ */
 class FunctionsBuilderTest extends \Cake\TestSuite\TestCase {
 
 /**

+ 1 - 1
tests/TestCase/Database/Log/LoggedQueryTest.php

@@ -19,7 +19,7 @@ use Cake\Database\Log\LoggedQuery;
 /**
  * Tests LoggedQuery class
  *
- **/
+ */
 class LoggedQueryTest extends \Cake\TestSuite\TestCase {
 
 /**

+ 1 - 1
tests/TestCase/Database/Log/LoggingStatementTest.php

@@ -20,7 +20,7 @@ use PDOStatement;
 /**
  * Tests LoggingStatement class
  *
- **/
+ */
 class LoggingStatementTest extends \Cake\TestSuite\TestCase {
 
 /**

+ 10 - 10
tests/TestCase/Database/QueryTest.php

@@ -389,7 +389,7 @@ class QueryTest extends TestCase {
  * Tests selecting with conditions and specifying types for those
  *
  * @return void
- **/
+ */
 	public function testSelectWhereTypes() {
 		$query = new Query($this->connection);
 		$result = $query
@@ -478,7 +478,7 @@ class QueryTest extends TestCase {
  * Tests that Query::orWhere() can be used to concatenate conditions with OR
  *
  * @return void
- **/
+ */
 	public function testSelectOrWhere() {
 		$query = new Query($this->connection);
 		$result = $query
@@ -496,7 +496,7 @@ class QueryTest extends TestCase {
  * Tests that Query::andWhere() can be used to concatenate conditions with AND
  *
  * @return void
- **/
+ */
 	public function testSelectAndWhere() {
 		$query = new Query($this->connection);
 		$result = $query
@@ -523,7 +523,7 @@ class QueryTest extends TestCase {
  * correct conditions nesting
  *
  * @return void
- **/
+ */
 	public function testSelectExpressionNesting() {
 		$query = new Query($this->connection);
 		$result = $query
@@ -556,7 +556,7 @@ class QueryTest extends TestCase {
  * Tests that Query::orWhere() can be used without calling where() before
  *
  * @return void
- **/
+ */
 	public function testSelectOrWhereNoPreviousCondition() {
 		$query = new Query($this->connection);
 		$result = $query
@@ -574,7 +574,7 @@ class QueryTest extends TestCase {
  * Tests that Query::andWhere() can be used without calling where() before
  *
  * @return void
- **/
+ */
 	public function testSelectAndWhereNoPreviousCondition() {
 		$query = new Query($this->connection);
 		$result = $query
@@ -972,7 +972,7 @@ class QueryTest extends TestCase {
  * Tests nesting query expressions both using arrays and closures
  *
  * @return void
- **/
+ */
 	public function testSelectExpressionComposition() {
 		$query = new Query($this->connection);
 		$result = $query
@@ -1046,7 +1046,7 @@ class QueryTest extends TestCase {
  * and the not() method
  *
  * @return void
- **/
+ */
 	public function testSelectWhereNot() {
 		$query = new Query($this->connection);
 		$result = $query
@@ -1091,7 +1091,7 @@ class QueryTest extends TestCase {
  * Tests order() method both with simple fields and expressions
  *
  * @return void
- **/
+ */
 	public function testSelectOrderBy() {
 		$query = new Query($this->connection);
 		$result = $query
@@ -1149,7 +1149,7 @@ class QueryTest extends TestCase {
  * and that it sends the correct query to the database
  *
  * @return void
- **/
+ */
 	public function testSelectGroup() {
 		$query = new Query($this->connection);
 		$result = $query

+ 1 - 1
tests/TestCase/Log/LogTest.php

@@ -103,7 +103,7 @@ class LogTest extends TestCase {
  * explicit tests for drop()
  *
  * @return void
- **/
+ */
 	public function testDrop() {
 		Log::config('file', array(
 			'engine' => 'File',

+ 1 - 1
tests/TestCase/ORM/CompositeKeysTest.php

@@ -150,7 +150,7 @@ class CompositeKeyTest extends TestCase {
  *
  * @dataProvider strategiesProvider
  * @return void
- **/
+ */
 	public function testBelongsToManyEager($strategy) {
 		$articles = TableRegistry::get('SiteArticles');
 		$tags = TableRegistry::get('SiteTags');

+ 3 - 3
tests/TestCase/ORM/EagerLoaderTest.php

@@ -130,7 +130,7 @@ class EagerLoaderTest extends TestCase {
  * Tests that fully defined belongsTo and hasOne relationships are joined correctly
  *
  * @return void
- **/
+ */
 	public function testContainToJoinsOneLevel() {
 		$contains = [
 			'clients' => [
@@ -295,7 +295,7 @@ class EagerLoaderTest extends TestCase {
  * Test that fields for contained models are aliased and added to the select clause
  *
  * @return void
- **/
+ */
 	public function testContainToFieldsPredefined() {
 		$contains = [
 			'clients' => [
@@ -328,7 +328,7 @@ class EagerLoaderTest extends TestCase {
  * none is specified
  *
  * @return void
- **/
+ */
 	public function testContainToFieldsDefault() {
 		$contains = ['clients' => ['orders']];
 

+ 3 - 3
tests/TestCase/ORM/QueryTest.php

@@ -289,7 +289,7 @@ class QueryTest extends TestCase {
  *
  * @dataProvider strategiesProvider
  * @return void
- **/
+ */
 	public function testHasManyEagerLoadingFieldsAndOrderNoHydration($strategy) {
 		$table = TableRegistry::get('authors');
 		TableRegistry::get('articles');
@@ -515,7 +515,7 @@ class QueryTest extends TestCase {
  *
  * @dataProvider strategiesProvider
  * @return void
- **/
+ */
 	public function testBelongsToManyEagerLoadingNoHydration($strategy) {
 		$table = TableRegistry::get('Articles');
 		TableRegistry::get('Tags');
@@ -656,7 +656,7 @@ class QueryTest extends TestCase {
  * association objects in order to perform eager loading with select strategy
  *
  * @return void
- **/
+ */
 	public function testFilteringByBelongsToManyNoHydration() {
 		$query = new Query($this->connection, $this->table);
 		$table = TableRegistry::get('Articles');

+ 1 - 1
tests/TestCase/Routing/Route/RouteTest.php

@@ -23,7 +23,7 @@ use Cake\TestSuite\TestCase;
 /**
  * Test case for Route
  *
- **/
+ */
 class RouteTest extends TestCase {
 
 /**

+ 1 - 1
tests/TestCase/View/Form/EntityContextTest.php

@@ -899,7 +899,7 @@ class EntityContextTest extends TestCase {
 		]);
 		$context->isRequired('title');
 		$articles = TableRegistry::get('Articles');
-		$this->assertSame($row,  $articles->validator()->provider('entity'));
+		$this->assertSame($row, $articles->validator()->provider('entity'));
 
 		$row = new Article([
 			'title' => 'First post',

+ 0 - 1
tests/test_app/TestApp/Config/routes.php

@@ -16,7 +16,6 @@ namespace TestApp\Config;
 
 use Cake\Routing\Router;
 
-
 Router::parseExtensions('json');
 Router::scope('/', function($routes) {
 	$routes->connect('/', ['controller' => 'pages', 'action' => 'display', 'home']);