|
@@ 1241-1249 (lines=9) @@
|
| 1238 |
|
* @param string $type |
| 1239 |
|
* @param \ReflectionProperty $property |
| 1240 |
|
*/ |
| 1241 |
|
private function assertPhpDocVarType($type, \ReflectionProperty $property) |
| 1242 |
|
{ |
| 1243 |
|
$docComment = $property->getDocComment(); |
| 1244 |
|
$regex = '/@var\s+([\S]+)$/m'; |
| 1245 |
|
|
| 1246 |
|
$this->assertRegExp($regex, $docComment); |
| 1247 |
|
$this->assertEquals(1, preg_match($regex, $docComment, $matches)); |
| 1248 |
|
$this->assertEquals($type, $matches[1]); |
| 1249 |
|
} |
| 1250 |
|
|
| 1251 |
|
/** |
| 1252 |
|
* @param string $type |
|
@@ 1255-1263 (lines=9) @@
|
| 1252 |
|
* @param string $type |
| 1253 |
|
* @param \ReflectionMethod $method |
| 1254 |
|
*/ |
| 1255 |
|
private function assertPhpDocReturnType($type, \ReflectionMethod $method) |
| 1256 |
|
{ |
| 1257 |
|
$docComment = $method->getDocComment(); |
| 1258 |
|
$regex = '/@return\s+([\S]+)(\s+.*)$/m'; |
| 1259 |
|
|
| 1260 |
|
$this->assertRegExp($regex, $docComment); |
| 1261 |
|
$this->assertEquals(1, preg_match($regex, $docComment, $matches)); |
| 1262 |
|
$this->assertEquals($type, $matches[1]); |
| 1263 |
|
} |
| 1264 |
|
|
| 1265 |
|
/** |
| 1266 |
|
* @param string $type |