The branch, master has been updated via e62d62fa124328df9d22f4d1e794148325e8d207 (commit) via 498d53f17787fe37c8adf121fb071712c5c4e587 (commit) via de5c41d5372146803e0b97fcbb20d983c38d6459 (commit) via 96140680eeed6858d708d51532f9aec8bdd0d195 (commit) from c7c532e1f335079fe65cac3f30adae1b1ddb8e34 (commit)
- Log ----------------------------------------------------------------- commit e62d62fa124328df9d22f4d1e794148325e8d207 Author: Madhura Jayaratne madhura.cj@gmail.com Date: Thu Jul 21 21:50:55 2011 +0530
Add package name
commit 498d53f17787fe37c8adf121fb071712c5c4e587 Author: Madhura Jayaratne madhura.cj@gmail.com Date: Thu Jul 21 21:45:27 2011 +0530
Keep 1 space after the longest variable name
commit de5c41d5372146803e0b97fcbb20d983c38d6459 Author: Madhura Jayaratne madhura.cj@gmail.com Date: Thu Jul 21 21:44:30 2011 +0530
Line length
commit 96140680eeed6858d708d51532f9aec8bdd0d195 Author: Madhura Jayaratne madhura.cj@gmail.com Date: Thu Jul 21 21:29:14 2011 +0530
Indicate that these methods returns nothing
-----------------------------------------------------------------------
Summary of changes: libraries/gis/pma_gis_factory.php | 2 +- libraries/gis/pma_gis_geometry.php | 33 +++++++++++++++---------- libraries/gis/pma_gis_geometrycollection.php | 5 ++- libraries/gis/pma_gis_linestring.php | 10 ++++--- libraries/gis/pma_gis_multilinestring.php | 10 ++++--- libraries/gis/pma_gis_multipoint.php | 10 ++++--- libraries/gis/pma_gis_multipolygon.php | 8 ++++-- libraries/gis/pma_gis_point.php | 12 +++++---- libraries/gis/pma_gis_polygon.php | 5 ++- libraries/gis/pma_gis_visualization.php | 19 +++++++++++++- 10 files changed, 74 insertions(+), 40 deletions(-)
diff --git a/libraries/gis/pma_gis_factory.php b/libraries/gis/pma_gis_factory.php index 7dd1dae..73e6c4c 100644 --- a/libraries/gis/pma_gis_factory.php +++ b/libraries/gis/pma_gis_factory.php @@ -2,7 +2,7 @@ /** * Factory class that handles the creation of geometric objects. * - * @package phpMyAdmin + * @package phpMyAdmin-GIS */ class PMA_GIS_Factory { diff --git a/libraries/gis/pma_gis_geometry.php b/libraries/gis/pma_gis_geometry.php index 8decdcc..787eaf3 100644 --- a/libraries/gis/pma_gis_geometry.php +++ b/libraries/gis/pma_gis_geometry.php @@ -2,7 +2,7 @@ /** * Base class for all GIS data type classes. * - * @package phpMyAdmin + * @package phpMyAdmin-GIS */ abstract class PMA_GIS_Geometry { @@ -45,13 +45,14 @@ abstract class PMA_GIS_Geometry public abstract function prepareRowAsPdf($spatial, $label, $color, $scale_data, $pdf);
/** - * Prepares the JavaScript related to a row in the GIS dataset to visualize it with OpenLayers. + * Prepares the JavaScript related to a row in the GIS dataset + * to visualize it with OpenLayers. * - * @param string $spatial GIS data object - * @param int $srid Spatial reference ID - * @param string $label Label for the GIS data object - * @param string $color Color for the GIS data object - * @param array $scale_data Array containing data related to scaling + * @param string $spatial GIS data object + * @param int $srid Spatial reference ID + * @param string $label Label for the GIS data object + * @param string $color Color for the GIS data object + * @param array $scale_data Array containing data related to scaling * * @return the JavaScript related to a row in the GIS dataset */ @@ -77,9 +78,11 @@ abstract class PMA_GIS_Geometry protected function getBoundsForOl($srid, $scale_data) { return 'bound = new OpenLayers.Bounds(); bound.extend(new OpenLayers.LonLat(' - . $scale_data['minX'] . ', ' . $scale_data['minY'] . ').transform(new OpenLayers.Projection("EPSG:' + . $scale_data['minX'] . ', ' . $scale_data['minY'] + . ').transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject())); bound.extend(new OpenLayers.LonLat(' - . $scale_data['maxX'] . ', ' . $scale_data['maxY'] . ').transform(new OpenLayers.Projection("EPSG:' + . $scale_data['maxX'] . ', ' . $scale_data['maxY'] + . ').transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject()));'; }
@@ -173,8 +176,10 @@ abstract class PMA_GIS_Geometry $points_arr = $this->extractPoints($polygon, null); $row .= 'new OpenLayers.Geometry.LinearRing(new Array('; foreach ($points_arr as $point) { - $row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' . $point[1] . '))' - . '.transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject()), '; + $row .= '(new OpenLayers.Geometry.Point(' + . $point[0] . ', ' . $point[1] . '))' + . '.transform(new OpenLayers.Projection("EPSG:' + . $srid . '"), map.getProjectionObject()), '; } $row = substr($row, 0, strlen($row) - 2); $row .= '))'; @@ -185,8 +190,10 @@ abstract class PMA_GIS_Geometry $points_arr = $this->extractPoints($ring, null); $row .= 'new OpenLayers.Geometry.LinearRing(new Array('; foreach ($points_arr as $point) { - $row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' . $point[1] . '))' - . '.transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject()), '; + $row .= '(new OpenLayers.Geometry.Point(' + . $point[0] . ', ' . $point[1] . '))' + . '.transform(new OpenLayers.Projection("EPSG:' + . $srid . '"), map.getProjectionObject()), '; } $row = substr($row, 0, strlen($row) - 2); $row .= ')), '; diff --git a/libraries/gis/pma_gis_geometrycollection.php b/libraries/gis/pma_gis_geometrycollection.php index ca48f08..a3da6bf 100644 --- a/libraries/gis/pma_gis_geometrycollection.php +++ b/libraries/gis/pma_gis_geometrycollection.php @@ -2,7 +2,7 @@ /** * Handles the visualization of GIS GEOMETRYCOLLECTION objects. * - * @package phpMyAdmin + * @package phpMyAdmin-GIS */ class PMA_GIS_Geometrycollection extends PMA_GIS_Geometry { @@ -165,7 +165,8 @@ class PMA_GIS_Geometrycollection extends PMA_GIS_Geometry }
/** - * Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers. + * Prepares JavaScript related to a row in the GIS dataset + * to visualize it with OpenLayers. * * @param string $spatial GIS GEOMETRYCOLLECTION object * @param int $srid Spatial reference ID diff --git a/libraries/gis/pma_gis_linestring.php b/libraries/gis/pma_gis_linestring.php index dad4f9b..97113b7 100644 --- a/libraries/gis/pma_gis_linestring.php +++ b/libraries/gis/pma_gis_linestring.php @@ -2,7 +2,7 @@ /** * Handles the visualization of GIS LINESTRING objects. * - * @package phpMyAdmin + * @package phpMyAdmin-GIS */ class PMA_GIS_Linestring extends PMA_GIS_Geometry { @@ -154,7 +154,8 @@ class PMA_GIS_Linestring extends PMA_GIS_Geometry }
/** - * Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers. + * Prepares JavaScript related to a row in the GIS dataset + * to visualize it with OpenLayers. * * @param string $spatial GIS LINESTRING object * @param int $srid Spatial reference ID @@ -183,8 +184,9 @@ class PMA_GIS_Linestring extends PMA_GIS_Geometry
$row = 'new Array('; foreach ($points_arr as $point) { - $row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' . $point[1] . '))' - . '.transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject()), '; + $row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' + . $point[1] . ')).transform(new OpenLayers.Projection("EPSG:' + . $srid . '"), map.getProjectionObject()), '; } $row = substr($row, 0, strlen($row) - 2); $row .= ')'; diff --git a/libraries/gis/pma_gis_multilinestring.php b/libraries/gis/pma_gis_multilinestring.php index 1289a93..733cc84 100644 --- a/libraries/gis/pma_gis_multilinestring.php +++ b/libraries/gis/pma_gis_multilinestring.php @@ -2,7 +2,7 @@ /** * Handles the visualization of GIS MULTILINESTRING objects. * - * @package phpMyAdmin + * @package phpMyAdmin-GIS */ class PMA_GIS_Multilinestring extends PMA_GIS_Geometry { @@ -179,7 +179,8 @@ class PMA_GIS_Multilinestring extends PMA_GIS_Geometry }
/** - * Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers. + * Prepares JavaScript related to a row in the GIS dataset + * to visualize it with OpenLayers. * * @param string $spatial GIS MULTILINESTRING object * @param int $srid Spatial reference ID @@ -213,8 +214,9 @@ class PMA_GIS_Multilinestring extends PMA_GIS_Geometry $points_arr = $this->extractPoints($linestring, null); $row .= 'new OpenLayers.Geometry.LineString(new Array('; foreach ($points_arr as $point) { - $row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' . $point[1] . '))' - . '.transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject()), '; + $row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' + . $point[1] . ')).transform(new OpenLayers.Projection("EPSG:' + . $srid . '"), map.getProjectionObject()), '; } $row = substr($row, 0, strlen($row) - 2); $row .= ')), '; diff --git a/libraries/gis/pma_gis_multipoint.php b/libraries/gis/pma_gis_multipoint.php index 48e9099..ce20f92 100644 --- a/libraries/gis/pma_gis_multipoint.php +++ b/libraries/gis/pma_gis_multipoint.php @@ -2,7 +2,7 @@ /** * Handles the visualization of GIS MULTIPOINT objects. * - * @package phpMyAdmin + * @package phpMyAdmin-GIS */ class PMA_GIS_Multipoint extends PMA_GIS_Geometry { @@ -143,7 +143,8 @@ class PMA_GIS_Multipoint extends PMA_GIS_Geometry }
/** - * Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers. + * Prepares JavaScript related to a row in the GIS dataset + * to visualize it with OpenLayers. * * @param string $spatial GIS MULTIPOINT object * @param int $srid Spatial reference ID @@ -175,8 +176,9 @@ class PMA_GIS_Multipoint extends PMA_GIS_Geometry
$row = 'new Array('; foreach ($points_arr as $point) { - $row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' . $point[1] . '))' - . '.transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject()), '; + $row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' . $point[1] + . ')).transform(new OpenLayers.Projection("EPSG:' . $srid + . '"), map.getProjectionObject()), '; } $row = substr($row, 0, strlen($row) - 2); $row .= ')'; diff --git a/libraries/gis/pma_gis_multipolygon.php b/libraries/gis/pma_gis_multipolygon.php index db6f6cb..431fc88 100644 --- a/libraries/gis/pma_gis_multipolygon.php +++ b/libraries/gis/pma_gis_multipolygon.php @@ -2,7 +2,7 @@ /** * Handles the visualization of GIS MULTIPOLYGON objects. * - * @package phpMyAdmin + * @package phpMyAdmin-GIS */ class PMA_GIS_Multipolygon extends PMA_GIS_Geometry { @@ -154,7 +154,8 @@ class PMA_GIS_Multipolygon extends PMA_GIS_Geometry
foreach ($inner as $inner_poly) { $points_arr = array_merge( - $points_arr, $this->extractPoints($inner_poly, $scale_data, true) + $points_arr, + $this->extractPoints($inner_poly, $scale_data, true) ); } } @@ -223,7 +224,8 @@ class PMA_GIS_Multipolygon extends PMA_GIS_Geometry }
/** - * Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers. + * Prepares JavaScript related to a row in the GIS dataset + * to visualize it with OpenLayers. * * @param string $spatial GIS MULTIPOLYGON object * @param int $srid Spatial reference ID diff --git a/libraries/gis/pma_gis_point.php b/libraries/gis/pma_gis_point.php index 4318572..31531f3 100644 --- a/libraries/gis/pma_gis_point.php +++ b/libraries/gis/pma_gis_point.php @@ -2,7 +2,7 @@ /** * Handles the visualization of GIS POINT objects. * - * @package phpMyAdmin + * @package phpMyAdmin-GIS */ class PMA_GIS_Point extends PMA_GIS_Geometry { @@ -136,7 +136,8 @@ class PMA_GIS_Point extends PMA_GIS_Geometry }
/** - * Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers. + * Prepares JavaScript related to a row in the GIS dataset + * to visualize it with OpenLayers. * * @param string $spatial GIS POINT object * @param int $srid Spatial reference ID @@ -167,9 +168,10 @@ class PMA_GIS_Point extends PMA_GIS_Geometry $points_arr = $this->extractPoints($point, null);
$result .= 'vectorLayer.addFeatures(new OpenLayers.Feature.Vector((' - . 'new OpenLayers.Geometry.Point(' . $points_arr[0][0] . ', ' . $points_arr[0][1] . ')' - . '.transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject())),' - . ' null, ' . json_encode($style_options) . '));'; + . 'new OpenLayers.Geometry.Point(' . $points_arr[0][0] . ', ' + . $points_arr[0][1] . ').transform(new OpenLayers.Projection("EPSG:' + . $srid . '"), map.getProjectionObject())), null, ' + . json_encode($style_options) . '));'; return $result; } } diff --git a/libraries/gis/pma_gis_polygon.php b/libraries/gis/pma_gis_polygon.php index ce8ffa8..02f0173 100644 --- a/libraries/gis/pma_gis_polygon.php +++ b/libraries/gis/pma_gis_polygon.php @@ -2,7 +2,7 @@ /** * Handles the visualization of GIS POLYGON objects. * - * @package phpMyAdmin + * @package phpMyAdmin-GIS */ class PMA_GIS_Polygon extends PMA_GIS_Geometry { @@ -206,7 +206,8 @@ class PMA_GIS_Polygon extends PMA_GIS_Geometry }
/** - * Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers. + * Prepares JavaScript related to a row in the GIS dataset + * to visualize it with OpenLayers. * * @param string $spatial GIS POLYGON object * @param int $srid Spatial reference ID diff --git a/libraries/gis/pma_gis_visualization.php b/libraries/gis/pma_gis_visualization.php index 7c36857..d8da0d7 100644 --- a/libraries/gis/pma_gis_visualization.php +++ b/libraries/gis/pma_gis_visualization.php @@ -2,7 +2,7 @@ /** * Generates the JavaScripts needed to visualize GIS data. * - * @package phpMyAdmin + * @package phpMyAdmin-GIS */ class PMA_GIS_Visualization { @@ -74,6 +74,8 @@ class PMA_GIS_Visualization
/** * All the variable initialization, options handling has to be done here. + * + * @return nothing */ protected function init() { @@ -83,6 +85,8 @@ class PMA_GIS_Visualization /** * A function which handles passed parameters. Useful if desired * chart needs to be a little bit different from the default one. + * + * @return nothing */ private function _handleOptions() { @@ -121,6 +125,8 @@ class PMA_GIS_Visualization * @param string $file_name file name * @param string $type mime type * @param string $ext extension of the file + * + * @return nothing */ private function _toFile($file_name, $type, $ext) { @@ -179,6 +185,8 @@ class PMA_GIS_Visualization * Saves as a SVG image to a file. * * @param string $file_name File name + * + * @return nothing */ public function toFileAsSvg($file_name) { @@ -201,7 +209,10 @@ class PMA_GIS_Visualization
// fill the background $bg = imagecolorallocate($image, 229, 229, 229); - imagefilledrectangle($image, 0, 0, $this->_settings['width'] - 1, $this->_settings['height'] - 1, $bg); + imagefilledrectangle( + $image, 0, 0, $this->_settings['width'] - 1, + $this->_settings['height'] - 1, $bg + );
$scale_data = $this->_scaleDataSet($this->_data); $image = $this->_prepareDataSet($this->_data, 0, $scale_data, 'png', $image); @@ -234,6 +245,8 @@ class PMA_GIS_Visualization * Saves as a PNG image to a file. * * @param string $file_name File name + * + * @return nothing */ public function toFileAsPng($file_name) { @@ -260,6 +273,8 @@ class PMA_GIS_Visualization * Saves as a PDF to a file. * * @param string $file_name File name + * + * @return nothing */ public function toFileAsPdf($file_name) {
hooks/post-receive