Completed
Push — master ( dd974c...761f2c )
by Tolan
06:00
created
lib/Response.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,16 +40,16 @@
 block discarded – undo
40 40
      * @param string $content
41 41
      * @param int|null $responseCode
42 42
      */
43
-    public function __construct( $type, $content, $responseCode = null )
43
+    public function __construct($type, $content, $responseCode = null)
44 44
     {
45 45
         $this->type = $type;
46 46
         $this->content = $content;
47 47
         
48 48
         // Response code defaults
49 49
         if (null === $responseCode) {
50
-            if( $type == "redirect" ){
50
+            if ($type == "redirect") {
51 51
                 $responseCode = 302;
52
-            }else{
52
+            }else {
53 53
                 $responseCode = 200;
54 54
             }
55 55
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
         if (null === $responseCode) {
50 50
             if( $type == "redirect" ){
51 51
                 $responseCode = 302;
52
-            }else{
52
+            } else{
53 53
                 $responseCode = 200;
54 54
             }
55 55
         }
Please login to merge, or discard this patch.
lib/ExecHelper.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      */
19 19
     protected $component;
20 20
 
21
-    public function setComponent( AbstractViewComponent $component )
21
+    public function setComponent(AbstractViewComponent $component)
22 22
     {
23 23
         $this->component = $component;
24 24
     }
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
      * @param bool $onlyComponentOutput
31 31
      * @return string A URL or URI
32 32
      */
33
-    public function url( $execMethod, $args = [ ], $onlyComponentOutput = false ) // $onlyComponentOutput Not used in this implementation but necessary for subclasses
33
+    public function url($execMethod, $args = [ ], $onlyComponentOutput = false) // $onlyComponentOutput Not used in this implementation but necessary for subclasses
34 34
     {
35 35
         // $onlyComponentOutput is not used in this implementation but may be by sub-classes
36
-        $args[ 'exec' ] = $this->component->getExecPath( $execMethod );
37
-        $qs = http_build_query( $args );
36
+        $args[ 'exec' ] = $this->component->getExecPath($execMethod);
37
+        $qs = http_build_query($args);
38 38
         return "?{$qs}";
39 39
     }
40 40
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         }
69 69
         return <<<EOS
70 70
 <form method="{$method}" action=""{$formID}{$onSubmit} enctype="{$encType}">
71
-    <input type="hidden" name="exec" value="{$this->component->getExecPath( $execMethod )}">
71
+    <input type="hidden" name="exec" value="{$this->component->getExecPath($execMethod)}">
72 72
     {$formBody}
73 73
 </form>
74 74
 EOS;
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     public function callStatic($class, $function, $args = array())
85 85
     {
86 86
         if (class_exists($class) && method_exists($class, $function)) {
87
-            return call_user_func_array( array( $class, $function ), $args );
87
+            return call_user_func_array(array($class, $function), $args);
88 88
         }
89 89
         return null;
90 90
     }
@@ -98,14 +98,14 @@  discard block
 block discarded – undo
98 98
      * @param array $anchorAttrs
99 99
      * @return string
100 100
      */
101
-    public function replaceElementUsingLink( $execMethod, $args = [ ], $targetDiv, $linkText, $anchorAttrs = [ ] )
101
+    public function replaceElementUsingLink($execMethod, $args = [ ], $targetDiv, $linkText, $anchorAttrs = [ ])
102 102
     {
103
-        $url = $this->url( $execMethod, $args, true );
103
+        $url = $this->url($execMethod, $args, true);
104 104
         $attrs = [ ];
105 105
         foreach ($anchorAttrs as $k => $v) {
106 106
             $attrs[ ] = "{$k}='{$v}'";
107 107
         }
108
-        $attrsStr = implode( ' ', $attrs );
108
+        $attrsStr = implode(' ', $attrs);
109 109
         return <<<EOS
110 110
         <script type="application/javascript">
111 111
             if( typeof(execLink) != "function" ){
@@ -138,11 +138,11 @@  discard block
 block discarded – undo
138 138
      * @param string $encType
139 139
      * @return string
140 140
      */
141
-    public function replaceElementUsingForm( $execMethod, $method, $formBody, $targetDiv, $formID, $encType = 'application/x-www-form-urlencoded' )
141
+    public function replaceElementUsingForm($execMethod, $method, $formBody, $targetDiv, $formID, $encType = 'application/x-www-form-urlencoded')
142 142
     {
143 143
         return <<<EOS
144
-        {$this->wrapForm( $execMethod, $method, $formBody, true, $formID,
145
-            "execForm( this, \"{$targetDiv}\" ); return false;", $encType )}
144
+        {$this->wrapForm($execMethod, $method, $formBody, true, $formID,
145
+            "execForm( this, \"{$targetDiv}\" ); return false;", $encType)}
146 146
         <script type="application/javascript">
147 147
         if( typeof(execForm) != "function" ){
148 148
             var execForm = function( form, targetDiv ){
Please login to merge, or discard this patch.