src/Connector/Projects.php
private function checkLicense(string $license): void
    {
        $accepted = ['proprietary', 'permissive_open_source', 'other_open_source'];

        // Ensure the license option is an allowed value
        if (!\in_array($license, $accepted)) {
            throw new \InvalidArgumentException(
                \sprintf(
                    'The license %s is not valid, accepted license values are %s',
                    $license,
                    \implode(', ', $accepted)
                )
            );
        }
    }
private function checkLicense(string $license): void
    {
        $accepted = ['proprietary', 'permissive_open_source', 'other_open_source'];

        // Ensure the license option is an allowed value
        if (!\in_array($license, $accepted)) {
            throw new \InvalidArgumentException(
                \sprintf(
                    'The license %s is not valid, accepted license values are %s',
                    $license,
                    \implode(', ', $accepted)
                )
            );
        }
    }
private function checkLicense ( string $ license ) : void { $ accepted = [ 'proprietary' , 'permissive_open_source' , 'other_open_source' ] ; // Ensure the license option is an allowed value if ( ! \ in_array ( $ license , $ accepted ) ) { throw new \ InvalidArgumentException ( \ sprintf ( 'The license %s is not valid, accepted license values are %s' , $ license , \ implode ( ', ' , $ accepted ) ) ) ; } }
Checks that a license is an accepted value.

@param string $license The license to check

@throws \InvalidArgumentException
Checks that a license is an accepted value .