Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Commit

Permalink
fix readme issue and add UndefinedPropertyException
Browse files Browse the repository at this point in the history
  • Loading branch information
frostblogNet committed Feb 17, 2017
1 parent 385d724 commit e5e58ce
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 44 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
composer.phar
composer.lock
/vendor/


/docs/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Latest Version on Packagist](https://img.shields.io/packagist/v/heidel1pay/php-api.svg?style=flat-square)](https://packagist.org/packages/heidelpay/php-api)
[![Latest Version on Packagist](https://img.shields.io/packagist/v/heidelpay/php-api.svg?style=flat-square)](https://packagist.org/packages/heidelpay/php-api)
[![Coverage Status](https://coveralls.io/repos/github/heidelpay/php-api/badge.svg?branch=develop)](https://coveralls.io/github/heidelpay/php-api?branch=develop)
[![Build Status](https://travis-ci.org/heidelpay/php-api.svg?branch=develop)](https://travis-ci.org/heidelpay/php-api)

Expand Down
76 changes: 37 additions & 39 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,38 @@
{
"name": "heidelpay/php-api",
"description": "Client library for heidelpay payments.",
"license": "Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.",
"authors": [
{
"name": "Jens Richter"
},
{
"name": "Ronja Wann"
}
],
"require": {
"php" : ">=5.6.0",
"lib-curl" : "*",
"lib-openssl" : "*"
},
"require-dev": {
"phpunit/phpunit": "~5.7",
"friendsofphp/php-cs-fixer": "^2.0",
"satooshi/php-coveralls": "^1.0",
"heidelpay/phpdocumentor": "2.9.1"
},
"autoload": {
"psr-4": {
"Heidelpay\\PhpApi\\": "lib"
}
},
"support": {
"email": "development@heidelpay.de"
},
"homepage": "https://dev.heidelpay.de",
"type": "library",
"keywords": [
"payment-api",
"php",
"api",
"sdk"
]
}
"name" : "heidelpay/php-api",
"description" : "Client library for heidelpay payments.",
"license" : "Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.",
"authors" : [{
"name" : "Jens Richter"
}, {
"name" : "Ronja Wann"
}
],
"require" : {
"php" : ">=5.6.0",
"lib-curl" : "*",
"lib-openssl" : "*"
},
"require-dev" : {
"phpunit/phpunit" : "~5.7",
"friendsofphp/php-cs-fixer" : "^2.0",
"satooshi/php-coveralls" : "^1.0",
"heidelpay/phpdocumentor" : "2.9.1"
},
"autoload" : {
"psr-4" : {
"Heidelpay\\PhpApi\\" : "lib"
}
},
"support" : {
"email" : "development@heidelpay.de"
},
"homepage" : "https://dev.heidelpay.de",
"type" : "library",
"keywords" : [
"payment-api",
"php",
"api",
"sdk"
]
}
2 changes: 1 addition & 1 deletion lib/Adapter/CurlAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @category PhpApi
*/

class CurlAdapter extends AbstractAdapter
class CurlAdapter
{
/**
* send post request to payment server
Expand Down
22 changes: 22 additions & 0 deletions lib/Exceptions/UndefinedPropertyException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
namespace Heidelpay\PhpApi\Exceptions;

/**
* This class is used for indicating a use of an undefined property
*
* @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
* @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
*
* @link https://dev.heidelpay.de/PhpApi
*
* @author Jens Richter
*
* @package Heidelpay
* @subpackage PhpApi
* @category PhpApi
*/
use Exception;

class UndefinedPropertyException extends Exception
{
}
4 changes: 3 additions & 1 deletion lib/ParameterGroups/AbstractParameterGroup.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php
namespace Heidelpay\PhpApi\ParameterGroups;

use Heidelpay\PhpApi\Exceptions\UndefinedPropertyException;

/**
* The AbstractParameterGroup provides functions for every parameter group which extends this class
*
Expand Down Expand Up @@ -44,7 +46,7 @@ public function set($key, $value)
$this->$key = $value;
return $this;
} else {
throw new \Exception('Property does not exist: '.$key.' in '. $this->getClassName(), 500);
throw new UndefinedPropertyException('Property does not exist: '.$key.' in '. $this->getClassName(), 500);
}
}
}
1 change: 1 addition & 0 deletions phpdoc.dist.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<phpdocumentor>
<title>php-api</title>
<parser>
<default-package-name>PHP Payment Api</default-package-name>
<target>./docs/</target>
Expand Down

0 comments on commit e5e58ce

Please sign in to comment.