for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PHPSC\PagSeguro\Requests\PreApprovals;
/**
* @author Luís Otávio Cobucci Oblonczyk <[email protected]>
*/
class Period
{
* @var string
const WEEKLY = 'WEEKLY';
const MONTHLY = 'MONTHLY';
const BIMONTHLY = 'BIMONTHLY';
const TRIMONTHLY = 'TRIMONTHLY';
const SEMESTRALLY = 'SEMIANNUALLY';
const YEARLY = 'YEARLY';
* @return array
protected static function getPeriods()
return [
static::WEEKLY,
static::MONTHLY,
static::BIMONTHLY,
static::TRIMONTHLY,
static::SEMESTRALLY,
static::YEARLY
];
}
* @param string $period
*
* @return boolean
public static function isValid($period)
return in_array($period, static::getPeriods());