Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize builder::paginate argument #2080

Merged
merged 3 commits into from Jul 16, 2020
Merged

Optimize builder::paginate argument #2080

merged 3 commits into from Jul 16, 2020

Conversation

weskiller
Copy link
Contributor

No description provided.

@limingxinleo
Copy link
Member

这里为啥需要加?号呢

@Reasno
Copy link
Member

Reasno commented Jul 16, 2020

我觉得加了问号好。假设我们有一个继承类,int $perPage = null当不给默认值$perPage会变成null,而调用parent时就会报错$perPage不是int类型。

@limingxinleo
Copy link
Member

我觉得加了问号好。假设我们有一个继承类,int $perPage = null当不给默认值$perPage会变成null,而调用parent时就会报错$perPage不是int类型。

嗯,有道理

如果说直接想跳过第一个设置后面的参数,不支持null似乎也不太方便

@limingxinleo limingxinleo merged commit 35a9782 into hyperf:master Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants