mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
29 lines
629 B
PHP
29 lines
629 B
PHP
<?php
|
|
namespace Psalm\Tests;
|
|
|
|
class ForeachTest extends TestCase
|
|
{
|
|
use Traits\FileCheckerInvalidCodeParseTestTrait;
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
public function providerFileCheckerInvalidCodeParse()
|
|
{
|
|
return [
|
|
'continueOutsideLoop' => [
|
|
'<?php
|
|
continue;',
|
|
'error_message' => 'ContinueOutsideLoop',
|
|
],
|
|
'invalidIterator' => [
|
|
'<?php
|
|
foreach (5 as $a) {
|
|
|
|
}',
|
|
'error_message' => 'InvalidIterator',
|
|
],
|
|
];
|
|
}
|
|
}
|