Automattic/php-push

View on GitHub
src/model/APNSPriority.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php
declare( strict_types = 1 );

class APNSPriority {
    public const IMMEDIATE = 10;
    public const THROTTLED = 5;

    public static function is_valid( int $key ): bool {
        return in_array(
            $key,
            [
                self::IMMEDIATE,
                self::THROTTLED,
            ],
            true
        );
    }
}