forked from theseer/phpdox
-
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.
Fix PHP7.2 object typehint (theseer#354)
- Loading branch information
Showing
5 changed files
with
98 additions
and
8 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 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,70 @@ | ||
<?php | ||
|
||
/** | ||
* Class Php72ObjectTypeClass | ||
* | ||
* @method object getObject() | ||
* @method \IteratorIterator getClassObject() | ||
* | ||
* @property object $magicObject | ||
* @property \SplStack $magicClassObject | ||
*/ | ||
class Php72ObjectTypeClass { | ||
|
||
/** | ||
* @var object | ||
*/ | ||
public $object; | ||
|
||
/** | ||
* @var \ArrayObject | ||
*/ | ||
public $class; | ||
|
||
function objectReturn(): object { | ||
return new stdClass(); | ||
} | ||
|
||
function objectParam(object $param) {} | ||
|
||
/** | ||
* @param object $param | ||
*/ | ||
function objectParamPhpDoc($param) {} | ||
|
||
public function classParam(SplFileInfo $file) {} | ||
|
||
/** | ||
* @param \SplFileInfo $file | ||
*/ | ||
public function classParamPhpDoc($file) {} | ||
|
||
/** | ||
* @return object | ||
*/ | ||
public function objectReturnPhpDoc() { | ||
return new stdClass(); | ||
} | ||
|
||
function stringReturn(): string { | ||
return ''; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
function stringReturnPhpDoc() { | ||
return ''; | ||
} | ||
|
||
function classReturn(): DateTime { | ||
return new DateTime(); | ||
} | ||
|
||
/** | ||
* @return \DateTime | ||
*/ | ||
function classReturnPhpDoc() { | ||
return new DateTime(); | ||
} | ||
} |
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,15 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<phpdox xmlns="http://xml.phpdox.net/config" silent="false"> | ||
|
||
<project name="phpDox-issue" source="${basedir}/src" workdir="${basedir}/xml"> | ||
|
||
<collector publiconly="false" backend="parser" /> | ||
|
||
<generator output="${basedir}/docs"> | ||
<build engine="html" enabled="true" output="html" /> | ||
<build engine="xml" enabled="true" output="xml" /> | ||
</generator> | ||
|
||
</project> | ||
|
||
</phpdox> |