@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | { |
71 | 71 | if ($this->isCorrectUrl(parse_url($pagePath))) { |
72 | 72 | $this->setPagePath($pagePath); |
73 | - }else{ |
|
73 | + }else { |
|
74 | 74 | throw new \Exception('$pagePath is not correct url'); |
75 | 75 | } |
76 | 76 | } |
@@ -121,9 +121,9 @@ discard block |
||
121 | 121 | $parseUrl = parse_url($url); |
122 | 122 | if ($this->isCorrectUrl($parseUrl)) { |
123 | 123 | return $parseUrl['scheme'] . '://' . $parseUrl['host']; |
124 | - } elseif(isset($parseUrl['host'])) { |
|
124 | + } elseif (isset($parseUrl['host'])) { |
|
125 | 125 | return $parseUrl['host']; |
126 | - } else { |
|
126 | + }else { |
|
127 | 127 | return ''; |
128 | 128 | } |
129 | 129 | } |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | public function upToLastDir($url) { |
134 | 134 | $parseUrl = parse_url($url); |
135 | 135 | $path = ''; |
136 | - if(isset($parseUrl['path'])) { |
|
136 | + if (isset($parseUrl['path'])) { |
|
137 | 137 | $path = preg_replace('/\/([^\/]+)$/i', '', $parseUrl['path']); |
138 | 138 | } |
139 | 139 | return rtrim($parseUrl['scheme'] . '://' . $parseUrl['host'] . $path, '/') . '/'; |
@@ -172,12 +172,12 @@ discard block |
||
172 | 172 | */ |
173 | 173 | public function getStarterPath(): string |
174 | 174 | { |
175 | - if ($this->starterPath===null) { |
|
175 | + if ($this->starterPath === null) { |
|
176 | 176 | if ($this->getBaseTag() === null) { |
177 | - $this->starterPath =$this->getPagePath(); |
|
177 | + $this->starterPath = $this->getPagePath(); |
|
178 | 178 | } elseif (array_key_exists('scheme', $this->getBaseTagParsing())) { |
179 | - $this->starterPath = $this->getBaseTag() ; |
|
180 | - } else { |
|
179 | + $this->starterPath = $this->getBaseTag(); |
|
180 | + }else { |
|
181 | 181 | $this->starterPath = $this->getPagePathParsing()['scheme'] . '://' . $this->getPagePathParsing()['host'] . |
182 | 182 | '/' . trim($this->getBaseTag(), '/') . '/'; |
183 | 183 | } |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | if ($this->domain === null) { |
191 | 191 | if ($this->getBaseTag() === null) { |
192 | 192 | $this->domain = $this->getPagePathParsing()['host'] . '/'; |
193 | - }elseif (array_key_exists('scheme', $this->getBaseTagParsing())){ |
|
193 | + }elseif (array_key_exists('scheme', $this->getBaseTagParsing())) { |
|
194 | 194 | $this->domain = $this->getBaseTagParsing()['host'] . '/'; |
195 | 195 | }else { |
196 | 196 | $this->domain = $this->getPagePathParsing()['host'] . '/'; |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | if ($this->scheme === null) { |
205 | 205 | if ($this->getBaseTag() === null) { |
206 | 206 | $this->scheme = $this->getPagePathParsing()['scheme']; |
207 | - }elseif (array_key_exists('scheme', $this->getBaseTagParsing())){ |
|
207 | + }elseif (array_key_exists('scheme', $this->getBaseTagParsing())) { |
|
208 | 208 | $this->scheme = $this->getBaseTagParsing()['scheme']; |
209 | 209 | }else { |
210 | 210 | $this->scheme = $this->getPagePathParsing()['scheme']; |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | if ($this->baseTagParsing == null) { |
219 | 219 | if (is_string($this->getBaseTag())) { |
220 | 220 | $this->baseTagParsing = parse_url($this->getBaseTag()); |
221 | - } else { |
|
221 | + }else { |
|
222 | 222 | $this->baseTagParsing = []; |
223 | 223 | } |
224 | 224 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | { |
71 | 71 | if ($this->isCorrectUrl(parse_url($pagePath))) { |
72 | 72 | $this->setPagePath($pagePath); |
73 | - }else{ |
|
73 | + } else{ |
|
74 | 74 | throw new \Exception('$pagePath is not correct url'); |
75 | 75 | } |
76 | 76 | } |
@@ -190,9 +190,9 @@ discard block |
||
190 | 190 | if ($this->domain === null) { |
191 | 191 | if ($this->getBaseTag() === null) { |
192 | 192 | $this->domain = $this->getPagePathParsing()['host'] . '/'; |
193 | - }elseif (array_key_exists('scheme', $this->getBaseTagParsing())){ |
|
193 | + } elseif (array_key_exists('scheme', $this->getBaseTagParsing())){ |
|
194 | 194 | $this->domain = $this->getBaseTagParsing()['host'] . '/'; |
195 | - }else { |
|
195 | + } else { |
|
196 | 196 | $this->domain = $this->getPagePathParsing()['host'] . '/'; |
197 | 197 | } |
198 | 198 | } |
@@ -204,9 +204,9 @@ discard block |
||
204 | 204 | if ($this->scheme === null) { |
205 | 205 | if ($this->getBaseTag() === null) { |
206 | 206 | $this->scheme = $this->getPagePathParsing()['scheme']; |
207 | - }elseif (array_key_exists('scheme', $this->getBaseTagParsing())){ |
|
207 | + } elseif (array_key_exists('scheme', $this->getBaseTagParsing())){ |
|
208 | 208 | $this->scheme = $this->getBaseTagParsing()['scheme']; |
209 | - }else { |
|
209 | + } else { |
|
210 | 210 | $this->scheme = $this->getPagePathParsing()['scheme']; |
211 | 211 | } |
212 | 212 | } |