Conversation
|
Thanks for the contribution, i'll check why the pipelines fail, after that we can merge this |
|
The check is failing because Traits\BinaryFlags::getAllFlags() is marked @return array<int, string> but the code at line 51 would permit the method to return an array with a string key. It appears that was not your intent, because in your example usage the constants are integers, and the code at line 67 would fail if the result of getAllFlags had string keys. I have modified my pull request by casting $flag to int in line 51 in Traits\BinaryFlags::getAllFlags(). This should fix the falied check. If instead you want to preserve the apparently inadvertent option of using numeric string constants instead, you would have to change Traits\BinaryFlags::getAllFlags() to @return array<int, string>. You would also have to change Traits\BinaryFlags::getFlagNames() to @return string|array<int|string, string> and cast $carry to int in line 67. |
…eturns an array with integer keys
|
Looks like the php 8.0 check failed because the script cannot set it up. Maybe you need to change the php requirement in composer.json to 8.1 and drop the 8.0 check? |
I've dropped 8.0 now since it's end of support #14 |
Fix php 8.4 deprecation