Passed
Push — master ( a7425d...dd80fa )
by Tomasz
03:35
created
tests/unit/web/lib/admin/storage/SessionStorageTest.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 use web\lib\admin\storage\SessionStorage;
3 3
 
4
-if ( !isset( $_SESSION ) ) $_SESSION = array();
4
+if ( !isset( $_SESSION ) ) {
5
+    $_SESSION = array();
6
+}
5 7
 
6 8
 class SessionStorageTest extends PHPUnit_Framework_TestCase{
7 9
     protected $backupGlobalsBlacklist = array( '_SESSION' );
Please login to merge, or discard this patch.
web/lib/admin/http/AddUserCommand.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
             if(!empty($user->getIdentifier())){
14 14
                 $this->storeInfoMessage(_('User was added successfully!'));
15 15
             }
16
-        }else{
16
+        } else{
17 17
             $this->storeErrorMessage(_('User name or expiry parameters are missing!'));
18 18
         }
19 19
     }
Please login to merge, or discard this patch.
web/lib/admin/domain/PersistentEntity.php 1 patch
Braces   +12 added lines, -5 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         if(count($this->row) > 0){
152 152
             if(isset($this->row[self::ID])){
153 153
                 $result = $this->executeUpdateQuery();
154
-            }else{
154
+            } else{
155 155
                 $result = $this->executeInsertQuery();
156 156
             }
157 157
         }
@@ -170,8 +170,12 @@  discard block
 block discarded – undo
170 170
         $types = '';
171 171
         $arguments = array();
172 172
         foreach ($this->row as $key => $attribute) {
173
-            if($keyString != "(") $keyString .= " ,";
174
-            if($valueString != "(") $valueString .= " ,";
173
+            if($keyString != "(") {
174
+                $keyString .= " ,";
175
+            }
176
+            if($valueString != "(") {
177
+                $valueString .= " ,";
178
+            }
175 179
             $keyString .= "`" . $key . "`";
176 180
             $valueString .= "?";
177 181
             $types .= $attribute->getType();
@@ -200,8 +204,11 @@  discard block
 block discarded – undo
200 204
         $types = '';
201 205
         $arguments = array();
202 206
         foreach ($this->row as $key => $attribute) {
203
-            if(!empty($updateString)) $updateString .= " ,";
204
-            else $updateString .=" SET ";
207
+            if(!empty($updateString)) {
208
+                $updateString .= " ,";
209
+            } else {
210
+                $updateString .=" SET ";
211
+            }
205 212
             $updateString .= "`" . $key . "`=?";
206 213
             $types .= $attribute->getType();
207 214
             $arguments [] = $attribute->value;
Please login to merge, or discard this patch.
web/lib/admin/utils/CSVParser.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
             $row = str_getcsv($this->rows[$this->index], $this->tokenDelimiter);
109 109
             $this->index++;
110 110
             return $row;
111
-        }else{
111
+        } else{
112 112
             return array();
113 113
         }
114 114
     }
Please login to merge, or discard this patch.
web/lib/admin/storage/SessionStorage.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
                 $_SESSION[self::INDEX][self::SCOPED][$package] = array();
56 56
             }
57 57
             $this->session = &$_SESSION[self::INDEX][self::SCOPED][$package];
58
-        }else{
58
+        } else{
59 59
             $this->session = &$_SESSION[self::INDEX][self::WIDE];
60 60
         }
61 61
         $this->package = $package;
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
                 self::$instance = new self($package);
74 74
             }
75 75
             return self::$instance;
76
-        }else{
76
+        } else{
77 77
             if(!isset(self::$pool[$package])){
78 78
                 self::$pool[$package] = new self($package);
79 79
             } 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     public function get($identifier){
113 113
         if(isset($this->session[$identifier])){
114 114
             return $this->session[$identifier];
115
-        }else{
115
+        } else{
116 116
             return array();
117 117
         }
118 118
     }
Please login to merge, or discard this patch.
web/lib/admin/view/html/Row.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
                 
107 107
             }
108 108
             return $innerString;
109
-        }else{
109
+        } else{
110 110
             return parent::composeInnerString();
111 111
         }
112 112
     }
Please login to merge, or discard this patch.
web/lib/admin/view/html/UnaryTag.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
         }
66 66
         if(isset($this->name)){
67 67
             return $this->composeTagString($attributeString);
68
-        }else{
68
+        } else{
69 69
             return "";
70 70
         }
71 71
     }
Please login to merge, or discard this patch.
web/lib/admin/view/YesNoDialogBox.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
             <button type="submit" name="<?php echo $this->controls[self::YES]['name']; ?>" value="<?php echo $this->controls[self::YES]['value']; ?>"><?php echo _('Yes'); ?></button>
41 41
         <?php if($this->controls[self::NO]['name'] == ''){ ?>
42 42
             <button class="<?php echo $this->id . '-close'; ?>" type="reset"><?php echo _('No'); ?></button>
43
-        <?php }else{ ?>
43
+        <?php } else{ ?>
44 44
             <button type="submit" name="<?php echo $this->controls[self::NO]['name']; ?>" value="<?php echo $this->controls[self::NO]['value']; ?>"><?php echo _('No'); ?></button>
45 45
         <?php }
46 46
     }
Please login to merge, or discard this patch.
tests/unit/web/lib/admin/view/InstitutionPageBuilderTest.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     private function valid_IdP($input, $owner){
17 17
         if ($input == 1){
18 18
             return new MockInstitution();
19
-        }else{
19
+        } else{
20 20
             throw new Exception('IdP '.$input.' not found in database!');
21 21
         }
22 22
     }
Please login to merge, or discard this patch.