mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Fix tests
This commit is contained in:
parent
35fd64bf74
commit
951c3715f7
@ -7,6 +7,7 @@ Emitted when a `__toString` method does not always return a `string`
|
||||
|
||||
class A {
|
||||
public function __toString() {
|
||||
/** @psalm-suppress InvalidReturnStatement */
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -219,6 +219,19 @@ class ToStringTest extends TestCase
|
||||
}',
|
||||
'error_message' => 'InvalidToString',
|
||||
],
|
||||
'invalidInferredToStringReturnTypeWithTruePhp8' => [
|
||||
'<?php
|
||||
class A {
|
||||
function __toString() {
|
||||
/** @psalm-suppress InvalidReturnStatement */
|
||||
return true;
|
||||
}
|
||||
}',
|
||||
'error_message' => 'InvalidToString',
|
||||
[],
|
||||
false,
|
||||
'8.0'
|
||||
],
|
||||
'implicitCastWithStrictTypes' => [
|
||||
'<?php declare(strict_types=1);
|
||||
class A {
|
||||
|
Loading…
Reference in New Issue
Block a user