diff --git a/tests/Doctrine/Tests/Mocks/ConnectionMock.php b/tests/Doctrine/Tests/Mocks/ConnectionMock.php index ba0be9ee4..0b5685d2a 100644 --- a/tests/Doctrine/Tests/Mocks/ConnectionMock.php +++ b/tests/Doctrine/Tests/Mocks/ConnectionMock.php @@ -97,7 +97,7 @@ class ConnectionMock extends Connection */ public function fetchColumn($statement, array $params = [], $colnum = 0, array $types = []) { - if ($this->_fetchOneException != null) { + if (null !== $this->_fetchOneException) { throw $this->_fetchOneException; } @@ -136,7 +136,7 @@ class ConnectionMock extends Connection } /** - * @param \Exception $exception + * @param \Exception|null $exception * * @return void */ @@ -168,7 +168,7 @@ class ConnectionMock extends Connection /** * @param Statement $result */ - public function setQueryResult($result) + public function setQueryResult(Statement $result) { $this->_queryResult = $result; } diff --git a/tests/Doctrine/Tests/ORM/Id/SequenceGeneratorTest.php b/tests/Doctrine/Tests/ORM/Id/SequenceGeneratorTest.php index b972d0640..f7ec2ffc7 100644 --- a/tests/Doctrine/Tests/ORM/Id/SequenceGeneratorTest.php +++ b/tests/Doctrine/Tests/ORM/Id/SequenceGeneratorTest.php @@ -25,12 +25,12 @@ class SequenceGeneratorTest extends OrmTestCase public function testGeneration() { $this->_em->getConnection()->setFetchOneException( - new \Exception('Fetch* method used. Query method should be used instead, as NEXTVAL should be run on a master server in master-slave setup.') + new \RuntimeException('Fetch* method used. Query method should be used instead, as NEXTVAL should be run on a master server in master-slave setup.') ); for ($i=0; $i < 42; ++$i) { if ($i % 10 == 0) { - $nextId = array(array((int)($i / 10) * 10)); + $nextId = [[(int)($i / 10) * 10]]; $this->_em->getConnection()->setQueryResult(new StatementArrayMock($nextId)); } $id = $this->_seqGen->generate($this->_em, null);