mirror of
				https://github.com/furyfire/trueskill.git
				synced 2025-11-04 10:12:28 +01:00 
			
		
		
		
	PSR1, PSR2 and PSR12 code standards
This commit is contained in:
		@@ -74,16 +74,8 @@ class Matrix
 | 
			
		||||
        $transposeMatrix = [];
 | 
			
		||||
 | 
			
		||||
        $rowMatrixData = $this->matrixRowData;
 | 
			
		||||
        for (
 | 
			
		||||
            $currentRowTransposeMatrix = 0;
 | 
			
		||||
             $currentRowTransposeMatrix < $this->columnCount;
 | 
			
		||||
             $currentRowTransposeMatrix++
 | 
			
		||||
        ) {
 | 
			
		||||
            for (
 | 
			
		||||
                $currentColumnTransposeMatrix = 0;
 | 
			
		||||
                 $currentColumnTransposeMatrix < $this->rowCount;
 | 
			
		||||
                 $currentColumnTransposeMatrix++
 | 
			
		||||
            ) {
 | 
			
		||||
        for ($currentRowTransposeMatrix = 0; $currentRowTransposeMatrix < $this->columnCount; $currentRowTransposeMatrix++) {
 | 
			
		||||
            for ($currentColumnTransposeMatrix = 0; $currentColumnTransposeMatrix < $this->rowCount; $currentColumnTransposeMatrix++) {
 | 
			
		||||
                $transposeMatrix[$currentRowTransposeMatrix][$currentColumnTransposeMatrix] =
 | 
			
		||||
                    $rowMatrixData[$currentColumnTransposeMatrix][$currentRowTransposeMatrix];
 | 
			
		||||
            }
 | 
			
		||||
@@ -214,11 +206,7 @@ class Matrix
 | 
			
		||||
 | 
			
		||||
    public static function add(Matrix $left, Matrix $right): Matrix
 | 
			
		||||
    {
 | 
			
		||||
        if (
 | 
			
		||||
            ($left->getRowCount() != $right->getRowCount())
 | 
			
		||||
 | 
			
		||||
            || ($left->getColumnCount() != $right->getColumnCount())
 | 
			
		||||
        ) {
 | 
			
		||||
        if (($left->getRowCount() != $right->getRowCount()) || ($left->getColumnCount() != $right->getColumnCount())) {
 | 
			
		||||
            throw new Exception('Matrices must be of the same size');
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user