44
55namespace Laminas \Db \Adapter \Mysql \Driver \Mysqli ;
66
7+ use Laminas \Db \Adapter \Driver \ResultInterface ;
78use Laminas \Db \Adapter \Driver \StatementInterface ;
89use Laminas \Db \Adapter \Exception ;
910use Laminas \Db \Adapter \ParameterContainer ;
@@ -160,12 +161,8 @@ public function getParameterContainer()
160161 return $ this ->parameterContainer ;
161162 }
162163
163- /**
164- * Is prepared
165- *
166- * @return bool
167- */
168- public function isPrepared ()
164+ /** Is prepared */
165+ public function isPrepared (): bool
169166 {
170167 return $ this ->isPrepared ;
171168 }
@@ -176,7 +173,7 @@ public function isPrepared()
176173 * @param string|null $sql
177174 * @return Statement|null Provides a fluent interface
178175 */
179- public function prepare (?string $ sql = null ): ? static
176+ public function prepare (?string $ sql = null ): StatementInterface
180177 {
181178 if ($ this ->isPrepared ) {
182179 throw new Exception \RuntimeException ('This statement has already been prepared ' );
@@ -200,11 +197,9 @@ public function prepare(?string $sql = null): ?static
200197 /**
201198 * Execute
202199 *
203- * @param null|array|ParameterContainer $parameters
204200 * @throws Exception\RuntimeException
205- * @return mixed
206201 */
207- public function execute ($ parameters = null )
202+ public function execute (null | array | ParameterContainer $ parameters = null ): ? ResultInterface
208203 {
209204 if (! $ this ->isPrepared ) {
210205 $ this ->prepare ();
0 commit comments