-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename reflection converter package to reader
- Loading branch information
1 parent
ec84a00
commit be1ed4e
Showing
12 changed files
with
178 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace TypeLang\Reader\Exception; | ||
|
||
interface ReaderExceptionInterface extends \Throwable {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace TypeLang\Reader; | ||
|
||
use TypeLang\Parser\Node\Stmt\TypeStatement; | ||
use TypeLang\Reader\Exception\ReaderExceptionInterface; | ||
|
||
interface ReaderInterface | ||
{ | ||
/** | ||
* Returns a type AST structure based on an {@see ReflectionProperty} object. | ||
* | ||
* @throws ReaderExceptionInterface In case of any reading error occurs. | ||
*/ | ||
public function findPropertyType(\ReflectionProperty $property): ?TypeStatement; | ||
|
||
/** | ||
* Returns a type AST structure based on an {@see ReflectionFunctionAbstract} object. | ||
* | ||
* @throws ReaderExceptionInterface In case of any reading error occurs. | ||
*/ | ||
public function findFunctionType(\ReflectionFunctionAbstract $function): ?TypeStatement; | ||
|
||
/** | ||
* Returns a type AST structure based on an {@see ReflectionParameter} object. | ||
* | ||
* @throws ReaderExceptionInterface In case of any reading error occurs. | ||
*/ | ||
public function findParameterType(\ReflectionParameter $parameter): ?TypeStatement; | ||
|
||
/** | ||
* Returns a type AST structure based on an {@see ReflectionClassConstant} object. | ||
* | ||
* @throws ReaderExceptionInterface In case of any reading error occurs. | ||
*/ | ||
public function findConstantType(\ReflectionClassConstant $constant): ?TypeStatement; | ||
} |
Oops, something went wrong.