Completed
Push — master ( 731a14...39886c )
by Patrick
05:14 queued 02:46
created
cron.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@
 block discarded – undo
14 14
 /**
15 15
  * This cron script recompiles the Browscap cache
16 16
  */
17
-ini_set('memory_limit','-1');      // turn off memory limit for this script
18
-set_time_limit(120);               // change to 2 minutes for this script
17
+ini_set('memory_limit', '-1'); // turn off memory limit for this script
18
+set_time_limit(120); // change to 2 minutes for this script
19 19
 
20 20
 require('vendor/autoload.php');
21 21
 
Please login to merge, or discard this patch.
Auth/LDAPCachableObject.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
      *
44 44
      * @param string $fieldName The name of the field to retrieve
45 45
      *
46
-     * @return mixed string the value of the field
46
+     * @return string string the value of the field
47 47
      */
48 48
     protected function getFieldSingleValue($fieldName)
49 49
     {
Please login to merge, or discard this patch.
Auth/User.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -311,7 +311,7 @@
 block discarded – undo
311 311
      *
312 312
      * @param stdClass $data The user's new data
313 313
      *
314
-     * @return boolean true if the user's data was changed, false otherwise
314
+     * @return boolean|null true if the user's data was changed, false otherwise
315 315
      */
316 316
     public function editUser($data)
317 317
     {
Please login to merge, or discard this patch.
AuthProvider.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -253,10 +253,10 @@
 block discarded – undo
253 253
      * Get an array of Auth\PendingUser from a filtered set
254 254
      *
255 255
      * @param Data\Filter|boolean $filter The filter conditions or false to retreive all
256
-     * @param array|boolean $select The user fields to obtain or false to obtain all
257
-     * @param integer|boolean $top The number of users to obtain or false to obtain all
258
-     * @param integer|boolean $skip The number of users to skip or false to skip none
259
-     * @param array|boolean $orderby The field to sort by and the method to sort or false to not sort
256
+     * @param boolean $select The user fields to obtain or false to obtain all
257
+     * @param boolean $top The number of users to obtain or false to obtain all
258
+     * @param boolean $skip The number of users to skip or false to skip none
259
+     * @param boolean $orderby The field to sort by and the method to sort or false to not sort
260 260
      * @param string|boolean $methodName The AuthMethod if information is desired only from a particular Auth\Authenticator
261 261
      *
262 262
      * @return array|boolean An array of Auth\PendingUser objects or false if no pending users were found
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
             {
79 79
                 if(isset($res['extended']) && isset($res['extended']['jpegphoto']))
80 80
                 {
81
-                    $res['extended']['jpegphoto']=true;
81
+                    $res['extended']['jpegphoto'] = true;
82 82
                 }
83 83
                 FlipSession::setVar('AuthMethod', get_class($this->methods[$i]));
84 84
                 FlipSession::setVar('AuthData', $res);
Please login to merge, or discard this patch.
Data/FilterClause.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@
 block discarded – undo
176 176
      * Convert the right hand side of the filter clause into an Mongo array
177 177
      *
178 178
      * @param string $op The standard operator
179
-     * @param string $var The second variable in the operator
179
+     * @param string $var2 The second variable in the operator
180 180
      *
181 181
      * @return array An array of mongo operations
182 182
      */
Please login to merge, or discard this patch.
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -140,9 +140,9 @@  discard block
 block discarded – undo
140 140
             $case = true;
141 141
         }
142 142
         if($case)
143
-	{
143
+    {
144 144
             if(class_exists('MongoRegex'))
145
-	    {
145
+        {
146 146
                 return array($field=>array('$regex'=>new \MongoRegex('/'.$this->var2.'/i')));
147 147
             }
148 148
             else
@@ -236,15 +236,15 @@  discard block
 block discarded – undo
236 236
         {
237 237
             case '=':
238 238
                 return array($this->var1=>$this->var2);
239
-	    case 'substringof':
240
-		if(class_exists('MongoRegex'))
241
-		{
242
-		    return array($this->var1=>array('$regex'=>new \MongoRegex('/'.$this->var2.'/i')));
243
-		}
244
-		else
245
-		{
239
+        case 'substringof':
240
+        if(class_exists('MongoRegex'))
241
+        {
242
+            return array($this->var1=>array('$regex'=>new \MongoRegex('/'.$this->var2.'/i')));
243
+        }
244
+        else
245
+        {
246 246
                     return array($this->var1=>array('$regex'=>new \MongoDB\BSON\Regex($this->var2, 'i')));
247
-		}
247
+        }
248 248
             case 'indexof':
249 249
                 return $this->getMongoIndexOfOperator();
250 250
             default:
@@ -254,15 +254,15 @@  discard block
 block discarded – undo
254 254
 
255 255
     public function php_compare($value)
256 256
     {
257
-	if(is_array($value))
258
-	{
257
+    if(is_array($value))
258
+    {
259 259
             return $this->php_compare($value[$this->var1]);
260
-	}
260
+    }
261 261
         switch($this->op)
262 262
         {
263 263
             case '!=':
264 264
                 return $value != $this->var2;
265
-	    case '=':
265
+        case '=':
266 266
                 return $value == $this->var2;
267 267
             case '<':
268 268
                 return $value < $this->var2;
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -140,9 +140,9 @@
 block discarded – undo
140 140
             $case = true;
141 141
         }
142 142
         if($case)
143
-	{
143
+        {
144 144
             if(class_exists('MongoRegex'))
145
-	    {
145
+            {
146 146
                 return array($field=>array('$regex'=>new \MongoRegex('/'.$this->var2.'/i')));
147 147
             }
148 148
             else
Please login to merge, or discard this patch.
Data/SQLDataSet.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
      * @param string $select The colums to read
151 151
      * @param boolean|string $count The number of rows to read
152 152
      * @param boolean|string $skip The number of rows to skip over
153
-     * @param boolean|array $sort The array to sort by or false to not sort
153
+     * @param boolean $sort The array to sort by or false to not sort
154 154
      *
155 155
      * @return false|array An array of all the returned records
156 156
      */
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -248,7 +248,7 @@
 block discarded – undo
248 248
         if($stmt === false)
249 249
         {
250 250
             if (php_sapi_name() !== "cli") {
251
-              error_log('DB query failed. '.print_r($this->pdo->errorInfo(), true));
251
+                error_log('DB query failed. '.print_r($this->pdo->errorInfo(), true));
252 252
             }
253 253
             return false;
254 254
         }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
         $stmt = $this->pdo->query($sql);
248 248
         if($stmt === false)
249 249
         {
250
-            if (php_sapi_name() !== "cli") {
250
+            if(php_sapi_name() !== "cli") {
251 251
               error_log('DB query failed. '.print_r($this->pdo->errorInfo(), true));
252 252
             }
253 253
             return false;
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
         $sql = "INSERT INTO $tablename ($cols) VALUES ($set);";
297 297
         if($this->pdo->exec($sql) === false)
298 298
         {
299
-            if (php_sapi_name() !== "cli") {
299
+            if(php_sapi_name() !== "cli") {
300 300
                 error_log('DB query failed. '.print_r($this->pdo->errorInfo(), true));
301 301
             }
302 302
             return false;
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -247,7 +247,8 @@  discard block
 block discarded – undo
247 247
         $stmt = $this->pdo->query($sql);
248 248
         if($stmt === false)
249 249
         {
250
-            if (php_sapi_name() !== "cli") {
250
+            if (php_sapi_name() !== "cli")
251
+            {
251 252
               error_log('DB query failed. '.print_r($this->pdo->errorInfo(), true));
252 253
             }
253 254
             return false;
@@ -296,7 +297,8 @@  discard block
 block discarded – undo
296 297
         $sql = "INSERT INTO $tablename ($cols) VALUES ($set);";
297 298
         if($this->pdo->exec($sql) === false)
298 299
         {
299
-            if (php_sapi_name() !== "cli") {
300
+            if (php_sapi_name() !== "cli")
301
+            {
300 302
                 error_log('DB query failed. '.print_r($this->pdo->errorInfo(), true));
301 303
             }
302 304
             return false;
Please login to merge, or discard this patch.
Email/DBEmail.php 2 patches
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -44,8 +44,16 @@
 block discarded – undo
44 44
         return parent::getSubject();
45 45
     }
46 46
 
47
+    /**
48
+     * @return string
49
+     */
47 50
     public abstract function getSubstituteVars();
48 51
 
52
+    /**
53
+     * @param boolean $html
54
+     *
55
+     * @return string
56
+     */
49 57
     protected function getRawBodyText($html)
50 58
     {
51 59
         if(isset($this->dbData['body']))
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     {
22 22
         if(isset($this->dbData['from']))
23 23
         {
24
-            return $this->dbData['from'];;
24
+            return $this->dbData['from']; ;
25 25
         }
26 26
         return parent::getFromAddress();
27 27
     }
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     {
31 31
         if(isset($this->dbData['replyTo']))
32 32
         {
33
-            return $this->dbData['replyTo'];;
33
+            return $this->dbData['replyTo']; ;
34 34
         }
35 35
         return parent::getReplyTo();
36 36
     }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         return $this->textBody;
60 60
     }
61 61
 
62
-    protected function getBodyFromDB($html=true)
62
+    protected function getBodyFromDB($html = true)
63 63
     {
64 64
         $vars = $this->getSubstituteVars();
65 65
         $rawText = $this->getRawBodyText($html);
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             $end = strpos($rawText, "</script>");
75 75
             if($index === 0)
76 76
             {
77
-                $rawText = substr($rawText, $end+9);
77
+                $rawText = substr($rawText, $end + 9);
78 78
             }
79 79
         }
80 80
         return strtr(strip_tags($rawText), $vars);
Please login to merge, or discard this patch.
FlipsideCAPTCHA.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -108,6 +108,9 @@  discard block
 block discarded – undo
108 108
         $this->wwwUrl = $settings->getGlobalSetting('www_url', 'https://www.burningflipside.com');
109 109
     }
110 110
 
111
+    /**
112
+     * @param string $fieldName
113
+     */
111 114
     protected function getCaptchField($fieldName)
112 115
     {
113 116
         $dataset = DataSetFactory::getDataSetByName('profiles');
@@ -130,6 +133,9 @@  discard block
 block discarded – undo
130 133
         return $this->getCaptchField('hint');
131 134
     }
132 135
 
136
+    /**
137
+     * @return string
138
+     */
133 139
     private function get_answer()
134 140
     {
135 141
         return $this->getCaptchField('answer');
Please login to merge, or discard this patch.
Http/FlipAdminPage.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -11,6 +11,9 @@
 block discarded – undo
11 11
         $this->setTemplateName('admin.html');
12 12
     }
13 13
 
14
+    /**
15
+     * @param string $adminGroup
16
+     */
14 17
     protected function userIsAdmin($adminGroup)
15 18
     {
16 19
         if($this->user === false || $this->user === null)
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $this->addLink('Home', '..');
50 50
         if($this->user === false || $this->user === null)
51 51
         {
52
-          $this->content['body'] = '
52
+            $this->content['body'] = '
53 53
             <div id="content">
54 54
               <div class="row">
55 55
                 <div class="col-lg-12">
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         }
62 62
         else if($this->isAdmin() === false)
63 63
         {
64
-          $this->content['body'] = '
64
+            $this->content['body'] = '
65 65
             <div id="content">
66 66
               <div class="row">
67 67
                 <div class="col-lg-12">
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
               </div>
71 71
             </div>
72 72
           ';
73
-          $this->content['header'] = array();
74
-          $this->content['cards'] = array();
73
+            $this->content['header'] = array();
74
+            $this->content['cards'] = array();
75 75
         }
76 76
         return parent::getContent();
77 77
     }
Please login to merge, or discard this patch.