Completed
Push — master ( f22a46...046041 )
by Patrick
02:27 queued 12s
created
Auth/LDAPGettableObject.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -35,20 +35,20 @@
 block discarded – undo
35 35
     {
36 36
         if(isset($this->labeleduri))
37 37
         {
38
-             //Have multiple emails
39
-             if($propName === 'mail')
40
-             {
41
-                 return $this->getFieldSingleValue('labeleduri');
42
-             }
43
-             if($propName === 'allMail')
44
-             {
45
-                 $tmp = $this->getField('mail');
46
-                 if(isset($tmp['count']))
47
-                 {
48
-                     unset($tmp['count']);
49
-                 }
50
-                 return $tmp;
51
-             }
38
+                //Have multiple emails
39
+                if($propName === 'mail')
40
+                {
41
+                    return $this->getFieldSingleValue('labeleduri');
42
+                }
43
+                if($propName === 'allMail')
44
+                {
45
+                    $tmp = $this->getField('mail');
46
+                    if(isset($tmp['count']))
47
+                    {
48
+                        unset($tmp['count']);
49
+                    }
50
+                    return $tmp;
51
+                }
52 52
         }
53 53
         $tmp = $this->getValueWithDefault($propName);
54 54
         if($tmp !== false)
Please login to merge, or discard this patch.
Autoload.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,8 @@  discard block
 block discarded – undo
9 9
 * @license http://www.apache.org/licenses/ Apache 2.0 License
10 10
 */
11 11
 
12
-spl_autoload_register(function ($class) {
12
+spl_autoload_register(function ($class)
13
+{
13 14
 
14 15
     // project-specific namespace prefix
15 16
     $prefix = 'Flipside\\';
@@ -19,7 +20,8 @@  discard block
 block discarded – undo
19 20
 
20 21
     // does the class use the namespace prefix?
21 22
     $len = strlen($prefix);
22
-    if (strncmp($prefix, $class, $len) !== 0) {
23
+    if (strncmp($prefix, $class, $len) !== 0)
24
+    {
23 25
         // no, move to the next registered autoloader
24 26
         return;
25 27
     }
@@ -33,7 +35,8 @@  discard block
 block discarded – undo
33 35
     $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
34 36
 
35 37
     // if the file exists, require it
36
-    if (file_exists($file)) {
38
+    if (file_exists($file))
39
+    {
37 40
         require $file;
38 41
     }
39 42
 });
Please login to merge, or discard this patch.
Settings.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
     public function getDataSetData($dataSetName)
73 73
     {
74 74
         if(!isset(\FlipsideSettings::$dataset) || !isset(\FlipsideSettings::$dataset[$dataSetName]))
75
-	{
75
+    {
76 76
             return false;
77 77
         }
78 78
         return \FlipsideSettings::$dataset[$dataSetName];
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
     public function getDataSetData($dataSetName)
73 73
     {
74 74
         if(!isset(\FlipsideSettings::$dataset) || !isset(\FlipsideSettings::$dataset[$dataSetName]))
75
-	{
75
+        {
76 76
             return false;
77 77
         }
78 78
         return \FlipsideSettings::$dataset[$dataSetName];
Please login to merge, or discard this patch.
Log/LogService.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,9 +27,11 @@
 block discarded – undo
27 27
     {
28 28
         // build a replacement array with braces around the context keys
29 29
         $replace = array();
30
-        foreach ($context as $key => $val) {
30
+        foreach ($context as $key => $val)
31
+        {
31 32
             // check that the value can be casted to string
32
-            if (!is_array($val) && (!is_object($val) || method_exists($val, '__toString'))) {
33
+            if (!is_array($val) && (!is_object($val) || method_exists($val, '__toString')))
34
+            {
33 35
                 $replace['{' . $key . '}'] = $val;
34 36
             }
35 37
         }
Please login to merge, or discard this patch.
Data/ObjectDataTable.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
         $objCount = count($res);
49 49
         for($i = 0; $i < $objCount; $i++)
50 50
         {
51
-           $res[$i] = new $this->className($res[$i]);
51
+            $res[$i] = new $this->className($res[$i]);
52 52
         }
53 53
         return $res;
54 54
     }
Please login to merge, or discard this patch.
Data/CSVDataTable.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -9,33 +9,33 @@
 block discarded – undo
9 9
     public function __construct($file)
10 10
     {
11 11
         $this->data = array_map('str_getcsv', file($file));
12
-	$titles = array_shift($this->data);
13
-	$count = count($this->data);
14
-	for($i = 0; $i < $count; $i++)
15
-	{
12
+    $titles = array_shift($this->data);
13
+    $count = count($this->data);
14
+    for($i = 0; $i < $count; $i++)
15
+    {
16 16
             $this->data[$i] = array_combine($titles, $this->data[$i]);
17
-	}
17
+    }
18 18
     }
19 19
 
20 20
     public function count($filter = false)
21 21
     {
22 22
         if($filter)
23
-	{
23
+    {
24 24
             $res = $this->data;
25
-	    $res = $filter->filter_array($res);
26
-	    return count($res);
27
-	}
28
-	return count($this->data);
25
+        $res = $filter->filter_array($res);
26
+        return count($res);
27
+    }
28
+    return count($this->data);
29 29
     }
30 30
   
31 31
     public function read($filter = false, $select = false, $count = false, $skip = false, $sort = false, $params = false)
32 32
     {
33 33
         $res = $this->data;
34
-	if($filter !== false)
35
-	{
34
+    if($filter !== false)
35
+    {
36 36
             $res = $filter->filter_array($res);
37
-	}
38
-	return $res;
37
+    }
38
+    return $res;
39 39
     }
40 40
 
41 41
     public function create($data)
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     public function count($filter = false)
21 21
     {
22 22
         if($filter)
23
-	{
23
+        {
24 24
             $res = $this->data;
25 25
 	    $res = $filter->filter_array($res);
26 26
 	    return count($res);
Please login to merge, or discard this patch.
Data/DataTableSessionHandler.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@
 block discarded – undo
15 15
 
16 16
     public function open($savePath, $sessionName)
17 17
     {
18
-       $this->dataTable = \DataSetFactory::getDataTableByNames($this->dataSetName, $this->dataTableName);
19
-       if($this->dataTable)
20
-       {
21
-           return true;
22
-       }
23
-       return false;
18
+        $this->dataTable = \DataSetFactory::getDataTableByNames($this->dataSetName, $this->dataTableName);
19
+        if($this->dataTable)
20
+        {
21
+            return true;
22
+        }
23
+        return false;
24 24
     }
25 25
 
26 26
     public function close()
Please login to merge, or discard this patch.
Data/SQLDataSet.php 2 patches
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.
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.
Data/FilterClause.php 2 patches
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.