dereuromark 9 years ago
parent
commit
d5d89e6375

+ 1 - 3
src/Model/Behavior/JsonableBehavior.php

@@ -14,8 +14,6 @@ use Tools\Utility\Text;
 /**
  * A behavior that will json_encode (and json_decode) fields if they contain an array or specific pattern.
  *
- * Requires: PHP 5 >= 5.4.0 or PECL json >= 1.2.0
- *
  * This is a port of the Serializeable behavior by Matsimitsu (http://www.matsimitsu.nl)
  * Modified by Mark Scherer (http://www.dereuromark.de)
  *
@@ -26,7 +24,7 @@ use Tools\Utility\Text;
  * Also automatically cleans lists and works with custom separators etc
  *
  * Tip: If you have other behaviors that might modify the array data prior to saving, better use a higher priority:
- *   $this->addBehavior('Tools.Jsonable', array('priority' => 11, ...));
+ *   $this->addBehavior('Tools.Jsonable', ['priority' => 11, ...]);
  * So that it is run last.
  *
  * Usage: See docs

+ 2 - 2
src/View/Helper/UrlHelper.php

@@ -42,7 +42,7 @@ class UrlHelper extends CoreUrlHelper {
 
 	/**
 	 * @return array
-     */
+	 */
 	public function defaults() {
 		return [
 			'prefix' => false,
@@ -71,7 +71,7 @@ class UrlHelper extends CoreUrlHelper {
 	 * @param array $url
 	 *
 	 * @return array
-     */
+	 */
 	protected function addQueryStrings(array $url) {
 		if (!isset($url['?'])) {
 			$url['?'] = [];

+ 0 - 2
tests/TestCase/Controller/Component/MobileComponentTest.php

@@ -48,7 +48,6 @@ class MobileComponentTest extends TestCase {
 
 		$this->event = new Event('Controller.beforeFilter');
 		$this->Controller = new MobileComponentTestController(new Request());
-		//$this->Controller->constructClasses();
 
 		$this->Controller->request->session()->delete('User');
 		Configure::delete('User');
@@ -62,7 +61,6 @@ class MobileComponentTest extends TestCase {
 	public function tearDown() {
 		parent::tearDown();
 
-		unset($this->Controller->Mobile);
 		unset($this->Controller);
 	}
 

+ 2 - 4
tests/TestCase/Model/Behavior/JsonableBehaviorTest.php

@@ -337,8 +337,7 @@ class JsonableBehaviorTest extends TestCase {
 	/**
 	 * @return void
 	 */
-	public function testEncodeWithComplexContent()
-	{
+	public function testEncodeWithComplexContent() {
 		$this->Comments->removeBehavior('Jsonable');
 		$this->Comments->addBehavior('Tools.Jsonable', [
 			'output' => 'array',
@@ -371,8 +370,7 @@ class JsonableBehaviorTest extends TestCase {
 	/**
 	 * @return void
 	 */
-	public function testEncodeWithNoParamsComplexContent()
-	{
+	public function testEncodeWithNoParamsComplexContent() {
 		$this->Comments->removeBehavior('Jsonable');
 		$this->Comments->addBehavior('Tools.Jsonable', [
 			'output' => 'array',

+ 0 - 2
tests/TestCase/Model/Table/TableTest.php

@@ -407,8 +407,6 @@ class TableTest extends TestCase {
 	}
 
 	/**
-	 * TableTest::testValidateUrl()
-	 *
 	 * @return void
 	 */
 	public function testValidateUrl() {