Skip to content

Commit 58a6287

Browse files
committed
Added code style fixer rules
1 parent 57f41bc commit 58a6287

11 files changed

+341
-366
lines changed

.php_cs.dist

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
11
<?php
22

3-
$finder = PhpCsFixer\Finder::create()->in(__DIR__);
3+
use PhpCsFixer\Finder;
4+
use PhpCsFixer\Config;
45

5-
return PhpCsFixer\Config::create()
6-
->setRules([
7-
'@PSR2' => true,
8-
'array_syntax' => ['syntax' => 'short'],
9-
])
10-
->setFinder($finder);
6+
return Config::create()->setRules([
7+
'@PSR2' => true,
8+
'array_syntax' => ['syntax' => 'short'],
9+
'blank_line_after_opening_tag' => true,
10+
'combine_consecutive_issets' => true,
11+
'combine_consecutive_unsets' => true,
12+
'concat_space' => ['spacing' => 'one'],
13+
'declare_equal_normalize' => ['space' => 'single'],
14+
'no_blank_lines_after_class_opening' => true,
15+
'no_blank_lines_after_phpdoc' => true,
16+
'no_extra_blank_lines' => true,
17+
'object_operator_without_whitespace' => true,
18+
'phpdoc_align' => ['align' => 'left'],
19+
'phpdoc_no_empty_return' => true,
20+
'phpdoc_order' => true,
21+
'phpdoc_scalar' => true,
22+
'phpdoc_single_line_var_spacing' => true,
23+
'phpdoc_trim' => true,
24+
'phpdoc_var_without_name' => true,
25+
'return_type_declaration' => ['space_before' => 'one'],
26+
'single_quote' => true,
27+
])->setFinder(Finder::create()->in(__DIR__));

lib/JAMA/CholeskyDecomposition.php

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@
2020
*/
2121
class CholeskyDecomposition
2222
{
23-
24-
/**
25-
* Decomposition storage
26-
* @var array
27-
* @access private
28-
*/
23+
/**
24+
* Decomposition storage
25+
* @var array
26+
* @access private
27+
*/
2928
private $L = [];
3029

3130
/**
@@ -37,12 +36,11 @@ class CholeskyDecomposition
3736

3837
/**
3938
* Symmetric positive definite flag
40-
* @var boolean
39+
* @var bool
4140
* @access private
4241
*/
4342
private $isspd = true;
4443

45-
4644
/**
4745
* CholeskyDecomposition
4846
*
@@ -82,18 +80,16 @@ public function __construct($A = null)
8280
}
8381
} // function __construct()
8482

85-
8683
/**
8784
* Is the matrix symmetric and positive definite?
8885
*
89-
* @return boolean
86+
* @return bool
9087
*/
9188
public function isSPD()
9289
{
9390
return $this->isspd;
9491
} // function isSPD()
9592

96-
9793
/**
9894
* getL
9995
*
@@ -105,7 +101,6 @@ public function getL()
105101
return new Matrix($this->L);
106102
} // function getL()
107103

108-
109104
/**
110105
* Solve A*X = B
111106
*

lib/JAMA/EigenvalueDecomposition.php

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@
2626
*/
2727
class EigenvalueDecomposition
2828
{
29-
30-
/**
31-
* Row and column dimension (square matrix).
32-
* @var int
33-
*/
29+
/**
30+
* Row and column dimension (square matrix).
31+
* @var int
32+
*/
3433
private $n;
3534

3635
/**
@@ -71,7 +70,6 @@ class EigenvalueDecomposition
7170
private $cdivr;
7271
private $cdivi;
7372

74-
7573
/**
7674
* Symmetric Householder reduction to tridiagonal form.
7775
*
@@ -176,7 +174,6 @@ private function tred2()
176174
$this->e[0] = 0.0;
177175
}
178176

179-
180177
/**
181178
* Symmetric tridiagonal QL algorithm.
182179
*
@@ -286,7 +283,6 @@ private function tql2()
286283
}
287284
}
288285

289-
290286
/**
291287
* Nonsymmetric reduction to Hessenberg form.
292288
*
@@ -374,7 +370,6 @@ private function orthes()
374370
}
375371
}
376372

377-
378373
/**
379374
* Performs complex division.
380375
*
@@ -395,7 +390,6 @@ private function cdiv($xr, $xi, $yr, $yi)
395390
}
396391
}
397392

398-
399393
/**
400394
* Nonsymmetric reduction from Hessenberg to real Schur form.
401395
*
@@ -783,7 +777,6 @@ private function hqr2()
783777
}
784778
} // end hqr2
785779

786-
787780
/**
788781
* Constructor: Check for symmetry, then construct the eigenvalue decomposition
789782
*
@@ -819,7 +812,6 @@ public function __construct($Arg)
819812
}
820813
}
821814

822-
823815
/**
824816
* Return the eigenvector matrix
825817
*
@@ -831,7 +823,6 @@ public function getV()
831823
return new Matrix($this->V, $this->n, $this->n);
832824
}
833825

834-
835826
/**
836827
* Return the real parts of the eigenvalues
837828
*
@@ -843,7 +834,6 @@ public function getRealEigenvalues()
843834
return $this->d;
844835
}
845836

846-
847837
/**
848838
* Return the imaginary parts of the eigenvalues
849839
*
@@ -855,7 +845,6 @@ public function getImagEigenvalues()
855845
return $this->e;
856846
}
857847

858-
859848
/**
860849
* Return the block diagonal eigenvalue matrix
861850
*

0 commit comments

Comments
 (0)