summaryrefslogtreecommitdiffstats
path: root/lib/SparkPost/APIResource.php
diff options
context:
space:
mode:
authorbeardyman <nornholdj@gmail.com>2015-10-07 15:44:44 -0400
committerbeardyman <nornholdj@gmail.com>2015-10-07 15:44:44 -0400
commit63022bf7bceb6aa7116159fd347be769594fa8b4 (patch)
treea3b7e904158fe2145673a1d54676672096675a5f /lib/SparkPost/APIResource.php
parentada533a743125008474de854a3f6bcec5c104fbe (diff)
downloadphp-sparkpost-63022bf7bceb6aa7116159fd347be769594fa8b4.zip
php-sparkpost-63022bf7bceb6aa7116159fd347be769594fa8b4.tar.gz
php-sparkpost-63022bf7bceb6aa7116159fd347be769594fa8b4.tar.bz2
removed unhittable code and removed a unit test for it. Updated code coverage filters in phpunit.xml to ignore test files because a utility function wasn't being used
Diffstat (limited to 'lib/SparkPost/APIResource.php')
-rw-r--r--lib/SparkPost/APIResource.php6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/SparkPost/APIResource.php b/lib/SparkPost/APIResource.php
index 3747f6d..a2cd5a6 100644
--- a/lib/SparkPost/APIResource.php
+++ b/lib/SparkPost/APIResource.php
@@ -48,7 +48,7 @@ class APIResource {
* @param string $mapKey a dot syntax path determining which value to set
* @param mixed $value value for the given path
*/
- protected function setMappedValue (&$model, $mapKey, $value) {
+ protected function setMappedValue(&$model, $mapKey, $value) {
//get mapping
if( empty(static::$parameterMappings) ) {
// if parameterMappings is empty we can assume that no wrapper is defined
@@ -180,10 +180,6 @@ class APIResource {
private function callResource( $action, $resourcePath=null, $options=[] ) {
$action = strtoupper($action); // normalize
- if( !in_array($action, ['POST', 'PUT', 'GET', 'DELETE'])) {
- throw new \Exception('Invalid resource action');
- }
-
$url = $this->buildUrl($resourcePath, $options);
$body = $this->buildBody($options);