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

fix type hint errors #59

Merged
merged 1 commit into from
May 2, 2023
Merged

fix type hint errors #59

merged 1 commit into from
May 2, 2023

Conversation

xinningsu
Copy link
Contributor

fopen 返回值不是 string, 是 resource
不过type hint中并没有resource这个类型,看官方接口也没有定义返回类型,所以直接去掉

#22 {main} {"memory":4070200,"exception":"[object] (TypeError(code: 0): Overtrue\\Flysystem\\Qiniu\\QiniuAdapter::readStream(): Return value must be of type string, resource returned at /Users/thomas/projects/craft-4/vendor/overtrue/flysystem-qiniu/src/QiniuAdapter.php:95)"} 

另外修复了测试函数也有两处type hint问题

1) Overtrue\Flysystem\Qiniu\Tests\QiniuAdapterTest::testGetUploadToken with data set #0 (Mockery_0_Overtrue_Flysystem_Qiniu_QiniuAdapter Object (...), array(Mockery_1_stdClass Object (...), Mockery_1_stdClass Object (...), Mockery_1_stdClass Object (...), Mockery_1_stdClass Object (...)))
TypeError: Mockery_0_Overtrue_Flysystem_Qiniu_QiniuAdapter::getUploadToken(): Argument #3 ($policy) must be of type ?array, string given, called in /Users/thomas/projects/flysystem-qiniu/tests/QiniuAdapterTest.php on line 312

@overtrue overtrue merged commit cf87e0f into overtrue:3.x May 2, 2023
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.

2 participants