muxinc / mux-php

Official Mux API wrapper for PHP projects, supporting both Mux Data and Mux Video.
MIT License
40 stars 30 forks source link

setPlaybackPolicy accepted types #88

Open vitvavra opened 5 months ago

vitvavra commented 5 months ago

The method MuxPhp\Models\CreateAssetRequest::setPlaybackPolicy probably has an incorrect type of the playback_policy parameter in docblock:

    /** @param \MuxPhp\Models\PlaybackPolicy[]|null $playback_policy */

Should be either

    /** @param string[]|null $playback_policy */

or any other alternative:

    /** @param array<int, \MuxPhp\Models\PlaybackPolicy::*>|null $playback_policy */

I do not know where the sources are generated from, but propably it is not just this single method with the wrong type specified when it does expect enum. This could be fixed either by changing the PlaybackPolicy to enum or updating the type to a working one.