spekulatius / PHPScraper

A universal web-util for PHP.
https://phpscraper.de
GNU General Public License v3.0
509 stars 73 forks source link

Fix problems reported by PHPStan #191

Open szepeviktor opened 10 months ago

szepeviktor commented 10 months ago

It would be nice to have a UsesXPathFilters::filterExtractAttribute beside filterExtractAttributes. One would return array<string>, the other array<array<string>>.

spekulatius commented 10 months ago

Which use-cases do you want to cover? You could also try filterFirstExtractAttribute to see if it works for your needs.

szepeviktor commented 10 months ago

Which use-cases do you want to cover?

To make static analysis possible. Because the return types are different.

I know, I know. Popular software come with the liberty of using one method for several purposes. But I am not intended to be popular!

spekulatius commented 10 months ago

Okay, feel free to propose a PR :) Maybe after we got the PHPStan branch merged?

szepeviktor commented 10 months ago

I do not have plans to contribute more.

spekulatius commented 10 months ago

Okay