Skip to content

Conversation

kamil-zacek
Copy link
Contributor

Fix when argument of array_column is non-empty-list with mixed array, also return value is non-empty-string

<?php declare(strict_types = 1);

use function PHPStan\dumpType;
use function PHPStan\Testing\assertType;

class HelloWorld
{
	/**
	 * @param non-empty-list<array<string, mixed>> $list
	 */
	public function testList1(array $list): void
	{
		assertType('non-empty-list<mixed>', array_column($list, 'value'));
	}
}

@kamil-zacek kamil-zacek force-pushed the non-empty-list-array-column branch from d335e56 to 7b60a47 Compare June 21, 2025 09:41
@kamil-zacek kamil-zacek deleted the non-empty-list-array-column branch June 21, 2025 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant