Skip to content

Project factory accepts File implementations only #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 27, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions src/File.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php
/**
* This file is part of phpDocumentor.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @copyright 2010-2015 Mike van Riel<mike@phpdoc.org>
* @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();
}
2 changes: 1 addition & 1 deletion src/ProjectFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down