Improve matrix tests

This commit is contained in:
Dennis Eichhorn 2017-11-16 12:33:33 +01:00
parent 157c6a04ce
commit ff9f1dbaea
2 changed files with 7 additions and 7 deletions

View File

@ -33,7 +33,7 @@ class IdentityMatrix extends Matrix
*
* @since 1.0.0
*/
public function __constrcut(int $n)
public function __construct(int $n)
{
$this->n = $n;
$this->m = $n;

View File

@ -197,7 +197,7 @@ class Matrix implements \ArrayAccess, \Iterator
*
* @return Matrix
*
* @throws \Exception
* @throws \InvalidArgumentException
*
* @since 1.0.0
*/
@ -209,7 +209,7 @@ class Matrix implements \ArrayAccess, \Iterator
return $this->add(-$value);
}
throw new \Exception('Type');
throw new \InvalidArgumentException('Type');
}
/**
@ -219,7 +219,7 @@ class Matrix implements \ArrayAccess, \Iterator
*
* @return Matrix
*
* @throws \Exception
* @throws \InvalidArgumentException
*
* @since 1.0.0
*/
@ -231,7 +231,7 @@ class Matrix implements \ArrayAccess, \Iterator
return $this->addScalar($value);
}
throw new \Exception();
throw new \InvalidArgumentException();
}
/**
@ -324,7 +324,7 @@ class Matrix implements \ArrayAccess, \Iterator
*
* @return Matrix
*
* @throws \Exception
* @throws \InvalidArgumentException
*
* @since 1.0.0
*/
@ -336,7 +336,7 @@ class Matrix implements \ArrayAccess, \Iterator
return $this->multScalar($value);
}
throw new \Exception('Type');
throw new \InvalidArgumentException('Type');
}
/**