We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d38b2a8 commit 5e2fa8eCopy full SHA for 5e2fa8e
src/main/php/text/json/FileOutput.class.php
@@ -18,16 +18,16 @@ class FileOutput extends Output {
18
/**
19
* Creates a new instance
20
*
21
- * @param var $arg Either an io.File object or a file name
+ * @param string|io.File $target
22
* @param ?text.json.Format $format
23
*/
24
- public function __construct($arg, $format= null) {
+ public function __construct($target, $format= null) {
25
parent::__construct($format);
26
- if ($arg instanceof File) {
27
- $this->file= $arg;
+ if ($target instanceof File) {
+ $this->file= $target;
28
$this->wasOpen= $this->file->isOpen();
29
} else {
30
- $this->file= new File($arg);
+ $this->file= new File($target);
31
$this->wasOpen= false;
32
}
33
$this->wasOpen || $this->file->open(File::WRITE);
0 commit comments