Skip to content

Commit

Permalink
Add Nette\Http\FileUpload::getImageSize() stub with return type narrowed
Browse files Browse the repository at this point in the history
PR'd phpstan/phpstan-nette#166 and this can be removed once the PR is merged and deployed.
  • Loading branch information
spaze committed Dec 19, 2024
1 parent dee4843 commit 5afea80
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ parameters:
- phpt
level: 9
checkMissingOverrideMethodAttribute: true
stubFiles:
- stubs/Nette/Http/FileUpload.phpstub

includes:
- phar://phpstan.phar/conf/bleedingEdge.neon
Expand Down
18 changes: 18 additions & 0 deletions app/stubs/Nette/Http/FileUpload.phpstub
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
// Copied from https://github.com/phpstan/phpstan-nette/pull/166,
// can be removed once the PR is merged and released.

namespace Nette\Http;

class FileUpload
{

/**
* @return array{0:positive-int, 1:positive-int}|null
*/
public function getImageSize(): ?array
{
// nothing
}

}

0 comments on commit 5afea80

Please sign in to comment.