Completed
Push — 4.0 ( 61462a...866ac0 )
by Marco
15:42
created
src/Components/Configuration.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         'dispatcher-log-level' => 'INFO',
35 35
         'dispatcher-log-target' => '%dispatcher-log-folder%/dispatcher.log',
36 36
         'dispatcher-log-folder' => '/log',
37
-        'dispatcher-supported-methods' => array('GET','PUT','POST','DELETE','OPTIONS','HEAD'),
37
+        'dispatcher-supported-methods' => array('GET', 'PUT', 'POST', 'DELETE', 'OPTIONS', 'HEAD'),
38 38
         'dispatcher-default-encoding' => 'UTF-8',
39 39
         'dispatcher-cache-enabled' => true,
40 40
         'dispatcher-cache-ttl' => 3600,
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         //'dispatcher-autoroute' => false
45 45
     );
46 46
 
47
-    public function __construct( $configuration = array() ) {
47
+    public function __construct($configuration = array()) {
48 48
 
49 49
         $this->attributes['dispatcher-base-url'] = self::urlGetAbsolute();
50 50
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
     final public function get($property = null) {
58 58
 
59
-        if ( is_null($property) ) {
59
+        if (is_null($property)) {
60 60
             
61 61
             return $this->attributes;
62 62
             
@@ -64,15 +64,15 @@  discard block
 block discarded – undo
64 64
 
65 65
             $value = $this->attributes[$property];
66 66
 
67
-            if ( is_scalar($value) && preg_match_all('/%(.+?)%/', $value, $matches) ) {
67
+            if (is_scalar($value) && preg_match_all('/%(.+?)%/', $value, $matches)) {
68 68
 
69 69
                 $substitutions = array();
70 70
 
71
-                foreach ( $matches as $match ) {
71
+                foreach ($matches as $match) {
72 72
 
73 73
                     $backreference = $match[1];
74 74
 
75
-                    if ( $backreference != $property && !isset($substitutions['/%'.$backreference.'%/']) ) {
75
+                    if ($backreference != $property && !isset($substitutions['/%'.$backreference.'%/'])) {
76 76
 
77 77
                         $substitutions['/%'.$backreference.'%/'] = $this->$backreference;
78 78
 
@@ -118,11 +118,11 @@  discard block
 block discarded – undo
118 118
 
119 119
     private static function urlGetAbsolute() {
120 120
 
121
-        $http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 's' : '') . '://';
121
+        $http = 'http'.((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 's' : '').'://';
122 122
 
123 123
         $uri = preg_replace("/\/index.php(.*?)$/i", "", $_SERVER['PHP_SELF']);
124 124
 
125
-        return ( $http . $_SERVER['HTTP_HOST'] . $uri . "/" );
125
+        return ($http.$_SERVER['HTTP_HOST'].$uri."/");
126 126
 
127 127
     }
128 128
 
Please login to merge, or discard this patch.