mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Fix strict type issues
This commit is contained in:
parent
b85e0eebc1
commit
3cdca37e85
24 changed files with 76 additions and 61 deletions
|
@ -190,6 +190,8 @@ class PoolBuilderTest extends TestCase
|
|||
$fixturesDir = realpath(__DIR__.'/Fixtures/poolbuilder/');
|
||||
$tests = array();
|
||||
foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($fixturesDir), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
|
||||
$file = (string) $file;
|
||||
|
||||
if (!Preg::isMatch('/\.test$/', $file)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -220,13 +222,11 @@ class PoolBuilderTest extends TestCase
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \SplFileInfo $file
|
||||
* @param string $fixturesDir
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function readTestFile(\SplFileInfo $file, string $fixturesDir): array
|
||||
protected function readTestFile(string $file, string $fixturesDir): array
|
||||
{
|
||||
$tokens = Preg::split('#(?:^|\n*)--([A-Z-]+)--\n#', file_get_contents($file->getRealPath()), -1, PREG_SPLIT_DELIM_CAPTURE);
|
||||
$tokens = Preg::split('#(?:^|\n*)--([A-Z-]+)--\n#', file_get_contents($file), -1, PREG_SPLIT_DELIM_CAPTURE);
|
||||
|
||||
$sectionInfo = array(
|
||||
'TEST' => true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue