1 | <?php |
||
34 | class RelationInformation extends AbstractInformation |
||
35 | { |
||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $question = 'Seems like <fg=green>%s</> is a Relation. Would you like to create new Seeder for it? '; |
||
40 | |||
41 | /** |
||
42 | * @return string |
||
43 | */ |
||
44 | public function getDefaultValue() |
||
48 | |||
49 | /** |
||
50 | * @return array |
||
|
|||
51 | */ |
||
52 | public function getChoices() |
||
56 | |||
57 | /** |
||
58 | * @return int |
||
59 | */ |
||
60 | public function getType() |
||
64 | } |
||
65 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.If the return type contains the type array, this check recommends the use of a more specific type like
String[]
orarray<String>
.