Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Typo in the docbloc #662

Closed
ncou opened this issue May 26, 2019 · 5 comments
Closed

Typo in the docbloc #662

ncou opened this issue May 26, 2019 · 5 comments

Comments

@ncou
Copy link
Contributor

ncou commented May 26, 2019

Hi,

Very nice piece of code. I think there is a small typo in the @param values in the MiddlewareFactory class.

https://github.com/zendframework/zend-expressive/blob/master/src/MiddlewareFactory.php#L128

     *
     * @param string|array|**MiddlewarePipe** $middleware
     */
     public function pipeline(...$middleware) : MiddlewarePipe

I think it's "MiddlewareInterface" and not "MiddlewarePipe" for the param value.

If i am right, i can do a PR.

@dudemelo
Copy link

I think it's correct! MiddlewarePipe is a pipeline/queue of middleware.

MiddlewarePipe implements MiddlewarePipeInterface which extends MiddlewareInterface.

@ncou
Copy link
Contributor Author

ncou commented May 27, 2019

yes but the docbloc should say "MiddlewareInterface" because you can also pass some MiddlewareInterface as parameter.

@dudemelo
Copy link

You're right, I thought it was @return instead of @param. The prepare method is waiting for fifty shades of type but one of those is MiddlewareInterface.

* @param string|array|callable|MiddlewareInterface|RequestHandlerInterface $middleware
* @throws Exception\InvalidMiddlewareException if argument is not one of
* the specified types.
*/
public function prepare($middleware) : MiddlewareInterface

@weierophinney
Copy link
Member

@ncou You're correct; please submit a patch.

@ncou
Copy link
Contributor Author

ncou commented May 29, 2019

the PR is here #663
I have listed all the possible @param value who should be the same as the prepare input params.

Sorry for my poor english.

Keep up the good work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants