Skip to content

Fix ArrayColumnHelper for non-empty-list<array<string, mixed>> to ret… #4069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

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