From 778369595cbe6e200c5816d9e24af4f9480e6cbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 2 Oct 2013 13:32:41 +0200 Subject: [PATCH 1/2] Simplify test method name, no need to repeat class name --- test/libraries/core/PMA_array_test.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/libraries/core/PMA_array_test.php b/test/libraries/core/PMA_array_test.php index 216c731612..6209587bf7 100644 --- a/test/libraries/core/PMA_array_test.php +++ b/test/libraries/core/PMA_array_test.php @@ -15,7 +15,7 @@ require_once 'libraries/core.lib.php'; class PMA_Array_Test extends PHPUnit_Framework_TestCase { - function testPMA_arrayRead() + function testRead() { $arr = array( "int" => 1, @@ -98,7 +98,7 @@ class PMA_Array_Test extends PHPUnit_Framework_TestCase ); } - function testPMA_arrayWrite() + function testWrite() { $arr = array( "int" => 1, @@ -147,7 +147,7 @@ class PMA_Array_Test extends PHPUnit_Framework_TestCase $this->assertNull($arr['sarr'][0][2]); } - function testPMA_arrayRemove() + function testRemove() { $arr = array( "int" => 1, @@ -204,7 +204,7 @@ class PMA_Array_Test extends PHPUnit_Framework_TestCase $this->assertEmpty($arr); } - function testPMA_arrayMergeRecursive() + function testMergeRecursive() { $arr1 = array('key1' => 1, 'key2' => 2.3, 'key3' => 'str3'); $arr2 = array('key1' => 4, 'key2' => 5, 'key3' => 6); @@ -252,7 +252,7 @@ class PMA_Array_Test extends PHPUnit_Framework_TestCase } - function testPMA_arrayWalkRecursive() + function testWalkRecursive() { function fConcat($var) { @@ -272,9 +272,9 @@ class PMA_Array_Test extends PHPUnit_Framework_TestCase } /** - * @depends testPMA_arrayWalkRecursive + * @depends testWalkRecursive */ - function testPMA_arrayWalkRecursiveNotProcessIntKeys() + function testWalkRecursiveNotProcessIntKeys() { function fAdd($var) { @@ -289,9 +289,9 @@ class PMA_Array_Test extends PHPUnit_Framework_TestCase } /** - * @depends testPMA_arrayWalkRecursiveNotProcessIntKeys + * @depends testWalkRecursiveNotProcessIntKeys */ - function testPMA_arrayWalkRecursiveSubArray() + function testWalkRecursiveSubArray() { $arr = array( "key1"=>'val1', @@ -310,7 +310,7 @@ class PMA_Array_Test extends PHPUnit_Framework_TestCase $this->assertEquals($arr, $target); } - function testPMA_arrayWalkRecursiveApplyToKeysStripSlashes() + function testWalkRecursiveApplyToKeysStripSlashes() { $arr = array( "key\\1"=>'v\\\\al1', From 44eac82d0ead7897d8bba2f881c6d0c0bfcf9b97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 2 Oct 2013 13:36:29 +0200 Subject: [PATCH 2/2] Document some parameters --- libraries/error_report.lib.php | 9 ++++----- libraries/import.lib.php | 2 +- user_password.php | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/libraries/error_report.lib.php b/libraries/error_report.lib.php index 6a5d754bc7..17cf60b02a 100644 --- a/libraries/error_report.lib.php +++ b/libraries/error_report.lib.php @@ -160,16 +160,15 @@ function PMA_sendErrorReport($report) { * * uses the $LINE_COUNT global array of file names and line numbers * - * @param Array $filenames list of files in order of concatenation + * @param Array $filenames list of files in order of concatenation * @param Integer $cumulative_number the cumulative line number in the - * concatenated files + * concatenated files * - * returns two variables in an array: + * @return Array the filename and linenumber + * Returns two variables in an array: * - A String $filename the filename where the requested cumulative number * exists * - Integer $linenumber the translated line number in the returned file - * - * @return Array the filename and linenumber */ function PMA_getLineNumber($filenames, $cumulative_number) { global $LINE_COUNT; diff --git a/libraries/import.lib.php b/libraries/import.lib.php index 9ef67591bb..07ec34f178 100644 --- a/libraries/import.lib.php +++ b/libraries/import.lib.php @@ -77,7 +77,7 @@ function PMA_detectCompression($filepath) * @param string $sql query to run * @param string $full query to display, this might be commented * @param bool $controluser whether to use control user for queries - * @param array &$sql_data + * @param array &$sql_data SQL parse data storage * * @return void * @access public diff --git a/user_password.php b/user_password.php index 75316cbfd2..374f6ffae7 100644 --- a/user_password.php +++ b/user_password.php @@ -120,8 +120,8 @@ function PMA_setChangePasswordMsg() /** * Change the password * - * @param string $password - * @param string $message + * @param string $password New password + * @param string $message Message * @param array $change_password_message Message to show * * @return void