Test Failed
Push — master ( 2cf2a7...fb7488 )
by Felipe
02:53
created
docs/examples_stats/ex_stats_simple.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
 print_r($dnulls);
43 43
 echo "Let's generate an error\n";
44 44
 try {
45
-	print_r($s->setData($dnulls));
45
+    print_r($s->setData($dnulls));
46 46
 } catch (\Exception $e) {
47
-	echo "\n\t Exception: ".$e->getMessage()."\n\n";
47
+    echo "\n\t Exception: ".$e->getMessage()."\n\n";
48 48
 }
49 49
 
50 50
 echo "Ignoring nulls and trying again\n";
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
 print_r($s->getData());
55 55
 echo "---> stats\n";
56 56
 try {
57
-	print_r($s->calcBasic());
57
+    print_r($s->calcBasic());
58 58
 } catch (\Exception $e) {
59
-	echo "\n\t Exception: ".$e->getMessage()."\n\n";
59
+    echo "\n\t Exception: ".$e->getMessage()."\n\n";
60 60
 }
61 61
 
62 62
 echo "Assuming nulls are zeros and doing a full stats calculation\n";
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 print_r($s->getData());
67 67
 echo "---> stats\n";
68 68
 try {
69
-	print_r($s->calcFull());
69
+    print_r($s->calcFull());
70 70
 } catch (\Exception $e) {
71
-	echo "\n\t Exception: ".$e->getMessage()."\n\n";
71
+    echo "\n\t Exception: ".$e->getMessage()."\n\n";
72 72
 }
Please login to merge, or discard this patch.
docs/examples_stats/ex_stats_bigdataset.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
     //require_once 'Math/Stats.php';
3
-   require_once __DIR__ . '/../../vendor/autoload.php';
3
+    require_once __DIR__ . '/../../vendor/autoload.php';
4 4
 
5 5
 
6 6
     $data = array();
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     try {
20 20
     $stats = $s ->calcFull();
21 21
 
22
-       //print_r($stats);
22
+        //print_r($stats);
23 23
     echo "Using Math_Stats:\n"
24 24
         . "mean = {$stats['mean']}\n"
25 25
         . "SEmean = {$stats['std_error_of_mean']}\n"
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
         . "max = 41\n"
42 42
         . "count = 4255666\n";
43 43
         
44
-      //Name,Mean,SEMean,StDev,Q1,Median,Q3,Min,Max,N
45
-      //SPSS,2.8627,0.0005,1.0630,2,3,4,1,41,4255666
44
+        //Name,Mean,SEMean,StDev,Q1,Median,Q3,Min,Max,N
45
+        //SPSS,2.8627,0.0005,1.0630,2,3,4,1,41,4255666
46 46
     } catch (\Exception $e) {
47 47
         echo "\n\t Exception: ".$e->getMessage()."\n\n";
48 48
     }
Please login to merge, or discard this patch.
docs/examples_stats/ex_stats_cummulative_data.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
 print_r($dnulls);
47 47
 echo "Generating an error by using data with nulls\n";
48 48
 try {
49
-	print_r($s->setData($dnulls,  \PEAR\Math\Stats::STATS_DATA_CUMMULATIVE));	
49
+    print_r($s->setData($dnulls,  \PEAR\Math\Stats::STATS_DATA_CUMMULATIVE));	
50 50
 } catch (\Exception $e) {
51
-	echo "\n\t Exception: ".$e->getMessage()."\n\n";
51
+    echo "\n\t Exception: ".$e->getMessage()."\n\n";
52 52
 }
53 53
 
54 54
 
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
 $s->setNullOption( \PEAR\Math\Stats::STATS_IGNORE_NULL);
58 58
 $s->setData($dnulls,  \PEAR\Math\Stats::STATS_DATA_CUMMULATIVE);
59 59
 try {
60
-	print_r($s->calcBasic());
60
+    print_r($s->calcBasic());
61 61
 } catch (\Exception $e) {
62
-	echo "\n\t Exception: ".$e->getMessage()."\n\n";
62
+    echo "\n\t Exception: ".$e->getMessage()."\n\n";
63 63
 }
64 64
 
65 65
 // let's assume null == zero
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 $s->setNullOption( \PEAR\Math\Stats::STATS_USE_NULL_AS_ZERO);
68 68
 $s->setData($dnulls,  \PEAR\Math\Stats::STATS_DATA_CUMMULATIVE);
69 69
 try {
70
-	print_r($s->calcFull());
70
+    print_r($s->calcFull());
71 71
 } catch (\Exception $e) {
72
-	echo "\n\t Exception: ".$e->getMessage()."\n\n";
72
+    echo "\n\t Exception: ".$e->getMessage()."\n\n";
73 73
 }
