Skip to content

Commit 546f4cd

Browse files
author
Florian Engelhardt
committed
Merge branch 'master' of github.com:flow-control/react-inotify
2 parents 8ccd237 + dffd0ce commit 546f4cd

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"phpunit/phpunit": "^8.5|^9.5",
1414
"phpstan/phpstan": "^1.0.0",
1515
"infection/infection": "<1.0",
16-
"vimeo/psalm": "^4.0"
16+
"vimeo/psalm": "^5.0"
1717
},
1818
"autoload": {
1919
"psr-4": {

psalm.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
</ignoreFiles>
1414
</projectFiles>
1515

16+
<stubs>
17+
<file name="stubs/inotify.phpstub"/>
18+
</stubs>
19+
1620
<issueHandlers>
1721
<LessSpecificReturnType errorLevel="info" />
1822

src/InotifyStream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function __destruct()
9292
}
9393

9494
/**
95-
* @return int<1, max>|false
95+
* @return false|int<1, max>
9696
*/
9797
public function addWatch(string $path, int $mode): int|false
9898
{

stubs/inotify.phpstub

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace {
4+
/**
5+
* @param resource $inotify_instance
6+
* @param string $pathname
7+
* @param int $mask
8+
*
9+
* @return int<1, max>|false
10+
*/
11+
function inotify_add_watch(resource $inotify_instance, string $pathname, int $mask): int|false {}
12+
}

0 commit comments

Comments
 (0)