Skip to content
Permalink
Browse files

Add test for docblock-defined param types

  • Loading branch information
muglug committed Dec 3, 2019
1 parent 97de060 commit 585ef0644d02d7f68aa90af524e96fe17ec51a94
Showing with 30 additions and 0 deletions.
  1. +30 −0 tests/FileManipulation/ParamTypeManipulationTest.php
@@ -78,6 +78,36 @@ public function fooFoo(string $a): void {}
['MissingParamType'],
true,
],
'noStringParamTypeWithDocblockCall' => [
'<?php
class C {
public function fooFoo($a): void {}
}
/**
* @param string $a
*/
function callsWithString($a): void {
(new C)->fooFoo($a);
}',
'<?php
class C {
/**
* @param string $a
*/
public function fooFoo($a): void {}
}
/**
* @param string $a
*/
function callsWithString($a): void {
(new C)->fooFoo($a);
}',
'7.1',
['MissingParamType'],
true,
],
'noStringParamType56' => [
'<?php
class C {

0 comments on commit 585ef06

Please sign in to comment.
You can’t perform that action at this time.