|
@@ 1296-1304 (lines=9) @@
|
| 1293 |
|
* @param string $type |
| 1294 |
|
* @param \ReflectionProperty $property |
| 1295 |
|
*/ |
| 1296 |
|
private function assertPhpDocVarType($type, \ReflectionProperty $property) |
| 1297 |
|
{ |
| 1298 |
|
$docComment = $property->getDocComment(); |
| 1299 |
|
$regex = '/@var\s+([\S]+)$/m'; |
| 1300 |
|
|
| 1301 |
|
self::assertRegExp($regex, $docComment); |
| 1302 |
|
self::assertEquals(1, preg_match($regex, $docComment, $matches)); |
| 1303 |
|
self::assertEquals($type, $matches[1]); |
| 1304 |
|
} |
| 1305 |
|
|
| 1306 |
|
/** |
| 1307 |
|
* @param string $type |
|
@@ 1310-1318 (lines=9) @@
|
| 1307 |
|
* @param string $type |
| 1308 |
|
* @param \ReflectionMethod $method |
| 1309 |
|
*/ |
| 1310 |
|
private function assertPhpDocReturnType($type, \ReflectionMethod $method) |
| 1311 |
|
{ |
| 1312 |
|
$docComment = $method->getDocComment(); |
| 1313 |
|
$regex = '/@return\s+([\S]+)(\s+.*)$/m'; |
| 1314 |
|
|
| 1315 |
|
self::assertRegExp($regex, $docComment); |
| 1316 |
|
self::assertEquals(1, preg_match($regex, $docComment, $matches)); |
| 1317 |
|
self::assertEquals($type, $matches[1]); |
| 1318 |
|
} |
| 1319 |
|
|
| 1320 |
|
/** |
| 1321 |
|
* @param string $type |