Skip to content

Commit f349ee9

Browse files
lexidorazjezz
authored andcommitted
disallow_silence (#3)
1 parent 28f719a commit f349ee9

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

.hhconfig

+1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ safe_array = true
33
safe_vector_array = true
44
unsafe_rx = false
55
ignored_paths = [ "vendor/.+/tests/.+", "vendor/.+/bin/.+" ]
6+
disallow_silence = true
67
const_default_func_args = true

src/Nuxed/Filesystem/File.hack

+6-2
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,9 @@ final class File extends Node {
387387
);
388388
}
389389

390-
@\symlink($this->path->toString(), $target->toString());
390+
$error_level = \error_reporting(0);
391+
\symlink($this->path->toString(), $target->toString());
392+
\error_reporting($error_level);
391393
if (!$target->exists() || !$target->isSymlink()) {
392394
throw new Exception\RuntimeException(Str\format(
393395
'Error while creating a symbolic link (%s) for file (%s).',
@@ -411,7 +413,9 @@ final class File extends Node {
411413
);
412414
}
413415

414-
@\link($this->path->toString(), $link->toString());
416+
$error_level = \error_reporting(0);
417+
\link($this->path->toString(), $link->toString());
418+
\error_reporting($error_level);
415419
if (!$link->exists()) {
416420
throw new Exception\RuntimeException(Str\format(
417421
'Error while creating a hard link (%s) for file (%s).',

src/Nuxed/Filesystem/Folder.hack

+6-3
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,9 @@ final class Folder extends Node {
100100
Str\format('Folder (%s) already exists.', $this->path->toString()),
101101
);
102102
}
103-
104-
$ret = @\mkdir($this->path->toString(), $mode, true) as bool;
103+
$error_level = \error_reporting(0);
104+
$ret = \mkdir($this->path->toString(), $mode, true) as bool;
105+
\error_reporting($error_level);
105106
$this->reset();
106107
return $ret;
107108
}
@@ -188,7 +189,9 @@ final class Folder extends Node {
188189
$this->isAvailable();
189190
await $this->flush();
190191
$this->reset();
191-
$deleted = @\rmdir($this->path->toString()) as bool;
192+
$error_level = \error_reporting(0);
193+
$deleted = \rmdir($this->path->toString()) as bool;
194+
\error_reporting($error_level);
192195
$this->reset();
193196
return $deleted;
194197
}

0 commit comments

Comments
 (0)