Skip to content

Commit

Permalink
call add without 2nd argument (recursive) (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikbosch authored Jun 11, 2024
1 parent ca37c60 commit e6bafc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub fn get_module() -> Module {
Ok::<_, phper::Error>(())
})
.argument(Argument::by_val("path"))
.argument(Argument::by_val("recursive"));
.argument(Argument::by_val_optional("recursive"));

watcher.add_method("watch", Visibility::Public, |this, arguments| {
let handler = arguments.get_mut(0).unwrap();
Expand Down
1 change: 1 addition & 0 deletions tests/php/recommended_watcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
error_reporting(E_ALL);

$watcher = new FsNotify\RecommendedWatcher();
$watcher->add(__DIR__);
$watcher->add(__DIR__, recursive: false);
$watcher->watch(function (FsNotify\Event $event) {
var_dump($event->getKind());
Expand Down

0 comments on commit e6bafc7

Please sign in to comment.