Skip to content

Commit

Permalink
hideved, csfixed
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverFire committed May 5, 2017
1 parent a60b417 commit a041e6b
Show file tree
Hide file tree
Showing 25 changed files with 286 additions and 143 deletions.
34 changes: 22 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,39 @@
# vendor dirs
vendor

# composer lock files
composer.lock

# hidev internals
.hidev/composer.json
.hidev/composer.lock
.hidev/runtime
.hidev/vendor
hidev-local.yml

# IDE & OS files
.*.swp
.idea
nbproject
.DS_Store
.buildpath
.idea
.project
.settings
Thumbs.db
.DS_Store
nbproject

# vendor dirs
vendor

# composer lock files
composer.lock

# php-cs-fixer cache
.php_cs.cache

# phpunit generated files
coverage.clover

# Binaries
chkipper.phar
composer.phar
ocular.phar
php-cs-fixer.phar
phpunit-skelgen.phar
phpunit.phar

# Codeception generated files
tests/_support/_generated

# php-cs-fixer cache
.php_cs.cache
18 changes: 0 additions & 18 deletions .hidev/commits.md

This file was deleted.

71 changes: 37 additions & 34 deletions .php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,45 +6,48 @@ OKPAY driver for Omnipay PHP payment library
@link https://github.com/hiqdev/omnipay-okpay
@package omnipay-okpay
@license MIT
@copyright Copyright (c) 2015, HiQDev (http://hiqdev.com/)
@copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
EOF;

Symfony\CS\Fixer\Contrib\HeaderCommentFixer::setHeader($header);

return Symfony\CS\Config\Config::create()
return PhpCsFixer\Config::create()
->setUsingCache(true)
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
->fixers([
'-long_array_syntax', /// Arrays should use the long syntax.
'-php4_constructor', /// Convert PHP4-style constructors to __construct. Warning! This could change code behavior.
'-phpdoc_var_to_type', /// @var should always be written as @type.
'-align_double_arrow', /// Align double arrow symbols in consecutive lines.
'-unalign_double_arrow', /// Unalign double arrow symbols in consecutive lines.
'-align_equals', /// Align equals symbols in consecutive lines.
'-unalign_equals', /// Unalign equals symbols in consecutive lines.
'-blankline_after_open_tag', /// Ensure there is no code on the same line as the PHP open tag and it is followed by a blankline.
'-phpdoc_no_empty_return', /// @return void and @return null annotations should be omitted from phpdocs.
'-empty_return', /// A return statement wishing to return nothing should be simply "return".
'-return', /// An empty line feed should precede a return statement.
'header_comment', /// Add, replace or remove header comment.
'concat_with_spaces', /// Concatenation should be used with at least one whitespace around.
'ereg_to_preg', /// Replace deprecated ereg regular expression functions with preg. Warning! This could change code behavior.
'multiline_spaces_before_semicolon', /// Multi-line whitespace before closing semicolon are prohibited.
'newline_after_open_tag', /// Ensure there is no code on the same line as the PHP open tag.
'single_blank_line_before_namespace', /// There should be no blank lines before a namespace declaration.
'ordered_use', /// Ordering use statements.
'phpdoc_order', /// Annotations in phpdocs should be ordered so that @param come first, then @throws, then @return.
'pre_increment', /// Pre incrementation/decrementation should be used if possible.
'short_array_syntax', /// PHP arrays should use the PHP 5.4 short-syntax.
'strict', /// Comparison should be strict. Warning! This could change code behavior.
'strict_param', /// Functions should be used with $strict param. Warning! This could change code behavior.
])
->finder(
Symfony\CS\Finder\DefaultFinder::create()
->setRiskyAllowed(true)
->setRules(array(
'@Symfony' => true,
'header_comment' => [
'header' => $header,
'separate' => 'bottom',
'location' => 'after_declare_strict',
'commentType' => 'PHPDoc',
],
'binary_operator_spaces' => [
'align_double_arrow' => null,
'align_equals' => null,
],
'concat_space' => ['spacing' => 'one'],
'array_syntax' => ['syntax' => 'short'],
'phpdoc_no_alias_tag' => ['replacements' => ['type' => 'var']],
'blank_line_before_return' => false,
'phpdoc_align' => false,
'phpdoc_scalar' => false,
'phpdoc_separation' => false,
'phpdoc_to_comment' => false,
'method_argument_space' => false,
'ereg_to_preg' => true,
'blank_line_after_opening_tag' => true,
'single_blank_line_before_namespace' => true,
'ordered_imports' => true,
'phpdoc_order' => true,
'pre_increment' => true,
'strict_comparison' => true,
'strict_param' => true,
'no_multiline_whitespace_before_semicolons' => true,
))
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__)
->notPath('vendor')
->notPath('runtime')
->notPath('web/assets')
->notPath('tests/unit/UnitTester.php')
)
)
;
22 changes: 12 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
language: php
php:
- 5.4
- 5.5
- 5.6
- 7
- 7.1
- hhvm
dist: trusty
matrix:
allow_failures:
-
php: 7
-
php: hhvm
cache:
directories:
- $HOME/.composer/cache
before_install:
- 'composer self-update'
- 'composer --version'
- 'wget http://hiqdev.com/hidev/hidev.phar -O hidev.phar && chmod a+x hidev.phar'
- './hidev.phar --version'
- './hidev.phar travis/before-install'
sudo: false
install:
- 'travis_retry composer self-update 1.0.0-alpha11'
- 'travis_retry composer global require "fxp/composer-asset-plugin:~1.1" "yiisoft/yii2-composer:~2.0"'
- 'travis_retry composer global require "hiqdev/hidev:*@dev" "phpunit/phpunit:^4.8" "phpunit/phpunit-skeleton-generator:*" "fabpot/php-cs-fixer:*"'
- 'travis_retry composer install --no-interaction'
- '$HOME/.composer/vendor/bin/hidev travis/install'
- './hidev.phar travis/install'
script:
- '$HOME/.composer/vendor/bin/hidev travis/script'
- './hidev.phar travis/script'
after_script:
- './hidev.phar travis/after-script'
21 changes: 15 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
hiqdev/omnipay-okpay changelog
------------------------------
hiqdev/omnipay-okpay commits history
------------------------------------

