for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author Boris Guéry <[email protected]>
*/
namespace Bgy\OAuth2\GrantType;
class MissingOrInvalidInputData extends \InvalidArgumentException
{
private $inputDataKeys = [];
private $requiredDataKeys = [];
public function __construct($grantTypeIdentifier, array $inputDataKeys, array $requiredDataKeys)
$this->inputDataKeys = $inputDataKeys;
$this->requiredDataKeys = $requiredDataKeys;
parent::__construct(sprintf(
'The grant_type "%s" requires the following data : "%s" but got "%s"',
$grantTypeIdentifier,
rtrim(implode(', ', $requiredDataKeys), ", "),
rtrim(implode(', ', $inputDataKeys), ", ")
));
}
public function getRequiredDataKeys()
return $this->requiredDataKeys;
public function getInputDataKeys()
return $this->inputDataKeys;