Passed
Branch master (f83f0c)
by Andreas
17:25
created
lib/org/openpsa/documents/directory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         $ownerwg = $this->get_parameter('org.openpsa.core', 'orgOpenpsaOwnerWg');
21 21
         $accesstype = $this->get_parameter('org.openpsa.core', 'orgOpenpsaAccesstype');
22 22
 
23
-        if (   $ownerwg
23
+        if ($ownerwg
24 24
             && $accesstype) {
25 25
             // Sync the object's ACL properties into MidCOM ACL system
26 26
             $sync = new org_openpsa_core_acl_synchronizer();
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     private function _update_parent_timestamp()
42 42
     {
43 43
         $parent = $this->get_parent();
44
-        if (   $parent
44
+        if ($parent
45 45
             && $parent->component == 'org.openpsa.documents') {
46 46
             midcom::get()->auth->request_sudo('org.openpsa.documents');
47 47
 
Please login to merge, or discard this patch.
lib/org/openpsa/httplib/main.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
         $request->addHeader('User-Agent: Midgard/' . substr(mgd_version(), 0, 4));
116 116
 
117 117
         // Handle basic auth
118
-        if (   !empty($username)
118
+        if (!empty($username)
119 119
             && !empty($password)) {
120 120
             // Set basic auth
121 121
             $request->addHeader('Authorization: Basic ' . base64_encode($username . ':' . $password));
Please login to merge, or discard this patch.
lib/org/openpsa/httplib/exec/test_post.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 
18 18
 } else {
19 19
     $client = new org_openpsa_httplib();
20
-    if (   !empty($_REQUEST['username'])
20
+    if (!empty($_REQUEST['username'])
21 21
         && !empty($_REQUEST['password'])) {
22 22
         $client->basicauth['user'] = $_REQUEST['username'];
23 23
         $client->basicauth['password'] = $_REQUEST['password'];
Please login to merge, or discard this patch.
lib/org/openpsa/mail/backend.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
             return false;
80 80
         }
81 81
 
82
-        if (   is_string($this->error)
82
+        if (is_string($this->error)
83 83
             && !empty($this->error)) {
84 84
             return $this->error;
85 85
         }
Please login to merge, or discard this patch.
lib/org/openpsa/mail/exec/test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 midcom::get()->auth->require_admin_user();
3 3
 
4
-if (   empty($_POST['to'])
4
+if (empty($_POST['to'])
5 5
     || empty($_POST['from'])) {
6 6
     ?>
7 7
     <h2>Send test email</h2>
Please login to merge, or discard this patch.
lib/org/openpsa/mail/template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
         foreach ($this->_parameters as $key => $value) {
112 112
             $this->_patterns[] = "/__({$key})__/";
113 113
 
114
-            if (   is_array($value)
114
+            if (is_array($value)
115 115
                 || is_object($value)) {
116 116
                 $this->_patterns[] = "/__({$key})_([^ \.>\"-]*?)__/";
117 117
             }
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/handler/goto.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
             return $this->fail($this->_l10n->get('no invoice number was handed over'));
25 25
         }
26 26
 
27
-        $invoicenumber = (int) $_GET['query'] ;
27
+        $invoicenumber = (int) $_GET['query'];
28 28
 
29 29
         if ($invoice = org_openpsa_invoices_invoice_dba::get_by_number($invoicenumber)) {
30 30
             return new midcom_response_relocate('invoice/' . $invoice->guid . '/');
Please login to merge, or discard this patch.
lib/org/openpsa/contacts/handler/duplicates/person.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
     private function load_next()
45 45
     {
46
-        $i =& $this->_request_data['loop_i'];
46
+        $i = & $this->_request_data['loop_i'];
47 47
         while ($i < 100) {
48 48
             debug_add("Loop iteration {$i}");
49 49
             $qb = new midgard_query_builder('midgard_parameter');
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                 continue;
72 72
             }
73 73
             // Make sure we actually have enough rights to do this
74
-            if (   !$person1->can_do('midgard:update')
74
+            if (!$person1->can_do('midgard:update')
75 75
                 || !$person1->can_do('midgard:delete')
76 76
                 || !$person2->can_do('midgard:update')
77 77
                 || !$person2->can_do('midgard:delete')) {
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
                 continue;
81 81
             }
82 82
             // Extra sanity check (in case of semi-successful not-duplicate mark)
83
-            if (   $person1->get_parameter('org.openpsa.contacts.duplicates:not_duplicate', $person2->guid)
83
+            if ($person1->get_parameter('org.openpsa.contacts.duplicates:not_duplicate', $person2->guid)
84 84
                 || $person2->get_parameter('org.openpsa.contacts.duplicates:not_duplicate', $person1->guid)) {
85 85
                 debug_add("It seems these two (#{$person1->id} and #{$person2->id}) have also marked as not duplicates, some cleanup might be a good thing", MIDCOM_LOG_WARN);
86 86
                 $i++;
87 87
                 continue;
88 88
             }
89 89
 
90
-            $this->_request_data['probability'] = (float)$param->value;
90
+            $this->_request_data['probability'] = (float) $param->value;
91 91
             $this->_request_data['person1'] = $person1;
92 92
             $this->_request_data['person2'] = $person2;
93 93
             break;
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
     private function process_submit()
98 98
     {
99
-        if (   !empty($_POST['org_openpsa_contacts_handler_duplicates_person_keep'])
99
+        if (!empty($_POST['org_openpsa_contacts_handler_duplicates_person_keep'])
100 100
             && !empty($_POST['org_openpsa_contacts_handler_duplicates_person_options'])
101 101
             && count($_POST['org_openpsa_contacts_handler_duplicates_person_options']) == 2) {
102 102
             $option1 = new org_openpsa_contacts_person_dba($_POST['org_openpsa_contacts_handler_duplicates_person_options'][1]);
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
             if ($keep == 'both') {
106 106
                 $option1->require_do('midgard:update');
107 107
                 $option2->require_do('midgard:update');
108
-                if (   $option1->set_parameter('org.openpsa.contacts.duplicates:not_duplicate', $option2->guid, time())
108
+                if ($option1->set_parameter('org.openpsa.contacts.duplicates:not_duplicate', $option2->guid, time())
109 109
                     && $option2->set_parameter('org.openpsa.contacts.duplicates:not_duplicate', $option1->guid, time())) {
110 110
                     // Clear the possible duplicate parameters
111 111
                     $option1->delete_parameter('org.openpsa.contacts.duplicates:possible_duplicate', $option2->guid);
@@ -123,11 +123,11 @@  discard block
 block discarded – undo
123 123
                 }
124 124
             } else {
125 125
                 if ($keep == $option1->guid) {
126
-                    $person1 =& $option1;
127
-                    $person2 =& $option2;
126
+                    $person1 = & $option1;
127
+                    $person2 = & $option2;
128 128
                 } elseif ($keep == $option2->guid) {
129
-                    $person1 =& $option2;
130
-                    $person2 =& $option1;
129
+                    $person1 = & $option2;
130
+                    $person2 = & $option1;
131 131
                 } else {
132 132
                     throw new midcom_error('Something weird happened (basically we got bogus data)');
133 133
                 }
Please login to merge, or discard this patch.
lib/org/openpsa/contacts/handler/group/action.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
         $response = new midcom_response_json;
24 24
         $response->status = false;
25 25
 
26
-        if (   !empty($_POST['guid'])
26
+        if (!empty($_POST['guid'])
27 27
             && array_key_exists('title', $_POST)) {
28 28
             try {
29 29
                 $member = new midcom_db_member($_POST['guid']);
Please login to merge, or discard this patch.