for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Rougin\Combustor\Common;
/**
* File
*
* A simple object-oriented interface for handling files.
* @package Combustor
* @author Rougin Royce Gutib <[email protected]>
*/
class File
{
* @var pointer
protected $file;
* @var string
protected $path;
* @param string $path
* @param string $mode
public function __construct($path, $mode = 'wb')
$this->path = $path;
$this->file = fopen($path, $mode);
fopen($path, $mode)
resource
object<Rougin\Combustor\Common\pointer>
$file
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..
}
* Closes an open file pointer.
* @return boolean
public function close()
return fclose($this->file);
* Reads entire file into a string.
* @return string
public function getContents()
return file_get_contents($this->path);
* Writes a string to a file.
* @param string $content
* @return integer|boolean
public function putContents($content)
return file_put_contents($this->path, $content);
* Changes the file mode of the file.
* @param integer $mode
public function chmod($mode)
return chmod($this->path, $mode);
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..