## Under development
## [Under development]

- Redone to `omnipay-okpay`
- Added basics
- Redone to `omnipay-okpay` ([@hiqsol])
- Added basics ([@hiqsol])

## Development started 2015-10-23
## [Development started] - 2015-10-23

[@hiqsol]: https://github.com/hiqsol
[[email protected]]: https://github.com/hiqsol
[@SilverFire]: https://github.com/SilverFire
[[email protected]]: https://github.com/SilverFire
[@tafid]: https://github.com/tafid
[[email protected]]: https://github.com/tafid
[@BladeRoot]: https://github.com/BladeRoot
[[email protected]]: https://github.com/BladeRoot
[Under development]: https://github.com/hiqdev/omnipay-okpay/releases
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright © 2015, HiQDev (http://hiqdev.com/)
Copyright © 2015-2017, HiQDev (http://hiqdev.com/)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Omnipay: OKPAY
==============
# Omnipay: OKPAY

**OKPAY driver for Omnipay PHP payment library**

[![Latest Stable Version](https://poser.pugx.org/hiqdev/omnipay-okpay/v/stable)](https://packagist.org/packages/hiqdev/omnipay-okpay)
[![Total Downloads](https://poser.pugx.org/hiqdev/omnipay-okpay/downloads)](https://packagist.org/packages/hiqdev/omnipay-okpay)
[![Build Status](https://img.shields.io/travis/hiqdev/omnipay-okpay.svg)](https://travis-ci.org/hiqdev/omnipay-okpay)
[![Scrutinizer Code Coverage](https://img.shields.io/scrutinizer/coverage/g/hiqdev/omnipay-okpay.svg)](https://scrutinizer-ci.com/g/hiqdev/omnipay-okpay/)
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/hiqdev/omnipay-okpay.svg)](https://scrutinizer-ci.com/g/hiqdev/omnipay-okpay/)
[![Dependency Status](https://www.versioneye.com/php/hiqdev:omnipay-okpay/dev-master/badge.svg)](https://www.versioneye.com/php/hiqdev:omnipay-okpay/dev-master)

[Omnipay](https://github.com/omnipay/omnipay) is a framework agnostic, multi-gateway payment
Expand Down Expand Up @@ -35,4 +36,4 @@ to the require section of your composer.json.
This project is released under the terms of the MIT [license](LICENSE).
Read more [here](http://choosealicense.com/licenses/mit).

Copyright © 2015, HiQDev (http://hiqdev.com/)
Copyright © 2015-2017, HiQDev (http://hiqdev.com/)
33 changes: 33 additions & 0 deletions chkipper.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "hiqdev/omnipay-okpay",
"authors": {
"hiqsol": {
"name": "Andrii Vasyliev",
"role": "Project lead",
"email": "[email protected]",
"github": "https://github.com/hiqsol",
"homepage": "http://hipanel.com/"
},
"SilverFire": {
"name": "Dmitry Naumenko",
"role": "Lead backend developer",
"email": "[email protected]",
"github": "https://github.com/SilverFire",
"homepage": "http://silverfire.me/"
},
"tafid": {
"name": "Andrey Klochok",
"role": "Lead frontend developer",
"email": "[email protected]",
"github": "https://github.com/tafid",
"homepage": "http://hiqdev.com/"
},
"BladeRoot": {
"name": "Yuriy Myronchuk",
"role": "QA Lead",
"email": "[email protected]",
"github": "https://github.com/BladeRoot",
"homepage": "http://hiqdev.com/"
}
}
}
File renamed without changes.
49 changes: 49 additions & 0 deletions history.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
hiqdev/omnipay-okpay commits history
------------------------------------

## [Under development]

- Added tests
- [a60b417] 2017-05-05 Merge branch 'bladeroot-omnipay-okpay-tests' [@SilverFire]
- [9cfd609] 2017-04-03 tests [@BladeRoot]
- [3a07721] 2017-04-03 init test [@BladeRoot]
- [359b4bf] 2017-03-27 added get/setPurse, made account parameter mandatory [@hiqsol]
- [f970bb3] 2017-03-27 added actual classes [@hiqsol]
- [0259525] 2017-03-27 changed namespace to Omnipay\\Okpay [@hiqsol]
- Redone to `omnipay-okpay`
- [7708d64] 2015-12-11 removed assets, now in `payment-icons` [@hiqsol]
- [1ce45db] 2015-11-11 fixed namespace [@hiqsol]
- [1dd193e] 2015-11-09 php-cs-fixed [@hiqsol]
- [a70ff20] 2015-11-08 started redoing to omnipay-okpay [@hiqsol]
- Added basics
- [6448eb3] 2015-10-30 changed: redone to `system` <- `name` [@hiqsol]
- [ad4dd3b] 2015-10-23 php-cs-fixed [@hiqsol]
- [5bd56b7] 2015-10-23 hideved [@hiqsol]
- [7860d5e] 2015-10-23 inited [@hiqsol]
## Development started 2015-10-23

## [Development started] - 2015-10-23

[@hiqsol]: https://github.com/hiqsol
[[email protected]]: https://github.com/hiqsol
[@SilverFire]: https://github.com/SilverFire
[[email protected]]: https://github.com/SilverFire
[@tafid]: https://github.com/tafid
[[email protected]]: https://github.com/tafid
[@BladeRoot]: https://github.com/BladeRoot
[[email protected]]: https://github.com/BladeRoot
[7708d64]: https://github.com/hiqdev/omnipay-okpay/commit/7708d64
[1ce45db]: https://github.com/hiqdev/omnipay-okpay/commit/1ce45db
[1dd193e]: https://github.com/hiqdev/omnipay-okpay/commit/1dd193e
[a70ff20]: https://github.com/hiqdev/omnipay-okpay/commit/a70ff20
[6448eb3]: https://github.com/hiqdev/omnipay-okpay/commit/6448eb3
[ad4dd3b]: https://github.com/hiqdev/omnipay-okpay/commit/ad4dd3b
[5bd56b7]: https://github.com/hiqdev/omnipay-okpay/commit/5bd56b7
[7860d5e]: https://github.com/hiqdev/omnipay-okpay/commit/7860d5e
[a60b417]: https://github.com/hiqdev/omnipay-okpay/commit/a60b417
[9cfd609]: https://github.com/hiqdev/omnipay-okpay/commit/9cfd609
[3a07721]: https://github.com/hiqdev/omnipay-okpay/commit/3a07721
[359b4bf]: https://github.com/hiqdev/omnipay-okpay/commit/359b4bf
[f970bb3]: https://github.com/hiqdev/omnipay-okpay/commit/f970bb3
[0259525]: https://github.com/hiqdev/omnipay-okpay/commit/0259525
[Under development]: https://github.com/hiqdev/omnipay-okpay/releases
20 changes: 14 additions & 6 deletions src/Gateway.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
<?php
/**
* OKPAY driver for Omnipay PHP payment library.
*
* @link https://github.com/hiqdev/omnipay-okpay
* @package omnipay-okpay
* @license MIT
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace Omnipay\OKPAY;

use Omnipay\Common\AbstractGateway;

/**
* Gateway Class
* Gateway Class.
*/
class Gateway extends AbstractGateway
{
Expand Down Expand Up @@ -36,23 +44,23 @@ public function setSecret($value)

public function getDefaultParameters()
{
return array(
return [
'purse' => '',
'secret' => '',
);
];
}

public function purchase(array $parameters = array())
public function purchase(array $parameters = [])
{
return $this->createRequest('\Omnipay\OKPAY\Message\PurchaseRequest', $parameters);
}

public function completePurchase(array $parameters = array())
public function completePurchase(array $parameters = [])
{
return $this->createRequest('\Omnipay\OKPAY\Message\CompletePurchaseRequest', $parameters);
}

public function refund(array $parameters = array())
public function refund(array $parameters = [])
{
return $this->createRequest('\Omnipay\OKPAY\Message\RefundRequest', $parameters);
}
Expand Down
8 changes: 8 additions & 0 deletions src/Message/AbstractRequest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
/**
* OKPAY driver for Omnipay PHP payment library.
*
* @link https://github.com/hiqdev/omnipay-okpay
* @package omnipay-okpay
* @license MIT
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/

namespace Omnipay\OKPAY\Message;

Expand Down
Loading

0 comments on commit a041e6b

Please sign in to comment.