Test Failed
Push — hotfix/fix-counts ( 9a2e54...d16e24 )
by Paul
03:31
created
activate.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,8 @@
 block discarded – undo
120 120
                 sprintf($messages[1], $messages[3].' '.$this->versions['php']),
121 121
                 sprintf($messages[2], PHP_VERSION).'</p><p>'.$rollbackMessage
122 122
             );
123
-        } elseif (!$this->isWpValid()) {
123
+        }
124
+        elseif (!$this->isWpValid()) {
124 125
             printf($noticeTemplate,
125 126
                 sprintf($messages[0], $pluginName),
126 127
                 sprintf($messages[1], $messages[4].' '.$this->versions['wordpress']),
Please login to merge, or discard this patch.
plugin/Database/SqlQueries.php 1 patch
Braces   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 	 * @return int|false
21 21
 	 */
22 22
     public function deleteAllSessions($sessionCookiePrefix)
23
-	{
23
+    {
24 24
 		return $this->db->query("
25 25
 			DELETE
26 26
 			FROM {$this->db->options}
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	 * @return int|false
34 34
 	 */
35 35
     public function deleteExpiredSessions($expiredSessions)
36
-	{
36
+    {
37 37
 		return $this->db->query("
38 38
 			DELETE
39 39
 			FROM {$this->db->options}
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 * @return array
48 48
 	 */
49 49
     public function getExpiredSessions($sessionCookiePrefix, $limit)
50
-	{
50
+    {
51 51
 		return (array) $this->db->get_results("
52 52
 			SELECT option_name AS name, option_value AS expiration
53 53
 			FROM {$this->db->options}
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	 * @return int
63 63
 	 */
64 64
     public function getPostIdFromReviewId($metaReviewId)
65
-	{
65
+    {
66 66
 		$postId = $this->db->get_var("
67 67
 			SELECT p.ID
68 68
 			FROM {$this->db->posts} AS p
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	 * @return array
81 81
 	 */
82 82
     public function getReviewCounts(array $args, $lastPostId = 0, $limit = 500)
83
-	{
83
+    {
84 84
 		return (array) $this->db->get_results("
85 85
 			SELECT DISTINCT p.ID, m1.meta_value AS rating, m2.meta_value AS type
86 86
 			FROM {$this->db->posts} AS p
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	 * @return array
105 105
 	 */
106 106
     public function getReviewCountsFor($metaKey)
107
-	{
107
+    {
108 108
 		return (array) $this->db->get_results("
109 109
 			SELECT DISTINCT m.meta_value AS name, COUNT(*) num_posts
110 110
 			FROM {$this->db->posts} AS p
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 * @return array
122 122
 	 */
123 123
     public function getReviewIdsByType($reviewType)
124
-	{
124
+    {
125 125
 		$results = $this->db->get_col("
126 126
 			SELECT DISTINCT m1.meta_value AS review_id
127 127
 			FROM {$this->db->posts} AS p
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 	 * @return array
142 142
 	 */
143 143
     public function getReviewRatingsFromIds(array $postIds, $greaterThanId = 0, $limit = 100)
144
-	{
144
+    {
145 145
         sort($postIds);
146 146
         $postIds = array_slice($postIds, intval(array_search($greaterThanId, $postIds)), $limit);
147 147
         $postIds = implode(',', $postIds);
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 	 * @return array
167 167
 	 */
168 168
     public function getReviewsMeta($key, $status = 'publish')
169
-	{
169
+    {
170 170
 		$values = $this->db->get_col("
171 171
 			SELECT DISTINCT m.meta_value
172 172
 			FROM {$this->db->postmeta} m
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	 * @return string
188 188
 	 */
189 189
     protected function getAndForCounts(array $args, $and = '')
190
-	{
190
+    {
191 191
         $postIds = implode(',', array_filter(glsr_get($args, 'post_ids')));
192 192
         $termIds = implode(',', array_filter(glsr_get($args, 'term_ids')));
193 193
         if (!empty($args['type'])) {
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 	 * @return string
208 208
 	 */
209 209
     protected function getInnerJoinForCounts(array $args, $innerJoin = '')
210
-	{
210
+    {
211 211
         if (!empty(glsr_get($args, 'post_ids'))) {
212 212
             $innerJoin.= "INNER JOIN {$this->db->postmeta} AS m3 ON p.ID = m3.post_id ";
213 213
 		}
Please login to merge, or discard this patch.
helpers.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,8 @@
 block discarded – undo
100 100
     if (1 == count($vars)) {
101 101
         $value = htmlspecialchars(print_r($vars[0], true), ENT_QUOTES, 'UTF-8');
102 102
         printf('<div class="glsr-debug"><pre>%s</pre></div>', $value);
103
-    } else {
103
+    }
104
+    else {
104 105
         echo '<div class="glsr-debug-group">';
105 106
         foreach ($vars as $var) {
106 107
             glsr_debug($var);
Please login to merge, or discard this patch.