Completed
Pull Request — master (#574)
by Fosco
02:49
created
src/Facebook/Url/FacebookUrlDetectionHandler.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function getCurrentUrl()
37 37
     {
38
-        return $this->getHttpScheme() . '://' . $this->getHostName() . $this->getServerVar('REQUEST_URI');
38
+        return $this->getHttpScheme().'://'.$this->getHostName().$this->getServerVar('REQUEST_URI');
39 39
     }
40 40
 
41 41
     /**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             return $this->protocolWithActiveSsl($protocol);
67 67
         }
68 68
 
69
-        return (string)$this->getServerVar('SERVER_PORT') === '443';
69
+        return (string) $this->getServerVar('SERVER_PORT') === '443';
70 70
     }
71 71
 
72 72
     /**
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     protected function protocolWithActiveSsl($protocol)
80 80
     {
81
-        $protocol = strtolower((string)$protocol);
81
+        $protocol = strtolower((string) $protocol);
82 82
 
83 83
         return in_array($protocol, ['on', '1', 'https', 'ssl'], true);
84 84
     }
@@ -111,14 +111,14 @@  discard block
 block discarded – undo
111 111
         // Port number
112 112
         $scheme = $this->getHttpScheme();
113 113
         $port = $this->getCurrentPort();
114
-        $appendPort = ':' . $port;
114
+        $appendPort = ':'.$port;
115 115
 
116 116
         // Don't append port number if a normal port.
117 117
         if (($scheme == 'http' && $port == '80') || ($scheme == 'https' && $port == '443')) {
118 118
             $appendPort = '';
119 119
         }
120 120
 
121
-        return $host . $appendPort;
121
+        return $host.$appendPort;
122 122
     }
123 123
 
124 124
     protected function getCurrentPort()
@@ -126,15 +126,15 @@  discard block
 block discarded – undo
126 126
         // Check for proxy first
127 127
         $port = $this->getHeader('X_FORWARDED_PORT');
128 128
         if ($port) {
129
-            return (string)$port;
129
+            return (string) $port;
130 130
         }
131 131
 
132
-        $protocol = (string)$this->getHeader('X_FORWARDED_PROTO');
132
+        $protocol = (string) $this->getHeader('X_FORWARDED_PROTO');
133 133
         if ($protocol === 'https') {
134 134
             return '443';
135 135
         }
136 136
 
137
-        return (string)$this->getServerVar('SERVER_PORT');
137
+        return (string) $this->getServerVar('SERVER_PORT');
138 138
     }
139 139
 
140 140
     /**
@@ -158,6 +158,6 @@  discard block
 block discarded – undo
158 158
      */
159 159
     protected function getHeader($key)
160 160
     {
161
-        return $this->getServerVar('HTTP_' . $key);
161
+        return $this->getServerVar('HTTP_'.$key);
162 162
     }
163 163
 }
Please login to merge, or discard this patch.