From 1559db7ac17f16c3cb07de7ca4866cda096a19b0 Mon Sep 17 00:00:00 2001 From: Mathew Davies Date: Thu, 8 Jun 2017 16:25:03 +0100 Subject: [PATCH 1/5] Update HydratorMockStatement to implement the right interface. --- tests/Doctrine/Tests/Mocks/HydratorMockStatement.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/Doctrine/Tests/Mocks/HydratorMockStatement.php b/tests/Doctrine/Tests/Mocks/HydratorMockStatement.php index ca0df22fe..f2a031488 100644 --- a/tests/Doctrine/Tests/Mocks/HydratorMockStatement.php +++ b/tests/Doctrine/Tests/Mocks/HydratorMockStatement.php @@ -30,13 +30,12 @@ class HydratorMockStatement implements \IteratorAggregate, Statement /** * Fetches all rows from the result set. * - * @param int|null $fetchStyle - * @param int|null $columnIndex + * @param null $fetchMode + * @param null $fetchArgument * @param array|null $ctorArgs - * * @return array */ - public function fetchAll($fetchStyle = null, $columnIndex = null, array $ctorArgs = null) + public function fetchAll($fetchMode = null, $fetchArgument = null, $ctorArgs = null) { return $this->_resultSet; } @@ -55,7 +54,7 @@ class HydratorMockStatement implements \IteratorAggregate, Statement /** * {@inheritdoc} */ - public function fetch($fetchStyle = null) + public function fetch($fetchStyle = null, $cursorOrientation = \PDO::FETCH_ORI_NEXT, $cursorOffset = 0) { $current = current($this->_resultSet); next($this->_resultSet); @@ -108,8 +107,9 @@ class HydratorMockStatement implements \IteratorAggregate, Statement /** * {@inheritdoc} */ - public function execute($params = []) + public function execute($params = null) { + } /** From a59367423adb725ea85f9f5adb0bba6dfed529f7 Mon Sep 17 00:00:00 2001 From: Mathew Davies Date: Thu, 8 Jun 2017 16:25:57 +0100 Subject: [PATCH 2/5] Update StatementMock to implement the right interface. --- tests/Doctrine/Tests/Mocks/StatementMock.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Doctrine/Tests/Mocks/StatementMock.php b/tests/Doctrine/Tests/Mocks/StatementMock.php index 8107ff1be..efba7d841 100644 --- a/tests/Doctrine/Tests/Mocks/StatementMock.php +++ b/tests/Doctrine/Tests/Mocks/StatementMock.php @@ -75,14 +75,14 @@ class StatementMock implements \IteratorAggregate, Statement /** * {@inheritdoc} */ - public function fetch($fetchStyle = null) + public function fetch($fetchMode = null, $cursorOrientation = \PDO::FETCH_ORI_NEXT, $cursorOffset = 0) { } /** * {@inheritdoc} */ - public function fetchAll($fetchStyle = null) + public function fetchAll($fetchMode = null, $fetchArgument = null, $ctorArgs = null) { } From 633b821e18d62cc94ebd68c2038acc82ac2a5311 Mon Sep 17 00:00:00 2001 From: Mathew Davies Date: Thu, 8 Jun 2017 16:27:28 +0100 Subject: [PATCH 3/5] Update StatementArrayMock to implement the right interface. --- tests/Doctrine/Tests/Mocks/StatementArrayMock.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Doctrine/Tests/Mocks/StatementArrayMock.php b/tests/Doctrine/Tests/Mocks/StatementArrayMock.php index 9ef37da46..ed6ea4fdf 100644 --- a/tests/Doctrine/Tests/Mocks/StatementArrayMock.php +++ b/tests/Doctrine/Tests/Mocks/StatementArrayMock.php @@ -34,12 +34,12 @@ class StatementArrayMock extends StatementMock } } - public function fetchAll($fetchStyle = null) + public function fetchAll($fetchMode = null, $fetchArgument = null, $ctorArgs = null) { return $this->_result; } - public function fetch($fetchStyle = null) + public function fetch($fetchMode = null, $cursorOrientation = \PDO::FETCH_ORI_NEXT, $cursorOffset = 0) { $current = current($this->_result); next($this->_result); From 9f13557d144dc089ea9e9b41c8bbcc585c5bea8b Mon Sep 17 00:00:00 2001 From: Mathew Davies Date: Thu, 8 Jun 2017 16:42:11 +0100 Subject: [PATCH 4/5] Be consistent with the rest of the file. --- tests/Doctrine/Tests/Mocks/HydratorMockStatement.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Doctrine/Tests/Mocks/HydratorMockStatement.php b/tests/Doctrine/Tests/Mocks/HydratorMockStatement.php index f2a031488..3110dbce6 100644 --- a/tests/Doctrine/Tests/Mocks/HydratorMockStatement.php +++ b/tests/Doctrine/Tests/Mocks/HydratorMockStatement.php @@ -109,7 +109,6 @@ class HydratorMockStatement implements \IteratorAggregate, Statement */ public function execute($params = null) { - } /** From b42c36f4720b3ccfac6b40e1d7566a468b0ae6a3 Mon Sep 17 00:00:00 2001 From: Mathew Davies Date: Thu, 8 Jun 2017 16:43:18 +0100 Subject: [PATCH 5/5] Update phpDoc --- tests/Doctrine/Tests/Mocks/HydratorMockStatement.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Doctrine/Tests/Mocks/HydratorMockStatement.php b/tests/Doctrine/Tests/Mocks/HydratorMockStatement.php index 3110dbce6..4f6df40e5 100644 --- a/tests/Doctrine/Tests/Mocks/HydratorMockStatement.php +++ b/tests/Doctrine/Tests/Mocks/HydratorMockStatement.php @@ -30,8 +30,8 @@ class HydratorMockStatement implements \IteratorAggregate, Statement /** * Fetches all rows from the result set. * - * @param null $fetchMode - * @param null $fetchArgument + * @param int|null $fetchMode + * @param int|null $fetchArgument * @param array|null $ctorArgs * @return array */