Browse Source

fix coding standards

Ceeram 13 years ago
parent
commit
a8eca60fc5

+ 1 - 1
lib/Cake/Model/Model.php

@@ -2581,7 +2581,7 @@ class Model extends Object implements CakeEventListener {
 		if ($id === false) {
 			return false;
 		}
-		return (bool)$this->find('count',  array(
+		return (bool)$this->find('count', array(
 			'conditions' => array(
 				$this->alias . '.' . $this->primaryKey => $id
 			),

+ 2 - 3
lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php

@@ -880,7 +880,6 @@ class CakeRouteTest extends CakeTestCase {
 		$this->assertEquals($expected, $result);
 	}
 
-
 /**
  * test that utf-8 patterns work for :section
  *
@@ -888,14 +887,14 @@ class CakeRouteTest extends CakeTestCase {
  */
 	public function testUTF8PatternOnSection() {
 		$route = new CakeRoute(
-			'/:section', 
+			'/:section',
 			array('plugin' => 'blogs', 'controller' => 'posts' , 'action' => 'index' ),
 			array(
 				'persist' => array('section'),
 				'section' => 'آموزش|weblog'
 			)
 		);
-		
+
 		$result = $route->parse('/%D8%A2%D9%85%D9%88%D8%B2%D8%B4');
 		$expected = array('section' => 'آموزش', 'plugin' => 'blogs', 'controller' => 'posts', 'action' => 'index', 'pass' => array(), 'named' => array());
 		$this->assertEquals($expected, $result);

+ 0 - 1
lib/Cake/Test/Case/View/MediaViewTest.php

@@ -130,7 +130,6 @@ class MediaViewTest extends CakeTestCase {
  * @return void
  */
 	public function testRenderUpperExtension() {
-		return;
 		$this->MediaView->viewVars = array(
 			'path' => CAKE . 'Test' . DS . 'test_app' . DS . 'Vendor' . DS . 'img' . DS,
 			'id' => 'test_2.JPG'

+ 0 - 4
lib/Cake/basics.php

@@ -332,13 +332,10 @@ if (!function_exists('env')) {
 					$offset = 4;
 				}
 				return substr($filename, 0, -(strlen($name) + $offset));
-				break;
 			case 'PHP_SELF':
 				return str_replace(env('DOCUMENT_ROOT'), '', env('SCRIPT_FILENAME'));
-				break;
 			case 'CGI_MODE':
 				return (PHP_SAPI === 'cgi');
-				break;
 			case 'HTTP_BASE':
 				$host = env('HTTP_HOST');
 				$parts = explode('.', $host);
@@ -378,7 +375,6 @@ if (!function_exists('env')) {
 				}
 				array_shift($parts);
 				return '.' . implode('.', $parts);
-				break;
 		}
 		return null;
 	}