Passed
Push — master ( f1705a...4f3945 )
by Evgenii
01:52
created
src/MetaMaster.php 1 patch
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -77,8 +77,9 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function init()
79 79
     {
80
-        if (!$this->request)
81
-            $this->request = Yii::$app->request;
80
+        if (!$this->request) {
81
+                    $this->request = Yii::$app->request;
82
+        }
82 83
         parent::init();
83 84
     }
84 85
 
@@ -199,10 +200,11 @@  discard block
 block discarded – undo
199 200
     public function getAbsoluteUrl($absoluteUrl = null)
200 201
     {
201 202
 
202
-        if ($absoluteUrl !== null)
203
-            $absoluteUrl = $this->request->getHostInfo() . $absoluteUrl;
204
-        else
205
-            $absoluteUrl = $this->request->absoluteUrl;
203
+        if ($absoluteUrl !== null) {
204
+                    $absoluteUrl = $this->request->getHostInfo() . $absoluteUrl;
205
+        } else {
206
+                    $absoluteUrl = $this->request->absoluteUrl;
207
+        }
206 208
         return preg_replace('/https|http/', $this->protocol, $absoluteUrl, -1, $count);
207 209
     }
208 210
 
@@ -246,8 +248,9 @@  discard block
 block discarded – undo
246 248
         }
247 249
 
248 250
         $path = Yii::getAlias($this->imagePath ?: $this->web . $image);
249
-        if ($this->imagePath)
250
-            $path = $this->imagePath;
251
+        if ($this->imagePath) {
252
+                    $path = $this->imagePath;
253
+        }
251 254
         if (file_exists($path)) {
252 255
             $imageSize = getimagesize($path);
253 256
             $this->view->registerMetaTag(['property' => 'og:image:width', 'content' => $imageSize[0]]);
Please login to merge, or discard this patch.