Please login to merge, or discard this patch.
docs/examples_histogram/ex_histogram_printer.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@  discard block
 block discarded – undo
4 4
 
5 5
 // create a boring array
6 6
 $vals = array(
7
-			1.5,2,3,4,0,3.2,0.1,0,0,5,3,2,3,4,1,2,4,5,1,3,2,4,5,2,3,4,1,2,
8
-			1.5,2,3,4,0,3.2,0.1,0,0,5,3,2,3,4,1,2,4,5,1,3,2,4,5,2,3,4,1,2,
9
-			1.5,2,3,4,0,3.2,0.1,0,0,5,3,2,3,4,1,2,4,5,1,3,2,4,5,2,3,4,1,2
10
-		);
7
+            1.5,2,3,4,0,3.2,0.1,0,0,5,3,2,3,4,1,2,4,5,1,3,2,4,5,2,3,4,1,2,
8
+            1.5,2,3,4,0,3.2,0.1,0,0,5,3,2,3,4,1,2,4,5,1,3,2,4,5,2,3,4,1,2,
9
+            1.5,2,3,4,0,3.2,0.1,0,0,5,3,2,3,4,1,2,4,5,1,3,2,4,5,2,3,4,1,2
10
+        );
11 11
 
12 12
 // create an instance 
13 13
 $h = new \PEAR\Histogram\Histogram();
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 // let us read a bigger data set:
29 29
 $data = array();
30 30
 foreach(file("ex_histogram.data") as $item) {
31
-	$data[] = floatval(trim($item));
31
+    $data[] = floatval(trim($item));
32 32
 }
33 33
 
34 34
 // let's do a simple histogram
Please login to merge, or discard this patch.
docs/examples_histogram/ex_histogram3d.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 
5 5
 // let's generate some values;
6 6
 for ($i=0; $i < 100; $i++) {
7
-	$a['x'][$i] = rand(-1,6);
8
-	$a['y'][$i] = rand(-1,6);
7
+    $a['x'][$i] = rand(-1,6);
8
+    $a['y'][$i] = rand(-1,6);
9 9
 }
10 10
 
11 11
 $h = new \PEAR\Histogram\Histogram3D();
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
 
19 19
 // now, let's change the options a wee bit
20 20
 $h->setBinOptions(
21
-	array(
22
-		'low' => array( 'x' => 0, 'y' => 0),
23
-		'high' => array( 'x' => 5, 'y' => 5),
24
-		'nbins' => array( 'x' => 5, 'y' => 5)
25
-		)
26
-	);
21
+    array(
22
+        'low' => array( 'x' => 0, 'y' => 0),
23
+        'high' => array( 'x' => 5, 'y' => 5),
24
+        'nbins' => array( 'x' => 5, 'y' => 5)
25
+        )
26
+    );
27 27
 $h->setType(\PEAR\Histogram\AbstractHistogram::HISTOGRAM_CUMMULATIVE);
28 28
 $h->calculate();
29 29
 // and print the whole histogram info, not the different
Please login to merge, or discard this patch.
docs/examples_histogram/ex_histogram4d.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -4,21 +4,21 @@
 block discarded – undo
4 4
 
5 5
 // let's generate some data
6 6
 for ($i=0; $i < 100; $i++) {
7
-	$a['x'][$i] = rand(0,4);
8
-	$a['y'][$i] = rand(0,4);
9
-	$a['z'][$i] = rand(0,4);
7
+    $a['x'][$i] = rand(0,4);
8
+    $a['y'][$i] = rand(0,4);
9
+    $a['z'][$i] = rand(0,4);
10 10
 }
11 11
 
12 12
 // and create a histogram from the data 
13 13
 // with specific options
14 14
 $h = new \PEAR\Histogram\Histogram4D();
15 15
 $h->setBinOptions(
16
-	array(
17
-		'low' => array( 'x' => 0, 'y' => 0, 'z'=>0),
18
-		'high' => array( 'x' => 4.0, 'y' => 4.0, 'z'=>4.0),
19
-		'nbins' => array( 'x' => 4, 'y' => 4, 'z'=>4)
20
-		)
21
-	);
16
+    array(
17
+        'low' => array( 'x' => 0, 'y' => 0, 'z'=>0),
18
+        'high' => array( 'x' => 4.0, 'y' => 4.0, 'z'=>4.0),
19
+        'nbins' => array( 'x' => 4, 'y' => 4, 'z'=>4)
20
+        )
21
+    );
22 22
 $h->setData($a);
