-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
462 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
language: php | ||
|
||
php: | ||
- 5.3 | ||
- 5.4 | ||
- 5.5 | ||
- hhvm | ||
|
||
env: | ||
- WP_VERSION=latest WP_MULTISITE=0 | ||
- WP_VERSION=latest WP_MULTISITE=1 | ||
- WP_VERSION=3.5.1 WP_MULTISITE=0 | ||
- WP_VERSION=3.5.1 WP_MULTISITE=1 | ||
|
||
before_script: | ||
- composer install | ||
- wget https://raw.githubusercontent.com/wp-cli/sample-plugin/master/bin/install-wp-tests.sh | ||
- bash install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION | ||
|
||
after_script: | ||
- php vendor/bin/coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Changelog | ||
|
||
## 1.0.0 | ||
* First release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
module.exports = function( grunt ) { | ||
// Project configuration. | ||
grunt.initConfig( { | ||
// Package | ||
pkg: grunt.file.readJSON( 'package.json' ), | ||
|
||
// JSHint | ||
jshint: { | ||
all: [ 'Gruntfile.js', 'composer.json', 'package.json' ] | ||
}, | ||
|
||
// PHP Code Sniffer | ||
phpcs: { | ||
application: { | ||
dir: [ 'src', 'tests' ], | ||
}, | ||
options: { | ||
standard: 'phpcs.ruleset.xml', | ||
extensions: 'php', | ||
ignore: 'node_modules' | ||
} | ||
}, | ||
|
||
// PHPLint | ||
phplint: { | ||
options: { | ||
phpArgs: { | ||
'-lf': null | ||
} | ||
}, | ||
all: [ 'src/**/*.php', 'tests/**/*.php' ] | ||
}, | ||
|
||
// PHP Mess Detector | ||
phpmd: { | ||
application: { | ||
dir: 'src' | ||
}, | ||
options: { | ||
exclude: 'node_modules', | ||
reportFormat: 'xml', | ||
rulesets: 'phpmd.ruleset.xml' | ||
} | ||
}, | ||
} ); | ||
|
||
grunt.loadNpmTasks( 'grunt-contrib-jshint' ); | ||
grunt.loadNpmTasks( 'grunt-phpcs' ); | ||
grunt.loadNpmTasks( 'grunt-phplint' ); | ||
grunt.loadNpmTasks( 'grunt-phpmd' ); | ||
|
||
// Default task(s). | ||
grunt.registerTask( 'default', [ 'jshint', 'phplint', 'phpmd', 'phpcs' ] ); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"name": "pay-nl", | ||
"version": "1.0.0", | ||
"description": "Pay.nl driver for the WordPress payment processing library.", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/wp-pay-gateways/pay-nl" | ||
}, | ||
"keywords": [ | ||
"wordpress", | ||
"wp", | ||
"pay", | ||
"pay-nl", | ||
"ideal", | ||
"gateway", | ||
"pronamic" | ||
], | ||
"author": { | ||
"name": "Pronamic", | ||
"email": "info@pronamic.nl", | ||
"url": "http://www.pronamic.nl/" | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "Remco Tolsma", | ||
"email": "info@remcotolsma.nl", | ||
"url": "http://www.remcotolsma.nl/" | ||
} | ||
], | ||
"license": "GPL", | ||
"bugs": { | ||
"url": "https://github.com/wp-pay-gateways/pay-nl/issues" | ||
}, | ||
"homepage": "http://www.wp-pay.org/gateways/pay-nl/", | ||
"devDependencies": { | ||
"grunt": "~0.4.5", | ||
"grunt-phplint": "0.0.5", | ||
"grunt-phpmd": "^0.1.1", | ||
"grunt-phpcs": "^0.2.3", | ||
"grunt-contrib-jshint": "^0.10.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="WordPress Pay Pay.nl rules"> | ||
<rule ref="WordPress"> | ||
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" /> | ||
<exclude name="PEAR.Functions.FunctionCallSignature.Indent" /> | ||
<exclude name="WordPress.VIP.RestrictedFunctions.wp_remote_get" /> | ||
</rule> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0"?> | ||
|
||
<ruleset name="WordPress Pay Pay.nl rules" | ||
xmlns="http://pmd.sf.net/ruleset/1.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" | ||
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd" | ||
> | ||
<rule ref="rulesets/cleancode.xml"> | ||
<exclude name="StaticAccess" /> | ||
</rule> | ||
|
||
<rule ref="rulesets/codesize.xml" /> | ||
|
||
<rule ref="rulesets/design.xml" /> | ||
|
||
<rule ref="rulesets/naming.xml" /> | ||
|
||
<rule ref="rulesets/unusedcode.xml"> | ||
<exclude name="UnusedFormalParameter" /> | ||
</rule> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
/** | ||
* Title: Pay.nl error | ||
* Description: | ||
* Copyright: Copyright (c) 2005 - 2014 | ||
* Company: Pronamic | ||
* @author Remco Tolsma | ||
* @version 1.0.0 | ||
*/ | ||
class Pronamic_WP_Pay_Gateways_PayNL_Error { | ||
/** | ||
* Pay.nl error ID | ||
* | ||
* @var string | ||
*/ | ||
private $id; | ||
|
||
/** | ||
* Pay.nl error message | ||
* | ||
* @var string | ||
*/ | ||
private $message; | ||
|
||
///////////////////////////////////////////////// | ||
|
||
/** | ||
* Constructs and initializes an Pay.nl error object | ||
* | ||
* @param string $id | ||
* @param string $message | ||
*/ | ||
public function __construct( $id, $message ) { | ||
$this->id = $id; | ||
$this->message = $message; | ||
} | ||
|
||
////////////////////////////////////////////////// | ||
|
||
// @todo getters and setters | ||
|
||
////////////////////////////////////////////////// | ||
|
||
/** | ||
* Create an string representation of this object | ||
* | ||
* @return string | ||
*/ | ||
public function __toString() { | ||
return $this->id . ' ' . $this->message; | ||
} | ||
} |
Oops, something went wrong.