Refactor SettingsAddSignature to ensure 'name' parameter is cast to string for proper handling and remove unnecessary exception handling for missing parameter.
https://github.com/nosial/Socialbox-PHP/issues/56
This commit is contained in:
parent
7aafd0334e
commit
9806c317e9
1 changed files with 1 additions and 6 deletions
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace Socialbox\Classes\StandardMethods\Settings;
|
namespace Socialbox\Classes\StandardMethods\Settings;
|
||||||
|
|
||||||
use Exception;
|
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use Socialbox\Abstracts\Method;
|
use Socialbox\Abstracts\Method;
|
||||||
use Socialbox\Classes\Configuration;
|
use Socialbox\Classes\Configuration;
|
||||||
|
@ -33,15 +32,11 @@
|
||||||
{
|
{
|
||||||
$expires = (int)$rpcRequest->getParameter('expires');
|
$expires = (int)$rpcRequest->getParameter('expires');
|
||||||
}
|
}
|
||||||
if(!$rpcRequest->containsParameter('name'))
|
|
||||||
{
|
|
||||||
throw new MissingRpcArgumentException('name');
|
|
||||||
}
|
|
||||||
|
|
||||||
$name = null;
|
$name = null;
|
||||||
if($rpcRequest->containsParameter('name'))
|
if($rpcRequest->containsParameter('name'))
|
||||||
{
|
{
|
||||||
$name = $rpcRequest->getParameter('name');
|
$name = (string)$rpcRequest->getParameter('name');
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
Loading…
Add table
Reference in a new issue