From d57de68ae484f2d249a013f10c55c9fa624f05ee Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sat, 16 May 2020 00:24:08 +0200 Subject: [PATCH] Camel case some variables Signed-off-by: William Desportes --- .../classes/Gis/GisGeometryCollectionTest.php | 22 ++++++------- test/classes/Gis/GisLineStringTest.php | 18 +++++------ test/classes/Gis/GisMultiLineStringTest.php | 18 +++++------ test/classes/Gis/GisMultiPointTest.php | 18 +++++------ test/classes/Gis/GisMultiPolygonTest.php | 18 +++++------ test/classes/Gis/GisPointTest.php | 18 +++++------ test/classes/Gis/GisPolygonTest.php | 18 +++++------ test/classes/ImportTest.php | 32 +++++++++---------- 8 files changed, 81 insertions(+), 81 deletions(-) diff --git a/test/classes/Gis/GisGeometryCollectionTest.php b/test/classes/Gis/GisGeometryCollectionTest.php index 3736f6a25b..8ad46f5cb1 100644 --- a/test/classes/Gis/GisGeometryCollectionTest.php +++ b/test/classes/Gis/GisGeometryCollectionTest.php @@ -292,11 +292,11 @@ class GisGeometryCollectionTest extends TestCase /** * Test for prepareRowAsSvg * - * @param string $spatial string to parse - * @param string $label field label - * @param string $line_color line color - * @param array $scale_data scaling parameters - * @param string $output expected output + * @param string $spatial string to parse + * @param string $label field label + * @param string $lineColor line color + * @param array $scaleData scaling parameters + * @param string $output expected output * * @return void * @@ -305,15 +305,15 @@ class GisGeometryCollectionTest extends TestCase public function testPrepareRowAsSvg( $spatial, $label, - $line_color, - $scale_data, + $lineColor, + $scaleData, $output ) { $string = $this->object->prepareRowAsSvg( $spatial, $label, - $line_color, - $scale_data + $lineColor, + $scaleData ); $this->assertEquals(1, preg_match($output, $string)); // assertMatchesRegularExpression added in 9.1 @@ -322,8 +322,8 @@ class GisGeometryCollectionTest extends TestCase $this->object->prepareRowAsSvg( $spatial, $label, - $line_color, - $scale_data + $lineColor, + $scaleData ) ); } diff --git a/test/classes/Gis/GisLineStringTest.php b/test/classes/Gis/GisLineStringTest.php index fdc77067ce..42778c53c5 100644 --- a/test/classes/Gis/GisLineStringTest.php +++ b/test/classes/Gis/GisLineStringTest.php @@ -286,11 +286,11 @@ class GisLineStringTest extends GisGeomTestCase /** * test case for prepareRowAsSvg() method * - * @param string $spatial GIS LINESTRING object - * @param string $label label for the GIS LINESTRING object - * @param string $line_color color for the GIS LINESTRING object - * @param array $scale_data array containing data related to scaling - * @param string $output expected output + * @param string $spatial GIS LINESTRING object + * @param string $label label for the GIS LINESTRING object + * @param string $lineColor color for the GIS LINESTRING object + * @param array $scaleData array containing data related to scaling + * @param string $output expected output * * @return void * @@ -299,15 +299,15 @@ class GisLineStringTest extends GisGeomTestCase public function testPrepareRowAsSvg( $spatial, $label, - $line_color, - $scale_data, + $lineColor, + $scaleData, $output ) { $string = $this->object->prepareRowAsSvg( $spatial, $label, - $line_color, - $scale_data + $lineColor, + $scaleData ); $this->assertEquals(1, preg_match($output, $string)); } diff --git a/test/classes/Gis/GisMultiLineStringTest.php b/test/classes/Gis/GisMultiLineStringTest.php index b35342a911..97c288bfd1 100644 --- a/test/classes/Gis/GisMultiLineStringTest.php +++ b/test/classes/Gis/GisMultiLineStringTest.php @@ -370,11 +370,11 @@ class GisMultiLineStringTest extends GisGeomTestCase /** * test case for prepareRowAsSvg() method * - * @param string $spatial GIS MULTILINESTRING object - * @param string $label label for the GIS MULTILINESTRING object - * @param string $line_color color for the GIS MULTILINESTRING object - * @param array $scale_data array containing data related to scaling - * @param string $output expected output + * @param string $spatial GIS MULTILINESTRING object + * @param string $label label for the GIS MULTILINESTRING object + * @param string $lineColor color for the GIS MULTILINESTRING object + * @param array $scaleData array containing data related to scaling + * @param string $output expected output * * @return void * @@ -383,15 +383,15 @@ class GisMultiLineStringTest extends GisGeomTestCase public function testPrepareRowAsSvg( $spatial, $label, - $line_color, - $scale_data, + $lineColor, + $scaleData, $output ) { $string = $this->object->prepareRowAsSvg( $spatial, $label, - $line_color, - $scale_data + $lineColor, + $scaleData ); $this->assertEquals(1, preg_match($output, $string)); } diff --git a/test/classes/Gis/GisMultiPointTest.php b/test/classes/Gis/GisMultiPointTest.php index 2efbfcf8fe..e300246962 100644 --- a/test/classes/Gis/GisMultiPointTest.php +++ b/test/classes/Gis/GisMultiPointTest.php @@ -289,11 +289,11 @@ class GisMultiPointTest extends GisGeomTestCase /** * test case for prepareRowAsSvg() method * - * @param string $spatial GIS MULTIPOINT object - * @param string $label label for the GIS MULTIPOINT object - * @param string $point_color color for the GIS MULTIPOINT object - * @param array $scale_data array containing data related to scaling - * @param string $output expected output + * @param string $spatial GIS MULTIPOINT object + * @param string $label label for the GIS MULTIPOINT object + * @param string $pointColor color for the GIS MULTIPOINT object + * @param array $scaleData array containing data related to scaling + * @param string $output expected output * * @return void * @@ -302,15 +302,15 @@ class GisMultiPointTest extends GisGeomTestCase public function testPrepareRowAsSvg( $spatial, $label, - $point_color, - $scale_data, + $pointColor, + $scaleData, $output ) { $string = $this->object->prepareRowAsSvg( $spatial, $label, - $point_color, - $scale_data + $pointColor, + $scaleData ); $this->assertEquals(1, preg_match($output, $string)); } diff --git a/test/classes/Gis/GisMultiPolygonTest.php b/test/classes/Gis/GisMultiPolygonTest.php index 51781abbd6..bd37d7b287 100644 --- a/test/classes/Gis/GisMultiPolygonTest.php +++ b/test/classes/Gis/GisMultiPolygonTest.php @@ -457,11 +457,11 @@ class GisMultiPolygonTest extends GisGeomTestCase /** * test case for prepareRowAsSvg() method * - * @param string $spatial GIS MULTIPOLYGON object - * @param string $label label for the GIS MULTIPOLYGON object - * @param string $fill_color color for the GIS MULTIPOLYGON object - * @param array $scale_data array containing data related to scaling - * @param string $output expected output + * @param string $spatial GIS MULTIPOLYGON object + * @param string $label label for the GIS MULTIPOLYGON object + * @param string $fillColor color for the GIS MULTIPOLYGON object + * @param array $scaleData array containing data related to scaling + * @param string $output expected output * * @return void * @@ -470,15 +470,15 @@ class GisMultiPolygonTest extends GisGeomTestCase public function testPrepareRowAsSvg( $spatial, $label, - $fill_color, - $scale_data, + $fillColor, + $scaleData, $output ) { $string = $this->object->prepareRowAsSvg( $spatial, $label, - $fill_color, - $scale_data + $fillColor, + $scaleData ); $this->assertEquals(1, preg_match($output, $string)); } diff --git a/test/classes/Gis/GisPointTest.php b/test/classes/Gis/GisPointTest.php index 282b467bb6..f995edf11e 100644 --- a/test/classes/Gis/GisPointTest.php +++ b/test/classes/Gis/GisPointTest.php @@ -300,11 +300,11 @@ class GisPointTest extends GisGeomTestCase /** * test case for prepareRowAsSvg() method * - * @param string $spatial GIS POINT object - * @param string $label label for the GIS POINT object - * @param string $point_color color for the GIS POINT object - * @param array $scale_data array containing data related to scaling - * @param string $output expected output + * @param string $spatial GIS POINT object + * @param string $label label for the GIS POINT object + * @param string $pointColor color for the GIS POINT object + * @param array $scaleData array containing data related to scaling + * @param string $output expected output * * @return void * @@ -313,8 +313,8 @@ class GisPointTest extends GisGeomTestCase public function testPrepareRowAsSvg( $spatial, $label, - $point_color, - $scale_data, + $pointColor, + $scaleData, $output ) { $this->assertEquals( @@ -322,8 +322,8 @@ class GisPointTest extends GisGeomTestCase $this->object->prepareRowAsSvg( $spatial, $label, - $point_color, - $scale_data + $pointColor, + $scaleData ) ); } diff --git a/test/classes/Gis/GisPolygonTest.php b/test/classes/Gis/GisPolygonTest.php index 57f9c3f256..6a37f059af 100644 --- a/test/classes/Gis/GisPolygonTest.php +++ b/test/classes/Gis/GisPolygonTest.php @@ -544,11 +544,11 @@ class GisPolygonTest extends GisGeomTestCase /** * test case for prepareRowAsSvg() method * - * @param string $spatial GIS POLYGON object - * @param string $label label for the GIS POLYGON object - * @param string $fill_color color for the GIS POLYGON object - * @param array $scale_data array containing data related to scaling - * @param string $output expected output + * @param string $spatial GIS POLYGON object + * @param string $label label for the GIS POLYGON object + * @param string $fillColor color for the GIS POLYGON object + * @param array $scaleData array containing data related to scaling + * @param string $output expected output * * @return void * @@ -557,15 +557,15 @@ class GisPolygonTest extends GisGeomTestCase public function testPrepareRowAsSvg( $spatial, $label, - $fill_color, - $scale_data, + $fillColor, + $scaleData, $output ) { $string = $this->object->prepareRowAsSvg( $spatial, $label, - $fill_color, - $scale_data + $fillColor, + $scaleData ); $this->assertEquals(1, preg_match($output, $string)); } diff --git a/test/classes/ImportTest.php b/test/classes/ImportTest.php index d795ae18b0..d42d0d37a9 100644 --- a/test/classes/ImportTest.php +++ b/test/classes/ImportTest.php @@ -498,14 +498,14 @@ class ImportTest extends TestCase ->disableOriginalConstructor() ->getMock(); - $update_query = 'UPDATE `table_1` ' + $updateQuery = 'UPDATE `table_1` ' . 'SET `id` = 20 ' . 'WHERE `id` > 10'; - $simulated_update_query = 'SELECT `id` FROM `table_1` WHERE `id` > 10 AND (`id` <> 20)'; + $simulatedUpdateQuery = 'SELECT `id` FROM `table_1` WHERE `id` > 10 AND (`id` <> 20)'; - $delete_query = 'DELETE FROM `table_1` ' + $deleteQuery = 'DELETE FROM `table_1` ' . 'WHERE `id` > 10'; - $simulated_delete_query = 'SELECT * FROM `table_1` WHERE `id` > 10'; + $simulatedDeleteQuery = 'SELECT * FROM `table_1` WHERE `id` > 10'; $dbi->expects($this->any()) ->method('numRows') @@ -519,33 +519,33 @@ class ImportTest extends TestCase $dbi->expects($this->at(1)) ->method('tryQuery') - ->with($simulated_update_query) + ->with($simulatedUpdateQuery) ->will($this->returnValue([])); $dbi->expects($this->at(4)) ->method('tryQuery') - ->with($simulated_delete_query) + ->with($simulatedDeleteQuery) ->will($this->returnValue([])); $GLOBALS['dbi'] = $dbi; - $this->simulatedQueryTest($update_query, $simulated_update_query); - $this->simulatedQueryTest($delete_query, $simulated_delete_query); + $this->simulatedQueryTest($updateQuery, $simulatedUpdateQuery); + $this->simulatedQueryTest($deleteQuery, $simulatedDeleteQuery); } /** * Tests simulated UPDATE/DELETE query. * - * @param string $sql_query SQL query - * @param string $simulated_query Simulated query + * @param string $sqlQuery SQL query + * @param string $simulatedQuery Simulated query * * @return void */ - public function simulatedQueryTest($sql_query, $simulated_query) + public function simulatedQueryTest($sqlQuery, $simulatedQuery) { - $parser = new Parser($sql_query); + $parser = new Parser($sqlQuery); $analyzed_sql_results = [ - 'query' => $sql_query, + 'query' => $sqlQuery, 'parser' => $parser, 'statement' => $parser->statements[0], ]; @@ -555,7 +555,7 @@ class ImportTest extends TestCase // URL to matched rows. $_url_params = [ 'db' => 'PMA', - 'sql_query' => $simulated_query, + 'sql_query' => $simulatedQuery, ]; $matched_rows_url = Url::getFromRoute('/sql', $_url_params); @@ -636,11 +636,11 @@ class ImportTest extends TestCase $GLOBALS['dbi'] = $dbi; - $sql_query = 'UPDATE `table_1` AS t1, `table_2` t2 ' + $sqlQuery = 'UPDATE `table_1` AS t1, `table_2` t2 ' . 'SET `table_1`.`id` = `table_2`.`id` ' . 'WHERE 1'; - $this->assertEquals(true, $this->import->checkIfRollbackPossible($sql_query)); + $this->assertEquals(true, $this->import->checkIfRollbackPossible($sqlQuery)); } /**