|
@@ 1144-1152 (lines=9) @@
|
| 1141 |
|
* @param string $type |
| 1142 |
|
* @param \ReflectionProperty $property |
| 1143 |
|
*/ |
| 1144 |
|
private function assertPhpDocVarType($type, \ReflectionProperty $property) |
| 1145 |
|
{ |
| 1146 |
|
$docComment = $property->getDocComment(); |
| 1147 |
|
$regex = '/@var\s+([\S]+)$/m'; |
| 1148 |
|
|
| 1149 |
|
$this->assertRegExp($regex, $docComment); |
| 1150 |
|
$this->assertEquals(1, preg_match($regex, $docComment, $matches)); |
| 1151 |
|
$this->assertEquals($type, $matches[1]); |
| 1152 |
|
} |
| 1153 |
|
|
| 1154 |
|
/** |
| 1155 |
|
* @param string $type |
|
@@ 1158-1166 (lines=9) @@
|
| 1155 |
|
* @param string $type |
| 1156 |
|
* @param \ReflectionMethod $method |
| 1157 |
|
*/ |
| 1158 |
|
private function assertPhpDocReturnType($type, \ReflectionMethod $method) |
| 1159 |
|
{ |
| 1160 |
|
$docComment = $method->getDocComment(); |
| 1161 |
|
$regex = '/@return\s+([\S]+)(\s+.*)$/m'; |
| 1162 |
|
|
| 1163 |
|
$this->assertRegExp($regex, $docComment); |
| 1164 |
|
$this->assertEquals(1, preg_match($regex, $docComment, $matches)); |
| 1165 |
|
$this->assertEquals($type, $matches[1]); |
| 1166 |
|
} |
| 1167 |
|
|
| 1168 |
|
/** |
| 1169 |
|
* @param string $type |