src/OptionsRenderer.php
private function getAllows(array $methods)
    {
        $allows = [];
        foreach ($methods as $method) {
            if (in_array($method->name, ['onGet', 'onPost', 'onPut', 'onPatch', 'onDelete', 'onHead'], true)) {
                $allows[] = strtoupper(substr($method->name, 2));
            }
        }

        return $allows;
    }
private function getAllows(array $methods)
    {
        $allows = [];
        foreach ($methods as $method) {
            if (in_array($method->name, ['onGet', 'onPost', 'onPut', 'onPatch', 'onDelete', 'onHead'], true)) {
                $allows[] = strtoupper(substr($method->name, 2));
            }
        }

        return $allows;
    }
private function getAllows ( array $ methods ) { $ allows = [ ] ; foreach ( $ methods as $ method ) { if ( in_array ( $ method -> name , [ 'onGet' , 'onPost' , 'onPut' , 'onPatch' , 'onDelete' , 'onHead' ] , true ) ) { $ allows [ ] = strtoupper ( substr ( $ method -> name , 2 ) ) ; } } return $ allows ; }
Return allowed methods

@param \ReflectionMethod[] $methods

@return array
Return allowed methods