assertInternalType()
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start with the Codeception wrapper in src/Codeception/Util/Shared/Asserts.php#L448-L451 and PHPUnit's assertInternalType in src/Framework/Assert.php#L1677, then reproduce the fopen example from the issue. Done means the assertion is understood well enough that the later fwrite call no longer reports resource|false.
Written by the indexing model from the issue text.
Description
I'm using Codeception's wrapper of PHPUnit's assertInternalType, and thought phpstan would understand the type.
Example code:
$feedHandle = fopen('php://temp', 'rw+');
$this->assertInternalType('resource', $feedHandle);
fwrite($feedHandle, $feed);
Actual result:
Parameter #1 $fp of function fwrite expects resource, resource|false given.
Expected result:
-- Nothing --
- Dominant language
- PHP
- Stars
- 544
- Forks
- 58
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 5
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from phpstan/phpstan-phpunit
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
phpstan/phpstan-phpunit#332 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
phpstan/phpstan-phpunit#321 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
phpstan/phpstan-phpunit#309 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
phpstan/phpstan-phpunit#299 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
phpstan/phpstan-phpunit#292 · 3 comments ·
All issues in phpstan/phpstan-phpunit
Similar issues
-
sync-en
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
sync-en
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
Перевод устарел
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
status/awaiting_triage
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Issue: ready for confirmation Reported on 2.4.x
Difficulty 2/5 1-3 hours Newbie friendliness 88/100