Completed
Branch heritage_class (54197b)
by Maxime
02:35
created
src/Nominatim.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -72,15 +72,15 @@  discard block
 block discarded – undo
72 72
 				'connection_timeout' => 5,
73 73
 			]);
74 74
 		} 
75
-		else if($http_client instanceof Client)
75
+		else if ($http_client instanceof Client)
76 76
 		{
77 77
 			$application_url_client = $http_client->getConfig('base_uri');
78 78
 
79
-			if(!isset($application_url_client))
79
+			if (!isset($application_url_client))
80 80
 			{
81 81
 				$http_client->setDefaultOption('base_uri', $application_url);
82 82
 			}
83
-			else if($application_url_client != $application_url)
83
+			else if ($application_url_client != $application_url)
84 84
 			{
85 85
 				throw new InvalidParameterException("http_client parameter has a differente url to application_url parameter");
86 86
 			}
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
 			throw new InvalidParameterException("http_client parameter must be a GuzzleHttp\Client object or empty");
91 91
 		}
92 92
 
93
-		$this->application_url 	= $application_url;
94
-		$this->http_client 		= $http_client;
93
+		$this->application_url = $application_url;
94
+		$this->http_client = $http_client;
95 95
 
96 96
 		//Create base
97 97
 		$this->baseSearch = new Search();
@@ -131,12 +131,12 @@  discard block
 block discarded – undo
131 131
 	private function decodeResponse($format, Request $request, Response $response)
132 132
 	{
133 133
 
134
-		if($format == 'json')
134
+		if ($format == 'json')
135 135
 		{
136 136
 			return json_decode($response->getBody(), true);
137 137
 		}
138 138
 
139
-		if($format == 'xml')
139
+		if ($format == 'xml')
140 140
 		{
141 141
 			return new \SimpleXMLElement($response->getBody());
142 142
 		}
Please login to merge, or discard this patch.
src/Search.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 	{
203 203
 		$args = func_get_args();
204 204
 
205
-		if(count($args) > 0)
205
+		if (count($args) > 0)
206 206
 		{
207 207
 			$this->query['exclude_place_ids'] = implode(', ', $args);
208 208
 
@@ -236,9 +236,9 @@  discard block
 block discarded – undo
236 236
 	 */
237 237
 	public function polygon($polygon)
238 238
 	{
239
-		if(in_array($polygon, $this->polygon))
239
+		if (in_array($polygon, $this->polygon))
240 240
 		{
241
-			$this->query['polygon_'.$polygon] = "1";
241
+			$this->query['polygon_' . $polygon] = "1";
242 242
 
243 243
 			return $this;
244 244
 		}
Please login to merge, or discard this patch.
src/Query.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 */
45 45
 	public function __construct(array $query = [])
46 46
 	{
47
-		if(!isset($query['format']))
47
+		if (!isset($query['format']))
48 48
 		{
49 49
 			//Default format
50 50
 			$query['format'] = 'json';
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	{
70 70
 		$format = strtolower($format);
71 71
 
72
-		if(in_array($format, $this->accepteFormat))
72
+		if (in_array($format, $this->accepteFormat))
73 73
 		{
74 74
 			$this->query['format'] = $format;
75 75
 			$this->setFormat($format);
Please login to merge, or discard this patch.
src/Reverse.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 */
56 56
 	public function osmType($type)
57 57
 	{
58
-		if(in_array($type, $this->osmType))
58
+		if (in_array($type, $this->osmType))
59 59
 		{
60 60
 			$this->query['osm_type'] = $type;
61 61
 
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	public function polygon($polygon)
123 123
 	{
124
-		if(in_array($polygon, $this->polygon))
124
+		if (in_array($polygon, $this->polygon))
125 125
 		{
126
-			$this->query['polygon_'.$polygon] = "1";
126
+			$this->query['polygon_' . $polygon] = "1";
127 127
 
128 128
 			return $this;
129 129
 		}
Please login to merge, or discard this patch.