diff --git a/src/File.php b/src/File.php new file mode 100644 index 0000000..0187594 --- /dev/null +++ b/src/File.php @@ -0,0 +1,40 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection; + +/** + * Interface for files processed by the ProjectFactory + */ +interface File +{ + /** + * Returns the content of the file as a string. + * + * @return string + */ + public function getContents(); + + /** + * Returns md5 hash of the file. + * + * @return string + */ + public function md5(); + + /** + * Returns an relative path to the file. + * + * @return string + */ + public function path(); +} diff --git a/src/ProjectFactory.php b/src/ProjectFactory.php index f2c091d..5602f84 100644 --- a/src/ProjectFactory.php +++ b/src/ProjectFactory.php @@ -20,7 +20,7 @@ interface ProjectFactory * Creates a project from the set of files. * * @param string $name - * @param string[] $files + * @param File[] $files * @return Project */ public function create($name, array $files);