23 23
 $h->calculate();
24 24
 // now we print out a comma separated set
Please login to merge, or discard this patch.
docs/examples_histogram/ex_histogram.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@  discard block
 block discarded – undo
4 4
 
5 5
 // create a boring array
6 6
 $vals = array(
7
-			1.5,2,3,4,0,3.2,0.1,0,0,5,3,2,3,4,1,2,4,5,1,3,2,4,5,2,3,4,1,2,
8
-			1.5,2,3,4,0,3.2,0.1,0,0,5,3,2,3,4,1,2,4,5,1,3,2,4,5,2,3,4,1,2,
9
-			1.5,2,3,4,0,3.2,0.1,0,0,5,3,2,3,4,1,2,4,5,1,3,2,4,5,2,3,4,1,2
10
-		);
7
+            1.5,2,3,4,0,3.2,0.1,0,0,5,3,2,3,4,1,2,4,5,1,3,2,4,5,2,3,4,1,2,
8
+            1.5,2,3,4,0,3.2,0.1,0,0,5,3,2,3,4,1,2,4,5,1,3,2,4,5,2,3,4,1,2,
9
+            1.5,2,3,4,0,3.2,0.1,0,0,5,3,2,3,4,1,2,4,5,1,3,2,4,5,2,3,4,1,2
10
+        );
11 11
 
12 12
 // create an instance 
13 13
 $h = new \PEAR\Histogram\Histogram();
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 // let us read a bigger data set:
25 25
 $data = array();
26 26
 foreach(file(__DIR__."/../../tests/_data/ex_histogram.data") as $item)
27
-	$data[] = floatval(trim($item));
27
+    $data[] = floatval(trim($item));
28 28
 
29 29
 // let's do a simple histogram
30 30
 $h->setType(\PEAR\Histogram\AbstractHistogram::HISTOGRAM_SIMPLE);
Please login to merge, or discard this patch.
src/Histogram/Histogram4D.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     {
32 32
 
33 33
         $this->setType($type);
34
-         try {
34
+            try {
35 35
             $this->setBinOptions($binOptions);
36 36
         } catch (\PEAR_Exception $e) {
37 37
             // Falling back to default options
Please login to merge, or discard this patch.
src/Math/Stats.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@  discard block
 block discarded – undo
18 18
      */
19 19
     const STATS_BASIC = 1;
20 20
 /**
21
- * STATS_FULL to generate also higher moments, mode, median, etc.
22
- */
21
+     * STATS_FULL to generate also higher moments, mode, median, etc.
22
+     */
23 23
     const STATS_FULL = 2;
24 24
 
25 25
 // Constants describing the data set format
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
      */
30 30
     const STATS_DATA_SIMPLE = 0;
31 31
 /**
32
- * STATS_DATA_CUMMULATIVE for an associative array of frequency values,
33
- * where in each array entry, the index is the data point and the
34
- * value the count (frequency):
35
- * e.g. $data = array(3=>4, 2.3=>5, 1.25=>6, 0.5=>3)
36
- */
32
+     * STATS_DATA_CUMMULATIVE for an associative array of frequency values,
33
+     * where in each array entry, the index is the data point and the
34
+     * value the count (frequency):
35
+     * e.g. $data = array(3=>4, 2.3=>5, 1.25=>6, 0.5=>3)
36
+     */
37 37
     const STATS_DATA_CUMMULATIVE = 1;
38 38
 
39 39
 // Constants defining how to handle nulls
@@ -43,14 +43,14 @@  discard block
 block discarded – undo
43 43
      */
44 44
     const STATS_REJECT_NULL = -1;
45 45
 /**
46
- * STATS_IGNORE_NULL, ignore null values and prune them from the data.
47
- * Any non-numeric value is considered a null in this context.
48
- */
46
+     * STATS_IGNORE_NULL, ignore null values and prune them from the data.
47
+     * Any non-numeric value is considered a null in this context.
48
+     */
49 49
     const STATS_IGNORE_NULL = -2;
50 50
 /**
51
- * STATS_USE_NULL_AS_ZERO, assign the value of 0 (zero) to null values.
52
- * Any non-numeric value is considered a null in this context.
53
- */
51
+     * STATS_USE_NULL_AS_ZERO, assign the value of 0 (zero) to null values.
52
+     * Any non-numeric value is considered a null in this context.
53
+     */
54 54
     const STATS_USE_NULL_AS_ZERO = -3;
55 55
 
56 56
     // properties
Please login to merge, or discard this patch.