From c997f20e07d9cb7b5be9c3e5067b5da059d227f2 Mon Sep 17 00:00:00 2001 From: ADmad Date: Mon, 4 Apr 2016 08:57:29 +0530 Subject: [PATCH] Fix CS errors --- src/Core/functions.php | 1 - src/Network/Http/Auth/Oauth.php | 1 - src/Utility/Hash.php | 2 -- src/Validation/Validation.php | 2 -- tests/TestCase/Filesystem/FileTest.php | 1 - 5 files changed, 7 deletions(-) diff --git a/src/Core/functions.php b/src/Core/functions.php index 4111a483118..b3c8e78eda0 100644 --- a/src/Core/functions.php +++ b/src/Core/functions.php @@ -19,7 +19,6 @@ * Define DS as short form of DIRECTORY_SEPARATOR. */ define('DS', DIRECTORY_SEPARATOR); - } if (!function_exists('h')) { diff --git a/src/Network/Http/Auth/Oauth.php b/src/Network/Http/Auth/Oauth.php index 076f679a211..fe66783620f 100644 --- a/src/Network/Http/Auth/Oauth.php +++ b/src/Network/Http/Auth/Oauth.php @@ -63,7 +63,6 @@ public function authentication(Request $request, array $credentials) default: throw new Exception(sprintf('Unknown Oauth signature method %s', $credentials['method'])); - } $request->header('Authorization', $value); } diff --git a/src/Utility/Hash.php b/src/Utility/Hash.php index 8f5856596b7..6117a27fc95 100644 --- a/src/Utility/Hash.php +++ b/src/Utility/Hash.php @@ -177,7 +177,6 @@ public static function extract($data, $path) $next = $filter; } $context = [$_key => $next]; - } return $context[$_key]; } @@ -277,7 +276,6 @@ protected static function _matches($data, $selector) ) { return false; } - } return true; } diff --git a/src/Validation/Validation.php b/src/Validation/Validation.php index cd80c072e22..9fad7cb0af5 100644 --- a/src/Validation/Validation.php +++ b/src/Validation/Validation.php @@ -520,13 +520,11 @@ public static function decimal($check, $places = null, $regex = null) if ($places === null) { $regex = "/^{$sign}(?:{$lnum}|{$dnum}){$exp}$/"; - } elseif ($places === true) { if (is_float($check) && floor($check) === $check) { $check = sprintf("%.1f", $check); } $regex = "/^{$sign}{$dnum}{$exp}$/"; - } elseif (is_numeric($places)) { $places = '[0-9]{' . $places . '}'; $dnum = "(?:[0-9]*[\.]{$places}|{$lnum}[\.]{$places})"; diff --git a/tests/TestCase/Filesystem/FileTest.php b/tests/TestCase/Filesystem/FileTest.php index e9836dfd47b..26163fcb9e8 100644 --- a/tests/TestCase/Filesystem/FileTest.php +++ b/tests/TestCase/Filesystem/FileTest.php @@ -446,7 +446,6 @@ public function testWrite() $this->assertEquals($data, file_get_contents($tmpFile)); $this->assertTrue(is_resource($TmpFile->handle)); $TmpFile->close(); - } unlink($tmpFile); }