Passed
Pull Request — master (#1882)
by
unknown
05:02
created
classes/SectionView/SpwransView.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         $this_page = 'spwransfront';
22 22
         $data = [];
23 23
 
24
-        $args = [ 'months' => 1 ];
24
+        $args = ['months' => 1];
25 25
         $WRANSLIST = new \SPWRANSLIST();
26 26
 
27 27
         $wrans = [];
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
     protected function getSearchSections() {
45 45
         return [
46
-            [ 'section' => 'spwrans' ],
46
+            ['section' => 'spwrans'],
47 47
         ];
48 48
     }
49 49
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     }
77 77
 
78 78
     protected function get_question_mentions_html($row_data) {
79
-        if(count($row_data) == 0) {
79
+        if (count($row_data) == 0) {
80 80
             return '';
81 81
         }
82 82
         $result = '';
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         // Keep the references until after the history that's in a timeline:
86 86
         $references = [];
87 87
         foreach ($row_data as $row) {
88
-            if(! $row["date"]) {
88
+            if (!$row["date"]) {
89 89
                 // If this mention isn't associated with a date, the difference won't be interesting.
90 90
                 $last_date = null;
91 91
             }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                 $daysdiff = (int) ((strtotime($row["date"]) - strtotime($last_date)) / 86400);
96 96
                 $daysstring = ($daysdiff == 1) ? "day" : "days";
97 97
                 $further = "";
98
-                if($first_difference_output) {
98
+                if ($first_difference_output) {
99 99
                     $first_difference_output = false;
100 100
                 } else {
101 101
                     $further = " a further";
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                     $inner = "Mentioned in <a class=\"debate-speech__meta__link\" href=\"$url\">tabled written questions on $date</a>";
121 121
                     break;
122 122
                 case 4:
123
-                    if(preg_match('/^uk.org.publicwhip\/spq\/(.*)$/', $row['gid'], $m)) {
123
+                    if (preg_match('/^uk.org.publicwhip\/spq\/(.*)$/', $row['gid'], $m)) {
124 124
                         $URL = new \MySociety\TheyWorkForYou\Url("spwrans");
125 125
                         $URL->insert(['spid' => $m[1]]);
126 126
                         $relative_url = $URL->generate("none");
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
                     $inner = "Given a holding answer on $date";
132 132
                     break;
133 133
                 case 6:
134
-                    if(preg_match('/^uk.org.publicwhip\/spor\/(.*)$/', $row['mentioned_gid'], $m)) {
134
+                    if (preg_match('/^uk.org.publicwhip\/spor\/(.*)$/', $row['mentioned_gid'], $m)) {
135 135
                         $URL = new \MySociety\TheyWorkForYou\Url("spdebates");
136 136
                         $URL->insert(['id' => $m[1]]);
137 137
                         $relative_url = $URL->generate("none");
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                     }
140 140
                     break;
141 141
                 case 7:
142
-                    if(preg_match('/^uk.org.publicwhip\/spq\/(.*)$/', $row['mentioned_gid'], $m)) {
142
+                    if (preg_match('/^uk.org.publicwhip\/spq\/(.*)$/', $row['mentioned_gid'], $m)) {
143 143
                         $referencing_spid = $m[1];
144 144
                         $URL = new \MySociety\TheyWorkForYou\Url("spwrans");
145 145
                         $URL->insert(['spid' => $referencing_spid]);
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                     }
150 150
                     break;
151 151
             }
152
-            if($reference) {
152
+            if ($reference) {
153 153
                 $references[] = "\n<li>$inner.";
154 154
             } else {
155 155
                 $result .= "\n<li class=\"link-to-hansard\">$description$inner</span>";
Please login to merge, or discard this patch.
classes/SectionView/PbcView.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         } elseif ($bill_id) {
51 51
             # Display the page for a particular bill
52 52
             $this_page = 'pbc_bill';
53
-            $args =  [
53
+            $args = [
54 54
                 'id' => $bill_id,
55 55
                 'title' => $this->bill,
56 56
                 'session' => $this->session,
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             # Display the bills for a particular session
70 70
             $this_page = 'pbc_session';
71 71
             $DATA->set_page_metadata($this_page, 'title', "Session $this->session");
72
-            $args =  [
72
+            $args = [
73 73
                 'session' => $this->session,
74 74
             ];
75 75
             $data = [];
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
 
92 92
     protected function getSearchSections() {
93 93
         return [
94
-            [ 'section' => 'pbc' ],
94
+            ['section' => 'pbc'],
95 95
         ];
96 96
     }
97 97
 
98 98
     protected function front_content() {
99
-        return $this->list->display('recent_pbc_debates', [ 'num' => 50 ], 'none');
99
+        return $this->list->display('recent_pbc_debates', ['num' => 50], 'none');
100 100
     }
101 101
 
102 102
     protected function display_front() {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
         } elseif ($this->session) {
69 69
             # Display the bills for a particular session
70 70
             $this_page = 'pbc_session';
71
-            $DATA->set_page_metadata($this_page, 'title', "Session $this->session");
71
+            $DATA->set_page_metadata($this_page, 'title', "session $this->session");
72 72
             $args =  [
73 73
                 'session' => $this->session,
74 74
             ];
Please login to merge, or discard this patch.
classes/SectionView/LondonView.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
     protected function getSearchSections() {
22 22
         return [
23
-            [ 'section' => 'lmqs', 'title' => 'Mayoral Questions' ],
23
+            ['section' => 'lmqs', 'title' => 'Mayoral Questions'],
24 24
         ];
25 25
     }
26 26
 }
Please login to merge, or discard this patch.
classes/SectionView/SeneddView.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
     protected function getSearchSections() {
42 42
         return [
43
-            [ 'section' => 'wales' ],
43
+            ['section' => 'wales'],
44 44
         ];
45 45
     }
46 46
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
         $debates = $DEBATELIST->display('recent_debates', ['days' => 30, 'num' => 6], 'none');
63 63
         $MOREURL = new \MySociety\TheyWorkForYou\Url('senedddebatesfront');
64
-        $MOREURL->insert([ 'more' => 1 ]);
64
+        $MOREURL->insert(['more' => 1]);
65 65
 
66 66
         // this makes sure that we don't repeat this debate in the list below
67 67
         $random_debate = null;
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         }
96 96
 
97 97
         $data['featured'] = $featured;
98
-        $data['debates'] = [ 'recent' => $recent];
98
+        $data['debates'] = ['recent' => $recent];
99 99
 
100 100
         $data['regional'] = $this->getMSList();
101 101
         $data['search_box'] = $this->getSearchBox($data);
Please login to merge, or discard this patch.
scripts/alertmpchanged.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@
 block discarded – undo
154 154
     global $globalsuccess, $sentemails, $nomail, $start_time;
155 155
 
156 156
     $sentemails++;
157
-    mlog("SEND $sentemails : Sending email to $current[email] ... ");
157
+    mlog("send $sentemails : Sending email to $current[email] ... ");
158 158
     $d = ['to' => $current['email'], 'template' => $template];
159 159
     $m = [
160 160
         'DATA' => join("\n", $data),
Please login to merge, or discard this patch.
www/docs/email/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,13 +55,13 @@
 block discarded – undo
55 55
     } elseif ($MEMBER->house_disp == 3) {
56 56
         $rep_name .= ' MLA';
57 57
     }
58
-    $data =  [
58
+    $data = [
59 59
         'template'      => 'email_a_friend',
60 60
         'to'            => $recipient_email,
61 61
         'subject'       => 'Find out all about ' . $rep_name,
62 62
     ];
63 63
     $url = $MEMBER->url(true);
64
-    $merge =  [
64
+    $merge = [
65 65
         'NAME' => $sender_name,
66 66
         'EMAIL' => $sender_email,
67 67
         'REP_NAME' => $rep_name,
Please login to merge, or discard this patch.
www/docs/vote/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
     $PAGE->page_start();
69 69
 
70
-    $message =  [
70
+    $message = [
71 71
         'title'	=> 'Sorry',
72 72
         'text'	=> $text,
73 73
     ];
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 
190 190
 $PAGE->page_start();
191 191
 
192
-$message =  [
192
+$message = [
193 193
     'title'	=> "Thanks for your vote",
194 194
     'text'	=> "<strong>Would you like to ask a question like this yourself?</strong> Use our <a href=\"https://www.whatdotheyknow.com\">Freedom of Information site</a>.",
195 195
 ];
Please login to merge, or discard this patch.
www/docs/admin/badusers.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
     $USERURL->insert(['u' => $user_id]);
59 59
 
60
-    $rows[] =  [
60
+    $rows[] = [
61 61
         '<a href="' . $USERURL->generate() . '">' . $row['firstname'] . ' ' . $row['lastname'] . '</a>',
62 62
         $totalcomments,
63 63
         $row['deletedcount'],
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     ];
67 67
 }
68 68
 
69
-$tabledata =  [
69
+$tabledata = [
70 70
     'header' =>  [
71 71
         'Name',
72 72
         'Total comments',
@@ -114,14 +114,14 @@  discard block
 block discarded – undo
114 114
                     WHERE	user_id = '$user_id'
115 115
                     AND		upheld = '1'")->first();
116 116
 
117
-    $rows[] =  [
117
+    $rows[] = [
118 118
         '<a href="' . $USERURL->generate() . '">' . $row['firstname'] . ' ' . $row['lastname'] . '</a>',
119 119
         $row['rejectedcount'],
120 120
         $r['upheldcount'],
121 121
     ];
122 122
 
123 123
 }
124
-$tabledata =  [
124
+$tabledata = [
125 125
     'header' =>  [
126 126
         'Name',
127 127
         'Reports not upheld',
Please login to merge, or discard this patch.
www/docs/admin/searchlogs.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     $host = trim_characters($host, strlen($host) - 25, 100);
19 19
     $time = relative_time($row['query_time']);
20 20
     $time = str_replace(" ago", "", $time);
21
-    $rows[] =  [
21
+    $rows[] = [
22 22
         '<a href="' . $row['url'] . '">' . _htmlentities($row['query']) . '</a>',
23 23
         $row['page_number'],
24 24
         $row['count_hits'],
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     ];
28 28
 }
29 29
 
30
-$tabledata =  [
30
+$tabledata = [
31 31
     'header' =>  [
32 32
         'Query',
33 33
         'Page',
Please login to merge, or discard this patch.