From 99185e05d405e830e73668d1d89e5591c91e6ab3 Mon Sep 17 00:00:00 2001 From: Joshua Date: Tue, 13 Sep 2016 10:15:39 -0600 Subject: [PATCH 01/31] Added Codacy, Code Climate, and PHP Unit code coverage (Clover). --- README.md | 2 + build/logs/clover.xml | 1150 +++++++++++++++++++++++++++++++++++++++++ composer.json | 6 +- composer.lock | 819 +++++++++++++++++++++++++++-- 4 files changed, 1930 insertions(+), 47 deletions(-) create mode 100644 build/logs/clover.xml diff --git a/README.md b/README.md index d0df610..7917a01 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # PHP Trader Interface +[![Code Climate](https://codeclimate.com/github/LupeCode/phpTraderInterface/badges/gpa.svg)](https://codeclimate.com/github/LupeCode/phpTraderInterface) [![Test Coverage](https://codeclimate.com/github/LupeCode/phpTraderInterface/badges/coverage.svg)](https://codeclimate.com/github/LupeCode/phpTraderInterface/coverage) [![Issue Count](https://codeclimate.com/github/LupeCode/phpTraderInterface/badges/issue_count.svg)](https://codeclimate.com/github/LupeCode/phpTraderInterface) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/221a58d6d99943688ff68ca1141a1c86)](https://www.codacy.com/app/jbspublic/phpTraderInterface?utm_source=github.com&utm_medium=referral&utm_content=LupeCode/phpTraderInterface&utm_campaign=Badge_Grade) [![Codacy Badge](https://api.codacy.com/project/badge/Coverage/221a58d6d99943688ff68ca1141a1c86)](https://www.codacy.com/app/jbspublic/phpTraderInterface?utm_source=github.com&utm_medium=referral&utm_content=LupeCode/phpTraderInterface&utm_campaign=Badge_Coverage) + This is an interface to the PHP Trader Extension. The PHP Trader Extension is available from . The extension and the source for it can be downloaded there. diff --git a/build/logs/clover.xml b/build/logs/clover.xml new file mode 100644 index 0000000..a59529d --- /dev/null +++ b/build/logs/clover.xml @@ -0,0 +1,1150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/composer.json b/composer.json index b4b6786..b95e142 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "lupecode/php-trader-interface", "description": "An interface to the PHP Trader extension.", - "version": "1.0.1", + "version": "1.0.2", "type": "library", "license": "GNU GPLv3", "authors":[ @@ -17,7 +17,9 @@ "ext-trader": "*" }, "require-dev": { - "phpunit/phpunit": "~5.4" + "phpunit/phpunit": "~5.4", + "codeclimate/php-test-reporter": "~0.3", + "codacy/coverage": "~1.0" }, "autoload": { "psr-4": {"LupeCode\\phpTraderInterface\\": "source/"} diff --git a/composer.lock b/composer.lock index 98d296f..82ab695 100644 --- a/composer.lock +++ b/composer.lock @@ -4,10 +4,113 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "633890059dff9b60f61c9e9accfe0ce3", - "content-hash": "a31b8d538a81d00704f9879d8a24e686", + "hash": "c6eac345e915aa5c8692388fb64c1a91", + "content-hash": "53d2e758e0d37fd93d71431ba452dc55", "packages": [], "packages-dev": [ + { + "name": "codacy/coverage", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/codacy/php-codacy-coverage.git", + "reference": "92194b1ece3379e56bb1f95d6f540fc6244d9946" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/codacy/php-codacy-coverage/zipball/92194b1ece3379e56bb1f95d6f540fc6244d9946", + "reference": "92194b1ece3379e56bb1f95d6f540fc6244d9946", + "shasum": "" + }, + "require": { + "gitonomy/gitlib": "~0.1", + "php": ">=5.3.3", + "symfony/console": "~2.5|~3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.5" + }, + "bin": [ + "bin/codacycoverage" + ], + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jakob Pupke", + "email": "jakob.pupke@gmail.com" + } + ], + "description": "Sends PHP test coverage information to Codacy.", + "homepage": "https://github.com/codacy/php-codacy-coverage", + "time": "2016-07-07 15:33:12" + }, + { + "name": "codeclimate/php-test-reporter", + "version": "v0.3.2", + "source": { + "type": "git", + "url": "https://github.com/codeclimate/php-test-reporter.git", + "reference": "3a2d3ebdc1df5acf372458c15041af240a6fc016" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/codeclimate/php-test-reporter/zipball/3a2d3ebdc1df5acf372458c15041af240a6fc016", + "reference": "3a2d3ebdc1df5acf372458c15041af240a6fc016", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=5.3", + "satooshi/php-coveralls": "1.0.*", + "symfony/console": ">=2.0" + }, + "require-dev": { + "ext-xdebug": "*", + "phpunit/phpunit": "3.7.*@stable" + }, + "bin": [ + "composer/bin/test-reporter" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.3.x-dev" + } + }, + "autoload": { + "psr-0": { + "CodeClimate\\Component": "src/", + "CodeClimate\\Bundle": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Code Climate", + "email": "hello@codeclimate.com", + "homepage": "https://codeclimate.com" + } + ], + "description": "PHP client for reporting test coverage to Code Climate", + "homepage": "https://github.com/codeclimate/php-test-reporter", + "keywords": [ + "codeclimate", + "coverage" + ], + "time": "2016-04-19 16:54:33" + }, { "name": "doctrine/instantiator", "version": "1.0.5", @@ -62,18 +165,168 @@ ], "time": "2015-06-14 21:17:01" }, + { + "name": "gitonomy/gitlib", + "version": "v0.1.8", + "source": { + "type": "git", + "url": "https://github.com/gitonomy/gitlib.git", + "reference": "f575b8f7da917ade7890c6aa705fa22545690389" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/gitonomy/gitlib/zipball/f575b8f7da917ade7890c6aa705fa22545690389", + "reference": "f575b8f7da917ade7890c6aa705fa22545690389", + "shasum": "" + }, + "require": { + "symfony/process": "^2.3|^3.0" + }, + "require-dev": { + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Add some log" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Gitonomy\\Git\\": "src/Gitonomy/Git/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alexandre Salomé", + "email": "alexandre.salome@gmail.com", + "homepage": "http://alexandre-salome.fr" + }, + { + "name": "Julien DIDIER", + "email": "genzo.wm@gmail.com", + "homepage": "http://www.jdidier.net" + } + ], + "description": "Library for accessing git", + "homepage": "http://gitonomy.com", + "time": "2015-12-01 22:25:57" + }, + { + "name": "guzzle/guzzle", + "version": "v3.9.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle3.git", + "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9", + "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=5.3.3", + "symfony/event-dispatcher": "~2.1" + }, + "replace": { + "guzzle/batch": "self.version", + "guzzle/cache": "self.version", + "guzzle/common": "self.version", + "guzzle/http": "self.version", + "guzzle/inflection": "self.version", + "guzzle/iterator": "self.version", + "guzzle/log": "self.version", + "guzzle/parser": "self.version", + "guzzle/plugin": "self.version", + "guzzle/plugin-async": "self.version", + "guzzle/plugin-backoff": "self.version", + "guzzle/plugin-cache": "self.version", + "guzzle/plugin-cookie": "self.version", + "guzzle/plugin-curlauth": "self.version", + "guzzle/plugin-error-response": "self.version", + "guzzle/plugin-history": "self.version", + "guzzle/plugin-log": "self.version", + "guzzle/plugin-md5": "self.version", + "guzzle/plugin-mock": "self.version", + "guzzle/plugin-oauth": "self.version", + "guzzle/service": "self.version", + "guzzle/stream": "self.version" + }, + "require-dev": { + "doctrine/cache": "~1.3", + "monolog/monolog": "~1.0", + "phpunit/phpunit": "3.7.*", + "psr/log": "~1.0", + "symfony/class-loader": "~2.1", + "zendframework/zend-cache": "2.*,<2.3", + "zendframework/zend-log": "2.*,<2.3" + }, + "suggest": { + "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.9-dev" + } + }, + "autoload": { + "psr-0": { + "Guzzle": "src/", + "Guzzle\\Tests": "tests/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Guzzle Community", + "homepage": "https://github.com/guzzle/guzzle/contributors" + } + ], + "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "abandoned": "guzzlehttp/guzzle", + "time": "2015-03-18 18:23:50" + }, { "name": "myclabs/deep-copy", - "version": "1.5.1", + "version": "1.5.3", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "a8773992b362b58498eed24bf85005f363c34771" + "reference": "94e5ca3e90aa5b34663780393e10914f7438f991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/a8773992b362b58498eed24bf85005f363c34771", - "reference": "a8773992b362b58498eed24bf85005f363c34771", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/94e5ca3e90aa5b34663780393e10914f7438f991", + "reference": "94e5ca3e90aa5b34663780393e10914f7438f991", "shasum": "" }, "require": { @@ -102,7 +355,7 @@ "object", "object graph" ], - "time": "2015-11-20 12:04:31" + "time": "2016-09-07 15:34:10" }, { "name": "phpdocumentor/reflection-common", @@ -314,16 +567,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "900370c81280cc0d942ffbc5912d80464eaee7e9" + "reference": "5f3f7e736d6319d5f1fc402aff8b026da26709a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/900370c81280cc0d942ffbc5912d80464eaee7e9", - "reference": "900370c81280cc0d942ffbc5912d80464eaee7e9", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/5f3f7e736d6319d5f1fc402aff8b026da26709a3", + "reference": "5f3f7e736d6319d5f1fc402aff8b026da26709a3", "shasum": "" }, "require": { @@ -332,7 +585,7 @@ "phpunit/php-text-template": "~1.2", "phpunit/php-token-stream": "^1.4.2", "sebastian/code-unit-reverse-lookup": "~1.0", - "sebastian/environment": "^1.3.2", + "sebastian/environment": "^1.3.2 || ^2.0", "sebastian/version": "~1.0|~2.0" }, "require-dev": { @@ -373,7 +626,7 @@ "testing", "xunit" ], - "time": "2016-06-03 05:03:56" + "time": "2016-07-26 14:39:29" }, { "name": "phpunit/php-file-iterator", @@ -558,16 +811,16 @@ }, { "name": "phpunit/phpunit", - "version": "5.4.7", + "version": "5.5.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "6c8a756c17a1a92a066c99860eb57922e8b723da" + "reference": "3e6e88e56c912133de6e99b87728cca7ed70c5f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6c8a756c17a1a92a066c99860eb57922e8b723da", - "reference": "6c8a756c17a1a92a066c99860eb57922e8b723da", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e6e88e56c912133de6e99b87728cca7ed70c5f5", + "reference": "3e6e88e56c912133de6e99b87728cca7ed70c5f5", "shasum": "" }, "require": { @@ -579,7 +832,7 @@ "myclabs/deep-copy": "~1.3", "php": "^5.6 || ^7.0", "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "^4.0", + "phpunit/php-code-coverage": "^4.0.1", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", "phpunit/php-timer": "^1.0.6", @@ -606,7 +859,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4.x-dev" + "dev-master": "5.5.x-dev" } }, "autoload": { @@ -632,20 +885,20 @@ "testing", "xunit" ], - "time": "2016-07-21 06:55:27" + "time": "2016-08-26 07:11:44" }, { "name": "phpunit/phpunit-mock-objects", - "version": "3.2.3", + "version": "3.2.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "b13d0d9426ced06958bd32104653526a6c998a52" + "reference": "546898a2c0c356ef2891b39dd7d07f5d82c8ed0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/b13d0d9426ced06958bd32104653526a6c998a52", - "reference": "b13d0d9426ced06958bd32104653526a6c998a52", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/546898a2c0c356ef2891b39dd7d07f5d82c8ed0a", + "reference": "546898a2c0c356ef2891b39dd7d07f5d82c8ed0a", "shasum": "" }, "require": { @@ -691,7 +944,103 @@ "mock", "xunit" ], - "time": "2016-06-12 07:37:26" + "time": "2016-09-06 16:07:45" + }, + { + "name": "psr/log", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "Psr\\Log\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2012-12-21 11:40:51" + }, + { + "name": "satooshi/php-coveralls", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/satooshi/php-coveralls.git", + "reference": "da51d304fe8622bf9a6da39a8446e7afd432115c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/da51d304fe8622bf9a6da39a8446e7afd432115c", + "reference": "da51d304fe8622bf9a6da39a8446e7afd432115c", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-simplexml": "*", + "guzzle/guzzle": "^2.8|^3.0", + "php": ">=5.3.3", + "psr/log": "^1.0", + "symfony/config": "^2.1|^3.0", + "symfony/console": "^2.1|^3.0", + "symfony/stopwatch": "^2.0|^3.0", + "symfony/yaml": "^2.0|^3.0" + }, + "suggest": { + "symfony/http-kernel": "Allows Symfony integration" + }, + "bin": [ + "bin/coveralls" + ], + "type": "library", + "autoload": { + "psr-4": { + "Satooshi\\": "src/Satooshi/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kitamura Satoshi", + "email": "with.no.parachute@gmail.com", + "homepage": "https://www.facebook.com/satooshi.jp" + } + ], + "description": "PHP client library for Coveralls API", + "homepage": "https://github.com/satooshi/php-coveralls", + "keywords": [ + "ci", + "coverage", + "github", + "test" + ], + "time": "2016-01-20 17:35:46" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -856,23 +1205,23 @@ }, { "name": "sebastian/environment", - "version": "1.3.7", + "version": "1.3.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716" + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716", - "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^4.8 || ^5.0" }, "type": "library", "extra": { @@ -902,7 +1251,7 @@ "environment", "hhvm" ], - "time": "2016-05-17 03:18:57" + "time": "2016-08-18 05:49:44" }, { "name": "sebastian/exporter", @@ -1206,18 +1555,397 @@ "homepage": "https://github.com/sebastianbergmann/version", "time": "2016-02-04 12:56:52" }, + { + "name": "symfony/config", + "version": "v3.1.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "431d28df9c7bb6e77f8f6289d8670b044fabb9e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/431d28df9c7bb6e77f8f6289d8670b044fabb9e8", + "reference": "431d28df9c7bb6e77f8f6289d8670b044fabb9e8", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/filesystem": "~2.8|~3.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Config Component", + "homepage": "https://symfony.com", + "time": "2016-08-27 18:50:07" + }, + { + "name": "symfony/console", + "version": "v3.1.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "8ea494c34f0f772c3954b5fbe00bffc5a435e563" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/8ea494c34f0f772c3954b5fbe00bffc5a435e563", + "reference": "8ea494c34f0f772c3954b5fbe00bffc5a435e563", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2016-08-19 06:48:39" + }, + { + "name": "symfony/event-dispatcher", + "version": "v2.8.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "889983a79a043dfda68f38c38b6dba092dd49cd8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/889983a79a043dfda68f38c38b6dba092dd49cd8", + "reference": "889983a79a043dfda68f38c38b6dba092dd49cd8", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.0,>=2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2016-07-28 16:56:28" + }, + { + "name": "symfony/filesystem", + "version": "v3.1.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "bb29adceb552d202b6416ede373529338136e84f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/bb29adceb552d202b6416ede373529338136e84f", + "reference": "bb29adceb552d202b6416ede373529338136e84f", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2016-07-20 05:44:26" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "dff51f72b0706335131b00a7f49606168c582594" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594", + "reference": "dff51f72b0706335131b00a7f49606168c582594", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2016-05-18 14:26:46" + }, + { + "name": "symfony/process", + "version": "v3.1.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "e64e93041c80e77197ace5ab9385dedb5a143697" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/e64e93041c80e77197ace5ab9385dedb5a143697", + "reference": "e64e93041c80e77197ace5ab9385dedb5a143697", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2016-08-16 14:58:24" + }, + { + "name": "symfony/stopwatch", + "version": "v3.1.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "bb42806b12c5f89db4ebf64af6741afe6d8457e1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/bb42806b12c5f89db4ebf64af6741afe6d8457e1", + "reference": "bb42806b12c5f89db4ebf64af6741afe6d8457e1", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Stopwatch Component", + "homepage": "https://symfony.com", + "time": "2016-06-29 05:41:56" + }, { "name": "symfony/yaml", - "version": "v3.1.2", + "version": "v3.1.4", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de" + "reference": "f291ed25eb1435bddbe8a96caaef16469c2a092d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/2884c26ce4c1d61aebf423a8b912950fe7c764de", - "reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de", + "url": "https://api.github.com/repos/symfony/yaml/zipball/f291ed25eb1435bddbe8a96caaef16469c2a092d", + "reference": "f291ed25eb1435bddbe8a96caaef16469c2a092d", "shasum": "" }, "require": { @@ -1253,32 +1981,33 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-06-29 05:41:56" + "time": "2016-09-02 02:12:52" }, { "name": "webmozart/assert", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde" + "reference": "bb2d123231c095735130cc8f6d31385a44c7b308" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", - "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "url": "https://api.github.com/repos/webmozart/assert/zipball/bb2d123231c095735130cc8f6d31385a44c7b308", + "reference": "bb2d123231c095735130cc8f6d31385a44c7b308", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3|^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.6" + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.2-dev" } }, "autoload": { @@ -1302,7 +2031,7 @@ "check", "validate" ], - "time": "2015-08-24 13:29:44" + "time": "2016-08-09 15:02:57" } ], "aliases": [], From faeddc6070fddab1df2f7ba50bf4c9bf35500d21 Mon Sep 17 00:00:00 2001 From: Joshua Date: Mon, 6 Mar 2017 15:46:42 -0700 Subject: [PATCH 02/31] Too long without a commit. --- Tests/TraderTest.php | 2 +- source/Trader.php | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Tests/TraderTest.php b/Tests/TraderTest.php index 72f079f..461a9e0 100644 --- a/Tests/TraderTest.php +++ b/Tests/TraderTest.php @@ -2054,7 +2054,7 @@ public function testFriendlyFunctions_wma() { $this->assertEquals(trader_wma($this->Close, 30), Trader::weightedMovingAverage($this->Close, 30)); } - + // } diff --git a/source/Trader.php b/source/Trader.php index 65e24c7..9c2ecb8 100644 --- a/source/Trader.php +++ b/source/Trader.php @@ -1502,7 +1502,7 @@ public static function hilbertTransformDominantCyclePhase(array $real): array /** * Hilbert Transform - Phasor Components * - * @param array $real Array of real values. + * @param array $real Array of real values. * @param array $inPhase Empty array, will be filled with in phase data. * * @return array Returns an array with calculated data or false on failure. @@ -2435,9 +2435,9 @@ public static function weightedClosePrice(array $high, array $low, array $close) /** * Williams' %R * - * @param array $high High price, array of real values. - * @param array $low Low price, array of real values. - * @param array $close Closing price, array of real values. + * @param array $high High price, array of real values. + * @param array $low Low price, array of real values. + * @param array $close Closing price, array of real values. * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. @@ -2460,5 +2460,4 @@ public static function weightedMovingAverage(array $real, int $timePeriod = null return static::wma($real, $timePeriod); } - } From 46faa251654eaba712ac0cccfb23e73405f50cc0 Mon Sep 17 00:00:00 2001 From: Joshua Date: Tue, 1 Aug 2017 11:09:37 -0600 Subject: [PATCH 03/31] Create .codeclimate.yml --- .codeclimate.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .codeclimate.yml diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 0000000..e628230 --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,9 @@ +engines: + # ... CONFIG CONTENT ... + phpmd: + enabled: true + # ... CONFIG CONTENT ... + checks: + Naming/LongVariable: + enabled: false +# ... CONFIG CONTENT ... From 39cd7c0d33ae3620e32cd9300db7e62bd628801d Mon Sep 17 00:00:00 2001 From: Joshua Date: Tue, 1 Aug 2017 11:18:20 -0600 Subject: [PATCH 04/31] Update .codeclimate.yml --- .codeclimate.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.codeclimate.yml b/.codeclimate.yml index e628230..19becf8 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -6,4 +6,6 @@ engines: checks: Naming/LongVariable: enabled: false + Naming/ShortMethodName: + enabled: false # ... CONFIG CONTENT ... From 10d34bd8c3c013f55806bb46eb7dec90cbd40c8b Mon Sep 17 00:00:00 2001 From: Joshua Date: Tue, 1 Aug 2017 11:19:53 -0600 Subject: [PATCH 05/31] Update .codeclimate.yml --- .codeclimate.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.codeclimate.yml b/.codeclimate.yml index 19becf8..2b9ebe4 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -8,4 +8,6 @@ engines: enabled: false Naming/ShortMethodName: enabled: false + ExcessivePublicCount: + enabled: false # ... CONFIG CONTENT ... From 8b383d2ad186c528840093c78892144a9d7c0bfd Mon Sep 17 00:00:00 2001 From: Joshua Date: Tue, 1 Aug 2017 12:45:06 -0600 Subject: [PATCH 06/31] Updates for code climate. --- .codeclimate.yml | 2 + README.md | 10 ++++- Tests/TraderTest.php | 12 +++--- source/TraderTrait.php | 89 ++++++++++++++---------------------------- 4 files changed, 46 insertions(+), 67 deletions(-) diff --git a/.codeclimate.yml b/.codeclimate.yml index 2b9ebe4..0091df7 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -10,4 +10,6 @@ engines: enabled: false ExcessivePublicCount: enabled: false + Controversial/CamelCaseParameterName: + enabled: false # ... CONFIG CONTENT ... diff --git a/README.md b/README.md index 7917a01..b981ce0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,14 @@ # PHP Trader Interface -[![Code Climate](https://codeclimate.com/github/LupeCode/phpTraderInterface/badges/gpa.svg)](https://codeclimate.com/github/LupeCode/phpTraderInterface) [![Test Coverage](https://codeclimate.com/github/LupeCode/phpTraderInterface/badges/coverage.svg)](https://codeclimate.com/github/LupeCode/phpTraderInterface/coverage) [![Issue Count](https://codeclimate.com/github/LupeCode/phpTraderInterface/badges/issue_count.svg)](https://codeclimate.com/github/LupeCode/phpTraderInterface) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/221a58d6d99943688ff68ca1141a1c86)](https://www.codacy.com/app/jbspublic/phpTraderInterface?utm_source=github.com&utm_medium=referral&utm_content=LupeCode/phpTraderInterface&utm_campaign=Badge_Grade) [![Codacy Badge](https://api.codacy.com/project/badge/Coverage/221a58d6d99943688ff68ca1141a1c86)](https://www.codacy.com/app/jbspublic/phpTraderInterface?utm_source=github.com&utm_medium=referral&utm_content=LupeCode/phpTraderInterface&utm_campaign=Badge_Coverage) +[![Code Climate](https://codeclimate.com/github/LupeCode/phpTraderInterface/badges/gpa.svg)](https://codeclimate.com/github/LupeCode/phpTraderInterface) + +[![Test Coverage](https://codeclimate.com/github/LupeCode/phpTraderInterface/badges/coverage.svg)](https://codeclimate.com/github/LupeCode/phpTraderInterface/coverage) + +[![Issue Count](https://codeclimate.com/github/LupeCode/phpTraderInterface/badges/issue_count.svg)](https://codeclimate.com/github/LupeCode/phpTraderInterface) + +[![Codacy Badge](https://api.codacy.com/project/badge/Grade/221a58d6d99943688ff68ca1141a1c86)](https://www.codacy.com/app/jbspublic/phpTraderInterface?utm_source=github.com&utm_medium=referral&utm_content=LupeCode/phpTraderInterface&utm_campaign=Badge_Grade) + +[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/221a58d6d99943688ff68ca1141a1c86)](https://www.codacy.com/app/jbspublic/phpTraderInterface?utm_source=github.com&utm_medium=referral&utm_content=LupeCode/phpTraderInterface&utm_campaign=Badge_Coverage) This is an interface to the PHP Trader Extension. The PHP Trader Extension is available from . diff --git a/Tests/TraderTest.php b/Tests/TraderTest.php index 461a9e0..1ef0fb5 100644 --- a/Tests/TraderTest.php +++ b/Tests/TraderTest.php @@ -179,7 +179,7 @@ class TraderTest extends PHPUnit_Framework_TestCase '16909400', '20529200', '19432500', '11803400', '7713000', '6398400', ]; -// + // public function testConstants_TRADER_MA_TYPE_SMA() { $this->assertEquals(TRADER_MA_TYPE_SMA, Trader::$TRADER_MA_TYPE_SMA); @@ -459,9 +459,9 @@ public function testConstants_TRADER_ERR_UNKNOWN_ERROR() { $this->assertEquals(TRADER_ERR_UNKNOWN_ERROR, Trader::$TRADER_ERR_UNKNOWN_ERROR); } -// + // -// + // public function testInterfaceFunctions_acos() { @@ -1257,9 +1257,9 @@ public function testInterfaceFunctions_wma() $this->assertEquals(trader_wma($this->Close, 30), Trader::wma($this->Close, 30)); } -// + // -// + // public function testFriendlyFunctions_acos() { @@ -2055,6 +2055,6 @@ public function testFriendlyFunctions_wma() $this->assertEquals(trader_wma($this->Close, 30), Trader::weightedMovingAverage($this->Close, 30)); } -// + // } diff --git a/source/TraderTrait.php b/source/TraderTrait.php index 9711acb..0eec98a 100644 --- a/source/TraderTrait.php +++ b/source/TraderTrait.php @@ -69,67 +69,36 @@ trait TraderTrait public static $TRADER_ERR_INTERNAL_ERROR = 5000; public static $TRADER_ERR_UNKNOWN_ERROR = 65535; - private static function checkForError() - { - $ErrorCode = trader_errno(); - if ($ErrorCode === static::$TRADER_ERR_SUCCESS) { - return; - } - if ($ErrorCode === static::$TRADER_ERR_LIB_NOT_INITIALIZE) { - throw new \Exception("Library not initialized", static::$TRADER_ERR_LIB_NOT_INITIALIZE); - } - if ($ErrorCode === static::$TRADER_ERR_BAD_PARAM) { - throw new \Exception("Bad parameter", static::$TRADER_ERR_BAD_PARAM); - } - if ($ErrorCode === static::$TRADER_ERR_ALLOC_ERR) { - throw new \Exception("Allocation error", static::$TRADER_ERR_ALLOC_ERR); - } - if ($ErrorCode === static::$TRADER_ERR_GROUP_NOT_FOUND) { - throw new \Exception("Group not found", static::$TRADER_ERR_GROUP_NOT_FOUND); - } - if ($ErrorCode === static::$TRADER_ERR_FUNC_NOT_FOUND) { - throw new \Exception("Function not found", static::$TRADER_ERR_FUNC_NOT_FOUND); - } - if ($ErrorCode === static::$TRADER_ERR_INVALID_HANDLE) { - throw new \Exception("Invalid handle", static::$TRADER_ERR_INVALID_HANDLE); - } - if ($ErrorCode === static::$TRADER_ERR_INVALID_PARAM_HOLDER) { - throw new \Exception("Invalid parameter holder", static::$TRADER_ERR_INVALID_PARAM_HOLDER); - } - if ($ErrorCode === static::$TRADER_ERR_INVALID_PARAM_HOLDER_TYPE) { - throw new \Exception("Invalid parameter holder type", static::$TRADER_ERR_INVALID_PARAM_HOLDER_TYPE); - } - if ($ErrorCode === static::$TRADER_ERR_INVALID_PARAM_FUNCTION) { - throw new \Exception("Invalid parameter function", static::$TRADER_ERR_INVALID_PARAM_FUNCTION); + protected static $errorArray = [ + 1 => "Library not initialized", + 2 => "Bad parameter", + 3 => "Allocation error", + 4 => "Group not found", + 5 => "Function not found", + 6 => "Invalid handle", + 7 => "Invalid parameter holder", + 8 => "Invalid parameter holder type", + 9 => "Invalid parameter function", + 10 => "Input not all initialized", + 11 => "Output not all initialized", + 12 => "Out of range on start index", + 13 => "Out of range on end index", + 14 => "Invalid list type", + 15 => "Bad object", + 16 => "Not supported", + 5000 => "Internal error", + 65535 => "Unknown error", + ]; + + protected static function checkForError() + { + $errorNumber = trader_errno(); + switch ($errorNumber) { + case static::$TRADER_ERR_SUCCESS: + return; + default: + throw new \Exception(static::$errorArray[$errorNumber], $errorNumber); } - if ($ErrorCode === static::$TRADER_ERR_INPUT_NOT_ALL_INITIALIZE) { - throw new \Exception("Input not all initialized", static::$TRADER_ERR_INPUT_NOT_ALL_INITIALIZE); - } - if ($ErrorCode === static::$TRADER_ERR_OUTPUT_NOT_ALL_INITIALIZE) { - throw new \Exception("Output not all initialized", static::$TRADER_ERR_OUTPUT_NOT_ALL_INITIALIZE); - } - if ($ErrorCode === static::$TRADER_ERR_OUT_OF_RANGE_START_INDEX) { - throw new \Exception("Out of range on start index", static::$TRADER_ERR_OUT_OF_RANGE_START_INDEX); - } - if ($ErrorCode === static::$TRADER_ERR_OUT_OF_RANGE_END_INDEX) { - throw new \Exception("Out of range on end index", static::$TRADER_ERR_OUT_OF_RANGE_END_INDEX); - } - if ($ErrorCode === static::$TRADER_ERR_INVALID_LIST_TYPE) { - throw new \Exception("Invalid list type", static::$TRADER_ERR_INVALID_LIST_TYPE); - } - if ($ErrorCode === static::$TRADER_ERR_BAD_OBJECT) { - throw new \Exception("Bad object", static::$TRADER_ERR_BAD_OBJECT); - } - if ($ErrorCode === static::$TRADER_ERR_NOT_SUPPORTED) { - throw new \Exception("Not supported", static::$TRADER_ERR_NOT_SUPPORTED); - } - if ($ErrorCode === static::$TRADER_ERR_INTERNAL_ERROR) { - throw new \Exception("Internal error", static::$TRADER_ERR_INTERNAL_ERROR); - } - if ($ErrorCode === static::$TRADER_ERR_UNKNOWN_ERROR) { - throw new \Exception("Unknown error", static::$TRADER_ERR_UNKNOWN_ERROR); - } - } /** From e417c75ce024491cdc3b20926e88fe21f7c06ca2 Mon Sep 17 00:00:00 2001 From: Joshua Date: Thu, 3 Aug 2017 11:55:57 -0600 Subject: [PATCH 07/31] Removed code climate badges --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index b981ce0..74aacc9 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,5 @@ # PHP Trader Interface -[![Code Climate](https://codeclimate.com/github/LupeCode/phpTraderInterface/badges/gpa.svg)](https://codeclimate.com/github/LupeCode/phpTraderInterface) - -[![Test Coverage](https://codeclimate.com/github/LupeCode/phpTraderInterface/badges/coverage.svg)](https://codeclimate.com/github/LupeCode/phpTraderInterface/coverage) - -[![Issue Count](https://codeclimate.com/github/LupeCode/phpTraderInterface/badges/issue_count.svg)](https://codeclimate.com/github/LupeCode/phpTraderInterface) - [![Codacy Badge](https://api.codacy.com/project/badge/Grade/221a58d6d99943688ff68ca1141a1c86)](https://www.codacy.com/app/jbspublic/phpTraderInterface?utm_source=github.com&utm_medium=referral&utm_content=LupeCode/phpTraderInterface&utm_campaign=Badge_Grade) [![Codacy Badge](https://api.codacy.com/project/badge/Coverage/221a58d6d99943688ff68ca1141a1c86)](https://www.codacy.com/app/jbspublic/phpTraderInterface?utm_source=github.com&utm_medium=referral&utm_content=LupeCode/phpTraderInterface&utm_campaign=Badge_Coverage) From cce4e1b3b20c97de61c330b4ec5ef8001238994d Mon Sep 17 00:00:00 2001 From: Joshua Date: Thu, 25 Jan 2018 21:16:23 -0800 Subject: [PATCH 08/31] Added phpunit.xml --- .gitignore | 6 +- Tests/TraderTest.php | 2 + build/logs/clover.xml | 1150 ----------------------------------------- composer.json | 6 +- composer.lock | 1020 +++++++++++++----------------------- phpunit.xml | 38 ++ 6 files changed, 402 insertions(+), 1820 deletions(-) delete mode 100644 build/logs/clover.xml create mode 100644 phpunit.xml diff --git a/.gitignore b/.gitignore index 4fbbbfe..b88dc5a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ .* !/.gitignore -vendor/ +!/.gitlab-ci.yml +/vendor/ +/logs/ +/metrics/ +/update metrics.bat diff --git a/Tests/TraderTest.php b/Tests/TraderTest.php index 1ef0fb5..0cadc92 100644 --- a/Tests/TraderTest.php +++ b/Tests/TraderTest.php @@ -8,6 +8,7 @@ class TraderTest extends PHPUnit_Framework_TestCase { + // protected $Open = [ '37.560001', '36.889999', '36.25', '35.580002', '35.869999', '36.400002', '37.639999', '37.369999', @@ -178,6 +179,7 @@ class TraderTest extends PHPUnit_Framework_TestCase '14861600', '14752100', '14864300', '8462400', '9147300', '9506500', '8713200', '10057600', '16909400', '20529200', '19432500', '11803400', '7713000', '6398400', ]; + // // public function testConstants_TRADER_MA_TYPE_SMA() diff --git a/build/logs/clover.xml b/build/logs/clover.xml deleted file mode 100644 index a59529d..0000000 --- a/build/logs/clover.xml +++ /dev/null @@ -1,1150 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/composer.json b/composer.json index b95e142..5ed9288 100644 --- a/composer.json +++ b/composer.json @@ -18,10 +18,10 @@ }, "require-dev": { "phpunit/phpunit": "~5.4", - "codeclimate/php-test-reporter": "~0.3", - "codacy/coverage": "~1.0" + "codacy/coverage": "~1.0", + "phpmetrics/phpmetrics": "~2.3.2" }, "autoload": { "psr-4": {"LupeCode\\phpTraderInterface\\": "source/"} } -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 82ab695..a92c678 100644 --- a/composer.lock +++ b/composer.lock @@ -4,31 +4,30 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "c6eac345e915aa5c8692388fb64c1a91", - "content-hash": "53d2e758e0d37fd93d71431ba452dc55", + "content-hash": "02ca6984c5c036d36e2d76f6f3dfa82d", "packages": [], "packages-dev": [ { "name": "codacy/coverage", - "version": "1.0.5", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/codacy/php-codacy-coverage.git", - "reference": "92194b1ece3379e56bb1f95d6f540fc6244d9946" + "reference": "546ac2e000a004571c1000ecff4d68a98706db3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/codacy/php-codacy-coverage/zipball/92194b1ece3379e56bb1f95d6f540fc6244d9946", - "reference": "92194b1ece3379e56bb1f95d6f540fc6244d9946", + "url": "https://api.github.com/repos/codacy/php-codacy-coverage/zipball/546ac2e000a004571c1000ecff4d68a98706db3a", + "reference": "546ac2e000a004571c1000ecff4d68a98706db3a", "shasum": "" }, "require": { - "gitonomy/gitlib": "~0.1", + "gitonomy/gitlib": ">=1.0", "php": ">=5.3.3", - "symfony/console": "~2.5|~3.0" + "symfony/console": "~2.5|~3.0|~4.0" }, "require-dev": { - "phpunit/phpunit": "~4.5" + "phpunit/phpunit": "~6.5" }, "bin": [ "bin/codacycoverage" @@ -51,94 +50,36 @@ ], "description": "Sends PHP test coverage information to Codacy.", "homepage": "https://github.com/codacy/php-codacy-coverage", - "time": "2016-07-07 15:33:12" - }, - { - "name": "codeclimate/php-test-reporter", - "version": "v0.3.2", - "source": { - "type": "git", - "url": "https://github.com/codeclimate/php-test-reporter.git", - "reference": "3a2d3ebdc1df5acf372458c15041af240a6fc016" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/codeclimate/php-test-reporter/zipball/3a2d3ebdc1df5acf372458c15041af240a6fc016", - "reference": "3a2d3ebdc1df5acf372458c15041af240a6fc016", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "php": ">=5.3", - "satooshi/php-coveralls": "1.0.*", - "symfony/console": ">=2.0" - }, - "require-dev": { - "ext-xdebug": "*", - "phpunit/phpunit": "3.7.*@stable" - }, - "bin": [ - "composer/bin/test-reporter" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.3.x-dev" - } - }, - "autoload": { - "psr-0": { - "CodeClimate\\Component": "src/", - "CodeClimate\\Bundle": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Code Climate", - "email": "hello@codeclimate.com", - "homepage": "https://codeclimate.com" - } - ], - "description": "PHP client for reporting test coverage to Code Climate", - "homepage": "https://github.com/codeclimate/php-test-reporter", - "keywords": [ - "codeclimate", - "coverage" - ], - "time": "2016-04-19 16:54:33" + "time": "2017-12-20T14:31:46+00:00" }, { "name": "doctrine/instantiator", - "version": "1.0.5", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1" }, "require-dev": { "athletic/athletic": "~0.1.8", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "phpunit/phpunit": "^6.2.3", + "squizlabs/php_codesniffer": "^3.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -163,26 +104,28 @@ "constructor", "instantiate" ], - "time": "2015-06-14 21:17:01" + "time": "2017-07-22T11:58:36+00:00" }, { "name": "gitonomy/gitlib", - "version": "v0.1.8", + "version": "v1.0.3", "source": { "type": "git", "url": "https://github.com/gitonomy/gitlib.git", - "reference": "f575b8f7da917ade7890c6aa705fa22545690389" + "reference": "1c2b0605115786613cb517798046c8ab57c17097" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/gitonomy/gitlib/zipball/f575b8f7da917ade7890c6aa705fa22545690389", - "reference": "f575b8f7da917ade7890c6aa705fa22545690389", + "url": "https://api.github.com/repos/gitonomy/gitlib/zipball/1c2b0605115786613cb517798046c8ab57c17097", + "reference": "1c2b0605115786613cb517798046c8ab57c17097", "shasum": "" }, "require": { - "symfony/process": "^2.3|^3.0" + "php": "^5.3 || ^7.0", + "symfony/process": "^2.3|^3.0|^4.0" }, "require-dev": { + "phpunit/phpunit": "^4.8.35|^5.7", "psr/log": "^1.0" }, "suggest": { @@ -217,158 +160,116 @@ ], "description": "Library for accessing git", "homepage": "http://gitonomy.com", - "time": "2015-12-01 22:25:57" + "time": "2018-01-10T11:34:47+00:00" }, { - "name": "guzzle/guzzle", - "version": "v3.9.3", + "name": "myclabs/deep-copy", + "version": "1.7.0", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle3.git", - "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9" + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9", - "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", "shasum": "" }, "require": { - "ext-curl": "*", - "php": ">=5.3.3", - "symfony/event-dispatcher": "~2.1" - }, - "replace": { - "guzzle/batch": "self.version", - "guzzle/cache": "self.version", - "guzzle/common": "self.version", - "guzzle/http": "self.version", - "guzzle/inflection": "self.version", - "guzzle/iterator": "self.version", - "guzzle/log": "self.version", - "guzzle/parser": "self.version", - "guzzle/plugin": "self.version", - "guzzle/plugin-async": "self.version", - "guzzle/plugin-backoff": "self.version", - "guzzle/plugin-cache": "self.version", - "guzzle/plugin-cookie": "self.version", - "guzzle/plugin-curlauth": "self.version", - "guzzle/plugin-error-response": "self.version", - "guzzle/plugin-history": "self.version", - "guzzle/plugin-log": "self.version", - "guzzle/plugin-md5": "self.version", - "guzzle/plugin-mock": "self.version", - "guzzle/plugin-oauth": "self.version", - "guzzle/service": "self.version", - "guzzle/stream": "self.version" + "php": "^5.6 || ^7.0" }, "require-dev": { - "doctrine/cache": "~1.3", - "monolog/monolog": "~1.0", - "phpunit/phpunit": "3.7.*", - "psr/log": "~1.0", - "symfony/class-loader": "~2.1", - "zendframework/zend-cache": "2.*,<2.3", - "zendframework/zend-log": "2.*,<2.3" - }, - "suggest": { - "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^4.1" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.9-dev" - } - }, "autoload": { - "psr-0": { - "Guzzle": "src/", - "Guzzle\\Tests": "tests/" - } + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Guzzle Community", - "homepage": "https://github.com/guzzle/guzzle/contributors" - } - ], - "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", - "homepage": "http://guzzlephp.org/", + "description": "Create deep copies (clones) of your objects", "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ], - "abandoned": "guzzlehttp/guzzle", - "time": "2015-03-18 18:23:50" + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2017-10-19T19:58:43+00:00" }, { - "name": "myclabs/deep-copy", - "version": "1.5.3", + "name": "nikic/php-parser", + "version": "v3.1.3", "source": { "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "94e5ca3e90aa5b34663780393e10914f7438f991" + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "579f4ce846734a1cf55d6a531d00ca07a43e3cda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/94e5ca3e90aa5b34663780393e10914f7438f991", - "reference": "94e5ca3e90aa5b34663780393e10914f7438f991", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/579f4ce846734a1cf55d6a531d00ca07a43e3cda", + "reference": "579f4ce846734a1cf55d6a531d00ca07a43e3cda", "shasum": "" }, "require": { - "php": ">=5.4.0" + "ext-tokenizer": "*", + "php": ">=5.5" }, "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" + "phpunit/phpunit": "~4.0|~5.0" }, + "bin": [ + "bin/php-parse" + ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, "autoload": { "psr-4": { - "DeepCopy\\": "src/DeepCopy/" + "PhpParser\\": "lib/PhpParser" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], - "description": "Create deep copies (clones) of your objects", - "homepage": "https://github.com/myclabs/DeepCopy", + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" + "parser", + "php" ], - "time": "2016-09-07 15:34:10" + "time": "2017-12-26T14:43:21+00:00" }, { "name": "phpdocumentor/reflection-common", - "version": "1.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", "shasum": "" }, "require": { @@ -409,33 +310,39 @@ "reflection", "static analysis" ], - "time": "2015-12-27 11:43:31" + "time": "2017-09-11T18:02:19+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "3.1.0", + "version": "4.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "9270140b940ff02e58ec577c237274e92cd40cdd" + "reference": "66465776cfc249844bde6d117abff1d22e06c2da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd", - "reference": "9270140b940ff02e58ec577c237274e92cd40cdd", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/66465776cfc249844bde6d117abff1d22e06c2da", + "reference": "66465776cfc249844bde6d117abff1d22e06c2da", "shasum": "" }, "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.2.0", + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", "webmozart/assert": "^1.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, "autoload": { "psr-4": { "phpDocumentor\\Reflection\\": [ @@ -454,24 +361,24 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-06-10 09:48:41" + "time": "2017-11-27T17:38:31+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "0.2", + "version": "0.4.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443" + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443", - "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", "shasum": "" }, "require": { - "php": ">=5.5", + "php": "^5.5 || ^7.0", "phpdocumentor/reflection-common": "^1.0" }, "require-dev": { @@ -501,36 +408,98 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-06-10 07:14:17" + "time": "2017-07-14T14:27:02+00:00" + }, + { + "name": "phpmetrics/phpmetrics", + "version": "v2.3.2", + "source": { + "type": "git", + "url": "https://github.com/phpmetrics/PhpMetrics.git", + "reference": "e44f5224d08571ee6ba85c50379560b9ec217b91" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpmetrics/PhpMetrics/zipball/e44f5224d08571ee6ba85c50379560b9ec217b91", + "reference": "e44f5224d08571ee6ba85c50379560b9ec217b91", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "nikic/php-parser": "v3.*", + "php": ">=5.5" + }, + "replace": { + "halleck45/php-metrics": "*", + "halleck45/phpmetrics": "*" + }, + "require-dev": { + "phpunit/phpunit": ">=4.8.27,<=5.7.13" + }, + "bin": [ + "bin/phpmetrics" + ], + "type": "library", + "autoload": { + "psr-0": { + "Hal\\": "./src/" + }, + "files": [ + "./src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jean-François Lépine", + "email": "lepinejeanfrancois@yahoo.fr", + "homepage": "http://www.lepine.pro", + "role": "Copyright Holder" + } + ], + "description": "Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !", + "homepage": "http://www.phpmetrics.org", + "keywords": [ + "analysis", + "qa", + "quality", + "testing" + ], + "time": "2017-10-13T16:11:30+00:00" }, { "name": "phpspec/prophecy", - "version": "v1.6.1", + "version": "1.7.3", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "58a8137754bc24b25740d4281399a4a3596058e0" + "reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", - "reference": "58a8137754bc24b25740d4281399a4a3596058e0", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf", + "reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", - "sebastian/comparator": "^1.1", - "sebastian/recursion-context": "^1.0" + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { - "phpspec/phpspec": "^2.0" + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.7.x-dev" } }, "autoload": { @@ -563,39 +532,39 @@ "spy", "stub" ], - "time": "2016-06-07 08:13:47" + "time": "2017-11-24T13:59:53+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "4.0.1", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "5f3f7e736d6319d5f1fc402aff8b026da26709a3" + "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/5f3f7e736d6319d5f1fc402aff8b026da26709a3", - "reference": "5f3f7e736d6319d5f1fc402aff8b026da26709a3", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d", + "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d", "shasum": "" }, "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", "php": "^5.6 || ^7.0", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "^1.4.2", - "sebastian/code-unit-reverse-lookup": "~1.0", + "phpunit/php-file-iterator": "^1.3", + "phpunit/php-text-template": "^1.2", + "phpunit/php-token-stream": "^1.4.2 || ^2.0", + "sebastian/code-unit-reverse-lookup": "^1.0", "sebastian/environment": "^1.3.2 || ^2.0", - "sebastian/version": "~1.0|~2.0" + "sebastian/version": "^1.0 || ^2.0" }, "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "^5.4" + "ext-xdebug": "^2.1.4", + "phpunit/phpunit": "^5.7" }, "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.4.0", - "ext-xmlwriter": "*" + "ext-xdebug": "^2.5.1" }, "type": "library", "extra": { @@ -626,20 +595,20 @@ "testing", "xunit" ], - "time": "2016-07-26 14:39:29" + "time": "2017-04-02T07:44:40+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.1", + "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", "shasum": "" }, "require": { @@ -673,7 +642,7 @@ "filesystem", "iterator" ], - "time": "2015-06-21 13:08:43" + "time": "2017-11-27T13:52:08+00:00" }, { "name": "phpunit/php-text-template", @@ -714,29 +683,34 @@ "keywords": [ "template" ], - "time": "2015-06-21 13:50:34" + "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", - "version": "1.0.8", + "version": "1.0.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4|~5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -758,33 +732,33 @@ "keywords": [ "timer" ], - "time": "2016-05-12 18:03:57" + "time": "2017-02-26T11:10:40+00:00" }, { "name": "phpunit/php-token-stream", - "version": "1.4.8", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" + "reference": "791198a2c6254db10131eecfe8c06670700904db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", + "reference": "791198a2c6254db10131eecfe8c06670700904db", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.2.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -807,50 +781,54 @@ "keywords": [ "tokenizer" ], - "time": "2015-09-15 10:49:45" + "time": "2017-11-27T05:48:46+00:00" }, { "name": "phpunit/phpunit", - "version": "5.5.4", + "version": "5.7.26", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3e6e88e56c912133de6e99b87728cca7ed70c5f5" + "reference": "7fbc25c13309de0c4c9bb48b7361f1eca34c7fbd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e6e88e56c912133de6e99b87728cca7ed70c5f5", - "reference": "3e6e88e56c912133de6e99b87728cca7ed70c5f5", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7fbc25c13309de0c4c9bb48b7361f1eca34c7fbd", + "reference": "7fbc25c13309de0c4c9bb48b7361f1eca34c7fbd", "shasum": "" }, "require": { "ext-dom": "*", "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", "myclabs/deep-copy": "~1.3", "php": "^5.6 || ^7.0", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "^4.0.1", + "phpspec/prophecy": "^1.6.2", + "phpunit/php-code-coverage": "^4.0.4", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", "phpunit/php-timer": "^1.0.6", "phpunit/phpunit-mock-objects": "^3.2", - "sebastian/comparator": "~1.1", - "sebastian/diff": "~1.2", - "sebastian/environment": "^1.3 || ^2.0", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/object-enumerator": "~1.0", + "sebastian/comparator": "^1.2.4", + "sebastian/diff": "^1.4.3", + "sebastian/environment": "^1.3.4 || ^2.0", + "sebastian/exporter": "~2.0", + "sebastian/global-state": "^1.1", + "sebastian/object-enumerator": "~2.0", "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0|~2.0", - "symfony/yaml": "~2.1|~3.0" + "sebastian/version": "~1.0.3|~2.0", + "symfony/yaml": "~2.1|~3.0|~4.0" }, "conflict": { "phpdocumentor/reflection-docblock": "3.0.2" }, + "require-dev": { + "ext-pdo": "*" + }, "suggest": { + "ext-xdebug": "*", "phpunit/php-invoker": "~1.1" }, "bin": [ @@ -859,7 +837,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.5.x-dev" + "dev-master": "5.7.x-dev" } }, "autoload": { @@ -885,27 +863,27 @@ "testing", "xunit" ], - "time": "2016-08-26 07:11:44" + "time": "2017-12-17T06:14:38+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "3.2.7", + "version": "3.4.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "546898a2c0c356ef2891b39dd7d07f5d82c8ed0a" + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/546898a2c0c356ef2891b39dd7d07f5d82c8ed0a", - "reference": "546898a2c0c356ef2891b39dd7d07f5d82c8ed0a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118", + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.6 || ^7.0", "phpunit/php-text-template": "^1.2", - "sebastian/exporter": "^1.2" + "sebastian/exporter": "^1.2 || ^2.0" }, "conflict": { "phpunit/phpunit": "<5.4.0" @@ -944,123 +922,27 @@ "mock", "xunit" ], - "time": "2016-09-06 16:07:45" - }, - { - "name": "psr/log", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "Psr\\Log\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2012-12-21 11:40:51" - }, - { - "name": "satooshi/php-coveralls", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/satooshi/php-coveralls.git", - "reference": "da51d304fe8622bf9a6da39a8446e7afd432115c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/da51d304fe8622bf9a6da39a8446e7afd432115c", - "reference": "da51d304fe8622bf9a6da39a8446e7afd432115c", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-simplexml": "*", - "guzzle/guzzle": "^2.8|^3.0", - "php": ">=5.3.3", - "psr/log": "^1.0", - "symfony/config": "^2.1|^3.0", - "symfony/console": "^2.1|^3.0", - "symfony/stopwatch": "^2.0|^3.0", - "symfony/yaml": "^2.0|^3.0" - }, - "suggest": { - "symfony/http-kernel": "Allows Symfony integration" - }, - "bin": [ - "bin/coveralls" - ], - "type": "library", - "autoload": { - "psr-4": { - "Satooshi\\": "src/Satooshi/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kitamura Satoshi", - "email": "with.no.parachute@gmail.com", - "homepage": "https://www.facebook.com/satooshi.jp" - } - ], - "description": "PHP client library for Coveralls API", - "homepage": "https://github.com/satooshi/php-coveralls", - "keywords": [ - "ci", - "coverage", - "github", - "test" - ], - "time": "2016-01-20 17:35:46" + "time": "2017-06-30T09:13:00+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe" + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe", - "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", "shasum": "" }, "require": { - "php": ">=5.6" + "php": "^5.6 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~5" + "phpunit/phpunit": "^5.7 || ^6.0" }, "type": "library", "extra": { @@ -1085,26 +967,26 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2016-02-13 06:45:14" + "time": "2017-03-04T06:30:41+00:00" }, { "name": "sebastian/comparator", - "version": "1.2.0", + "version": "1.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", "shasum": "" }, "require": { "php": ">=5.3.3", "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" + "sebastian/exporter": "~1.2 || ~2.0" }, "require-dev": { "phpunit/phpunit": "~4.4" @@ -1149,27 +1031,27 @@ "compare", "equality" ], - "time": "2015-07-26 15:48:44" + "time": "2017-01-29T09:50:25+00:00" }, { "name": "sebastian/diff", - "version": "1.4.1", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.8" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", "extra": { @@ -1201,32 +1083,32 @@ "keywords": [ "diff" ], - "time": "2015-12-08 07:14:41" + "time": "2017-05-22T07:24:03+00:00" }, { "name": "sebastian/environment", - "version": "1.3.8", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^5.6 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" + "phpunit/phpunit": "^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1251,25 +1133,25 @@ "environment", "hhvm" ], - "time": "2016-08-18 05:49:44" + "time": "2016-11-26T07:53:53+00:00" }, { "name": "sebastian/exporter", - "version": "1.2.2", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", "shasum": "" }, "require": { "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" + "sebastian/recursion-context": "~2.0" }, "require-dev": { "ext-mbstring": "*", @@ -1278,7 +1160,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1318,7 +1200,7 @@ "export", "exporter" ], - "time": "2016-06-17 09:04:28" + "time": "2016-11-19T08:54:04+00:00" }, { "name": "sebastian/global-state", @@ -1369,25 +1251,25 @@ "keywords": [ "global state" ], - "time": "2015-10-12 03:26:01" + "time": "2015-10-12T03:26:01+00:00" }, { "name": "sebastian/object-enumerator", - "version": "1.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "d4ca2fb70344987502567bc50081c03e6192fb26" + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/d4ca2fb70344987502567bc50081c03e6192fb26", - "reference": "d4ca2fb70344987502567bc50081c03e6192fb26", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7", + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7", "shasum": "" }, "require": { "php": ">=5.6", - "sebastian/recursion-context": "~1.0" + "sebastian/recursion-context": "~2.0" }, "require-dev": { "phpunit/phpunit": "~5" @@ -1395,7 +1277,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1415,20 +1297,20 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2016-01-28 13:25:10" + "time": "2017-02-18T15:18:39+00:00" }, { "name": "sebastian/recursion-context", - "version": "1.0.2", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791" + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", "shasum": "" }, "require": { @@ -1440,7 +1322,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1468,7 +1350,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-11-11 19:50:13" + "time": "2016-11-19T07:33:16+00:00" }, { "name": "sebastian/resource-operations", @@ -1510,20 +1392,20 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28 20:34:47" + "time": "2015-07-28T20:34:47+00:00" }, { "name": "sebastian/version", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5" + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", - "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", "shasum": "" }, "require": { @@ -1553,93 +1435,48 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-02-04 12:56:52" - }, - { - "name": "symfony/config", - "version": "v3.1.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "431d28df9c7bb6e77f8f6289d8670b044fabb9e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/431d28df9c7bb6e77f8f6289d8670b044fabb9e8", - "reference": "431d28df9c7bb6e77f8f6289d8670b044fabb9e8", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "symfony/filesystem": "~2.8|~3.0" - }, - "suggest": { - "symfony/yaml": "To use the yaml reference dumper" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Config Component", - "homepage": "https://symfony.com", - "time": "2016-08-27 18:50:07" + "time": "2016-10-03T07:35:21+00:00" }, { "name": "symfony/console", - "version": "v3.1.4", + "version": "v4.0.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "8ea494c34f0f772c3954b5fbe00bffc5a435e563" + "reference": "fe0e69d7162cba0885791cf7eea5f0d7bc0f897e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/8ea494c34f0f772c3954b5fbe00bffc5a435e563", - "reference": "8ea494c34f0f772c3954b5fbe00bffc5a435e563", + "url": "https://api.github.com/repos/symfony/console/zipball/fe0e69d7162cba0885791cf7eea5f0d7bc0f897e", + "reference": "fe0e69d7162cba0885791cf7eea5f0d7bc0f897e", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^7.1.3", "symfony/polyfill-mbstring": "~1.0" }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, "require-dev": { "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0" + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0" }, "suggest": { "psr/log": "For using the console logger", "symfony/event-dispatcher": "", + "symfony/lock": "", "symfony/process": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1666,129 +1503,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2016-08-19 06:48:39" - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.8.11", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "889983a79a043dfda68f38c38b6dba092dd49cd8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/889983a79a043dfda68f38c38b6dba092dd49cd8", - "reference": "889983a79a043dfda68f38c38b6dba092dd49cd8", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.0,>=2.0.5|~3.0.0", - "symfony/dependency-injection": "~2.6|~3.0.0", - "symfony/expression-language": "~2.6|~3.0.0", - "symfony/stopwatch": "~2.3|~3.0.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2016-07-28 16:56:28" - }, - { - "name": "symfony/filesystem", - "version": "v3.1.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "bb29adceb552d202b6416ede373529338136e84f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/bb29adceb552d202b6416ede373529338136e84f", - "reference": "bb29adceb552d202b6416ede373529338136e84f", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "https://symfony.com", - "time": "2016-07-20 05:44:26" + "time": "2018-01-03T07:38:00+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.2.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "dff51f72b0706335131b00a7f49606168c582594" + "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594", - "reference": "dff51f72b0706335131b00a7f49606168c582594", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", + "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", "shasum": "" }, "require": { @@ -1800,7 +1528,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.6-dev" } }, "autoload": { @@ -1834,29 +1562,29 @@ "portable", "shim" ], - "time": "2016-05-18 14:26:46" + "time": "2017-10-11T12:05:26+00:00" }, { "name": "symfony/process", - "version": "v3.1.4", + "version": "v4.0.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "e64e93041c80e77197ace5ab9385dedb5a143697" + "reference": "2145b3e8137e463b1051b79440a59b38220944f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/e64e93041c80e77197ace5ab9385dedb5a143697", - "reference": "e64e93041c80e77197ace5ab9385dedb5a143697", + "url": "https://api.github.com/repos/symfony/process/zipball/2145b3e8137e463b1051b79440a59b38220944f0", + "reference": "2145b3e8137e463b1051b79440a59b38220944f0", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1883,78 +1611,38 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2016-08-16 14:58:24" + "time": "2018-01-03T07:38:00+00:00" }, { - "name": "symfony/stopwatch", - "version": "v3.1.4", + "name": "symfony/yaml", + "version": "v4.0.3", "source": { "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "bb42806b12c5f89db4ebf64af6741afe6d8457e1" + "url": "https://github.com/symfony/yaml.git", + "reference": "b84f646b9490d2101e2c25ddeec77ceefbda2eee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/bb42806b12c5f89db4ebf64af6741afe6d8457e1", - "reference": "bb42806b12c5f89db4ebf64af6741afe6d8457e1", + "url": "https://api.github.com/repos/symfony/yaml/zipball/b84f646b9490d2101e2c25ddeec77ceefbda2eee", + "reference": "b84f646b9490d2101e2c25ddeec77ceefbda2eee", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^7.1.3" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Stopwatch Component", - "homepage": "https://symfony.com", - "time": "2016-06-29 05:41:56" - }, - { - "name": "symfony/yaml", - "version": "v3.1.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "f291ed25eb1435bddbe8a96caaef16469c2a092d" + "conflict": { + "symfony/console": "<3.4" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/f291ed25eb1435bddbe8a96caaef16469c2a092d", - "reference": "f291ed25eb1435bddbe8a96caaef16469c2a092d", - "shasum": "" + "require-dev": { + "symfony/console": "~3.4|~4.0" }, - "require": { - "php": ">=5.5.9" + "suggest": { + "symfony/console": "For validating YAML files using the lint command" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1981,24 +1669,24 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-09-02 02:12:52" + "time": "2018-01-03T07:38:00+00:00" }, { "name": "webmozart/assert", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "bb2d123231c095735130cc8f6d31385a44c7b308" + "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/bb2d123231c095735130cc8f6d31385a44c7b308", - "reference": "bb2d123231c095735130cc8f6d31385a44c7b308", + "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", + "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", "shasum": "" }, "require": { - "php": "^5.3.3|^7.0" + "php": "^5.3.3 || ^7.0" }, "require-dev": { "phpunit/phpunit": "^4.6", @@ -2007,7 +1695,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -2031,7 +1719,7 @@ "check", "validate" ], - "time": "2016-08-09 15:02:57" + "time": "2016-11-23T20:04:58+00:00" } ], "aliases": [], diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..a85447f --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,38 @@ + + + + + + + ./tests/*.php + + + + + + ./source/ + + + + + + + + + + + + From 48186584e4799708f393c1bea1927a3b54dcfe28 Mon Sep 17 00:00:00 2001 From: Joshua Date: Tue, 23 Jan 2018 16:45:12 -0800 Subject: [PATCH 09/31] Added the specific file. --- phpunit.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpunit.xml b/phpunit.xml index a85447f..7895805 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -17,7 +17,7 @@ - ./tests/*.php + ./tests/TraderTest.php From 515be62049e49217321b1b2af5ec67d424c4a0a4 Mon Sep 17 00:00:00 2001 From: Joshua Date: Tue, 23 Jan 2018 16:55:02 -0800 Subject: [PATCH 10/31] Attempt to correct phpunit issue. --- phpunit.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index 7895805..c9472a7 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -16,8 +16,8 @@ > - - ./tests/TraderTest.php + + ./tests From aa1246592db4602c16090da204480cf2aafab622 Mon Sep 17 00:00:00 2001 From: Joshua Date: Tue, 23 Jan 2018 17:02:19 -0800 Subject: [PATCH 11/31] Updated composer files --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 5ed9288..2c0aeca 100644 --- a/composer.json +++ b/composer.json @@ -17,8 +17,8 @@ "ext-trader": "*" }, "require-dev": { - "phpunit/phpunit": "~5.4", - "codacy/coverage": "~1.0", + "phpunit/phpunit": "~6.3.0", + "codacy/coverage": "~1.4.0", "phpmetrics/phpmetrics": "~2.3.2" }, "autoload": { From 36c229982d76758fbc5d56d889d5d6b764144aa3 Mon Sep 17 00:00:00 2001 From: Joshua Date: Tue, 23 Jan 2018 17:07:40 -0800 Subject: [PATCH 12/31] Updated composer files --- composer.lock | 436 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 284 insertions(+), 152 deletions(-) diff --git a/composer.lock b/composer.lock index a92c678..82fe9f9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "02ca6984c5c036d36e2d76f6f3dfa82d", + "content-hash": "f7641e61f8461268a7d266bc0e55f69e", "packages": [], "packages-dev": [ { @@ -258,6 +258,108 @@ ], "time": "2017-12-26T14:43:21+00:00" }, + { + "name": "phar-io/manifest", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^1.0.1", + "php": "^5.6 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2017-03-05T18:14:27+00:00" + }, + { + "name": "phar-io/version", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2017-03-05T17:38:23+00:00" + }, { "name": "phpdocumentor/reflection-common", "version": "1.0.1", @@ -536,40 +638,40 @@ }, { "name": "phpunit/php-code-coverage", - "version": "4.0.8", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d" + "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d", - "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/661f34d0bd3f1a7225ef491a70a020ad23a057a1", + "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^5.6 || ^7.0", - "phpunit/php-file-iterator": "^1.3", - "phpunit/php-text-template": "^1.2", - "phpunit/php-token-stream": "^1.4.2 || ^2.0", - "sebastian/code-unit-reverse-lookup": "^1.0", - "sebastian/environment": "^1.3.2 || ^2.0", - "sebastian/version": "^1.0 || ^2.0" + "php": "^7.0", + "phpunit/php-file-iterator": "^1.4.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^2.0.1", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^3.0", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1" }, "require-dev": { - "ext-xdebug": "^2.1.4", - "phpunit/phpunit": "^5.7" + "phpunit/phpunit": "^6.0" }, "suggest": { - "ext-xdebug": "^2.5.1" + "ext-xdebug": "^2.5.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0.x-dev" + "dev-master": "5.3.x-dev" } }, "autoload": { @@ -584,7 +686,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -595,7 +697,7 @@ "testing", "xunit" ], - "time": "2017-04-02T07:44:40+00:00" + "time": "2017-12-06T09:29:45+00:00" }, { "name": "phpunit/php-file-iterator", @@ -785,16 +887,16 @@ }, { "name": "phpunit/phpunit", - "version": "5.7.26", + "version": "6.3.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "7fbc25c13309de0c4c9bb48b7361f1eca34c7fbd" + "reference": "c0ff817b36a827e64bf5f57bc72278150cf30a77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7fbc25c13309de0c4c9bb48b7361f1eca34c7fbd", - "reference": "7fbc25c13309de0c4c9bb48b7361f1eca34c7fbd", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c0ff817b36a827e64bf5f57bc72278150cf30a77", + "reference": "c0ff817b36a827e64bf5f57bc72278150cf30a77", "shasum": "" }, "require": { @@ -803,33 +905,35 @@ "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "~1.3", - "php": "^5.6 || ^7.0", - "phpspec/prophecy": "^1.6.2", - "phpunit/php-code-coverage": "^4.0.4", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "^3.2", - "sebastian/comparator": "^1.2.4", - "sebastian/diff": "^1.4.3", - "sebastian/environment": "^1.3.4 || ^2.0", - "sebastian/exporter": "~2.0", - "sebastian/global-state": "^1.1", - "sebastian/object-enumerator": "~2.0", - "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0.3|~2.0", - "symfony/yaml": "~2.1|~3.0|~4.0" + "myclabs/deep-copy": "^1.6.1", + "phar-io/manifest": "^1.0.1", + "phar-io/version": "^1.0", + "php": "^7.0", + "phpspec/prophecy": "^1.7", + "phpunit/php-code-coverage": "^5.2.2", + "phpunit/php-file-iterator": "^1.4.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^1.0.9", + "phpunit/phpunit-mock-objects": "^4.0.3", + "sebastian/comparator": "^2.0.2", + "sebastian/diff": "^2.0", + "sebastian/environment": "^3.1", + "sebastian/exporter": "^3.1", + "sebastian/global-state": "^2.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^1.0", + "sebastian/version": "^2.0.1" }, "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2" + "phpdocumentor/reflection-docblock": "3.0.2", + "phpunit/dbunit": "<3.0" }, "require-dev": { "ext-pdo": "*" }, "suggest": { "ext-xdebug": "*", - "phpunit/php-invoker": "~1.1" + "phpunit/php-invoker": "^1.1" }, "bin": [ "phpunit" @@ -837,7 +941,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.7.x-dev" + "dev-master": "6.3.x-dev" } }, "autoload": { @@ -863,33 +967,33 @@ "testing", "xunit" ], - "time": "2017-12-17T06:14:38+00:00" + "time": "2017-09-24T07:25:54+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "3.4.4", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "a23b761686d50a560cc56233b9ecf49597cc9118" + "reference": "2f789b59ab89669015ad984afa350c4ec577ade0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118", - "reference": "a23b761686d50a560cc56233b9ecf49597cc9118", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/2f789b59ab89669015ad984afa350c4ec577ade0", + "reference": "2f789b59ab89669015ad984afa350c4ec577ade0", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.6 || ^7.0", - "phpunit/php-text-template": "^1.2", - "sebastian/exporter": "^1.2 || ^2.0" + "doctrine/instantiator": "^1.0.5", + "php": "^7.0", + "phpunit/php-text-template": "^1.2.1", + "sebastian/exporter": "^3.0" }, "conflict": { - "phpunit/phpunit": "<5.4.0" + "phpunit/phpunit": "<6.0" }, "require-dev": { - "phpunit/phpunit": "^5.4" + "phpunit/phpunit": "^6.0" }, "suggest": { "ext-soap": "*" @@ -897,7 +1001,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2.x-dev" + "dev-master": "4.0.x-dev" } }, "autoload": { @@ -922,7 +1026,7 @@ "mock", "xunit" ], - "time": "2017-06-30T09:13:00+00:00" + "time": "2017-08-03T14:08:16+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -971,30 +1075,30 @@ }, { "name": "sebastian/comparator", - "version": "1.2.4", + "version": "2.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + "reference": "11c07feade1d65453e06df3b3b90171d6d982087" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/11c07feade1d65453e06df3b3b90171d6d982087", + "reference": "11c07feade1d65453e06df3b3b90171d6d982087", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" + "php": "^7.0", + "sebastian/diff": "^2.0", + "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "2.1.x-dev" } }, "autoload": { @@ -1025,38 +1129,38 @@ } ], "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", "equality" ], - "time": "2017-01-29T09:50:25+00:00" + "time": "2018-01-12T06:34:42+00:00" }, { "name": "sebastian/diff", - "version": "1.4.3", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^6.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1083,32 +1187,32 @@ "keywords": [ "diff" ], - "time": "2017-05-22T07:24:03+00:00" + "time": "2017-08-03T08:09:46+00:00" }, { "name": "sebastian/environment", - "version": "2.0.0", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", - "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^5.0" + "phpunit/phpunit": "^6.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -1133,34 +1237,34 @@ "environment", "hhvm" ], - "time": "2016-11-26T07:53:53+00:00" + "time": "2017-07-01T08:51:00+00:00" }, { "name": "sebastian/exporter", - "version": "2.0.0", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", - "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~2.0" + "php": "^7.0", + "sebastian/recursion-context": "^3.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -1200,27 +1304,27 @@ "export", "exporter" ], - "time": "2016-11-19T08:54:04+00:00" + "time": "2017-04-03T13:19:02+00:00" }, { "name": "sebastian/global-state", - "version": "1.1.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.0" }, "suggest": { "ext-uopz": "*" @@ -1228,7 +1332,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1251,33 +1355,34 @@ "keywords": [ "global state" ], - "time": "2015-10-12T03:26:01+00:00" + "time": "2017-04-27T15:39:26+00:00" }, { "name": "sebastian/object-enumerator", - "version": "2.0.1", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7" + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7", - "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", "shasum": "" }, "require": { - "php": ">=5.6", - "sebastian/recursion-context": "~2.0" + "php": "^7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "~5" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -1297,32 +1402,77 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-02-18T15:18:39+00:00" + "time": "2017-08-03T12:35:26+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "773f97c67f28de00d397be301821b06708fca0be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", + "reference": "773f97c67f28de00d397be301821b06708fca0be", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "time": "2017-03-29T09:07:27+00:00" }, { "name": "sebastian/recursion-context", - "version": "2.0.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", - "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -1350,7 +1500,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-11-19T07:33:16+00:00" + "time": "2017-03-03T06:23:57+00:00" }, { "name": "sebastian/resource-operations", @@ -1614,62 +1764,44 @@ "time": "2018-01-03T07:38:00+00:00" }, { - "name": "symfony/yaml", - "version": "v4.0.3", + "name": "theseer/tokenizer", + "version": "1.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "b84f646b9490d2101e2c25ddeec77ceefbda2eee" + "url": "https://github.com/theseer/tokenizer.git", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/b84f646b9490d2101e2c25ddeec77ceefbda2eee", - "reference": "b84f646b9490d2101e2c25ddeec77ceefbda2eee", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", "shasum": "" }, "require": { - "php": "^7.1.3" - }, - "conflict": { - "symfony/console": "<3.4" - }, - "require-dev": { - "symfony/console": "~3.4|~4.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" } ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2018-01-03T07:38:00+00:00" + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2017-04-07T12:08:54+00:00" }, { "name": "webmozart/assert", From 6681441026439ad481f7527445094cf84d672e4b Mon Sep 17 00:00:00 2001 From: Joshua Date: Tue, 23 Jan 2018 17:22:34 -0800 Subject: [PATCH 13/31] Updated some things. --- .codeclimate.yml | 15 --------------- Tests/TraderTest.php | 3 ++- composer.json | 6 +++--- phpunit.xml | 6 +++--- 4 files changed, 8 insertions(+), 22 deletions(-) delete mode 100644 .codeclimate.yml diff --git a/.codeclimate.yml b/.codeclimate.yml deleted file mode 100644 index 0091df7..0000000 --- a/.codeclimate.yml +++ /dev/null @@ -1,15 +0,0 @@ -engines: - # ... CONFIG CONTENT ... - phpmd: - enabled: true - # ... CONFIG CONTENT ... - checks: - Naming/LongVariable: - enabled: false - Naming/ShortMethodName: - enabled: false - ExcessivePublicCount: - enabled: false - Controversial/CamelCaseParameterName: - enabled: false -# ... CONFIG CONTENT ... diff --git a/Tests/TraderTest.php b/Tests/TraderTest.php index 0cadc92..d8e8717 100644 --- a/Tests/TraderTest.php +++ b/Tests/TraderTest.php @@ -1,11 +1,12 @@ diff --git a/composer.json b/composer.json index 2c0aeca..9deeaba 100644 --- a/composer.json +++ b/composer.json @@ -4,10 +4,10 @@ "version": "1.0.2", "type": "library", "license": "GNU GPLv3", - "authors":[ + "authors": [ { - "name": "Joshua Saige", - "email": "joshuasaige@lupecode.com", + "name": "Joshua Lopez", + "email": "lupecode@lupecode.com", "homepage": "http://github.com/jbsaige", "role": "Developer" } diff --git a/phpunit.xml b/phpunit.xml index c9472a7..34a56b1 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -16,14 +16,14 @@ > - - ./tests + + tests - ./source/ + source From 846d83cbcff874f29f9854ec7eec4009ad5dc537 Mon Sep 17 00:00:00 2001 From: Joshua Date: Thu, 25 Jan 2018 21:10:47 -0800 Subject: [PATCH 14/31] Updated my email. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9deeaba..0027494 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "authors": [ { "name": "Joshua Lopez", - "email": "lupecode@lupecode.com", + "email": "joshua@lupecode.com", "homepage": "http://github.com/jbsaige", "role": "Developer" } From f4418c6084c14451a283eba3280bb76101439232 Mon Sep 17 00:00:00 2001 From: Anthony daCosta Date: Fri, 2 Feb 2018 12:36:53 -0500 Subject: [PATCH 15/31] Add throws phpdoc block to all functions --- source/Trader.php | 163 ++++++++++++++++++++++++++++++++ source/TraderTrait.php | 210 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 352 insertions(+), 21 deletions(-) diff --git a/source/Trader.php b/source/Trader.php index 9c2ecb8..ad3597d 100644 --- a/source/Trader.php +++ b/source/Trader.php @@ -24,6 +24,7 @@ class Trader * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathArcCosine(array $real): array { @@ -48,6 +49,7 @@ public static function mathArcCosine(array $real): array * @param array $volume Volume traded, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function chaikinAccumulationDistributionLine(array $high, array $low, array $close, array $volume): array { @@ -61,6 +63,7 @@ public static function chaikinAccumulationDistributionLine(array $high, array $l * @param array $real1 Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathAddition(array $real0, array $real1): array { @@ -87,6 +90,7 @@ public static function mathAddition(array $real0, array $real1): array * @param int|null $slowPeriod Number of period for the slow MA. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function chaikinAccumulationDistributionOscillator(array $high, array $low, array $close, array $volume, int $fastPeriod = null, int $slowPeriod = null): array { @@ -113,6 +117,7 @@ public static function chaikinAccumulationDistributionOscillator(array $high, ar * @param int|null $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function averageDirectionalMovementIndex(array $high, array $low, array $close, int $timePeriod = null): array { @@ -134,6 +139,7 @@ public static function averageDirectionalMovementIndex(array $high, array $low, * @param int|null $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function averageDirectionalMovementIndexRating(array $high, array $low, array $close, int $timePeriod = null): array { @@ -158,6 +164,7 @@ public static function averageDirectionalMovementIndexRating(array $high, array * @param int|null $mAType Type of Moving Average. TRADER_MA_TYPE_* series of constants should be used. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function absolutePriceOscillator(array $real, int $fastPeriod = null, int $slowPeriod = null, int $mAType = null): array { @@ -178,6 +185,7 @@ public static function absolutePriceOscillator(array $real, int $fastPeriod = nu * @param int|null $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function aroonIndicator(array $high, array $low, int $timePeriod = null): array { @@ -195,6 +203,7 @@ public static function aroonIndicator(array $high, array $low, int $timePeriod = * @param int|null $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function arronOscillator(array $high, array $low, int $timePeriod = null): array { @@ -209,6 +218,7 @@ public static function arronOscillator(array $high, array $low, int $timePeriod * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathArcSine(array $real): array { @@ -223,6 +233,7 @@ public static function mathArcSine(array $real): array * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathArcTangent(array $real): array { @@ -245,6 +256,7 @@ public static function mathArcTangent(array $real): array * @param int|null $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function averageTrueRange(array $high, array $low, array $close, int $timePeriod = null): array { @@ -263,6 +275,7 @@ public static function averageTrueRange(array $high, array $low, array $close, i * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function averagePrice(array $open, array $high, array $low, array $close): array { @@ -285,6 +298,7 @@ public static function averagePrice(array $open, array $high, array $low, array * @param int|null $mAType Type of Moving Average. TRADER_MA_TYPE_* series of constants should be used. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function bollingerBands(array $real, int $timePeriod = null, float $nbDevUp = null, float $nbDevDn = null, int $mAType = null): array { @@ -307,6 +321,7 @@ public static function bollingerBands(array $real, int $timePeriod = null, float * @param int|null $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function betaVolatility(array $real0, array $real1, int $timePeriod = null): array { @@ -322,6 +337,7 @@ public static function betaVolatility(array $real0, array $real1, int $timePerio * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function balanceOfPower(array $open, array $high, array $low, array $close): array { @@ -340,6 +356,7 @@ public static function balanceOfPower(array $open, array $high, array $low, arra * @param int|null $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function commodityChannelIndex(array $high, array $low, array $close, int $timePeriod = null): array { @@ -355,6 +372,7 @@ public static function commodityChannelIndex(array $high, array $low, array $clo * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleTwoCrows(array $open, array $high, array $low, array $close): array { @@ -370,6 +388,7 @@ public static function candleTwoCrows(array $open, array $high, array $low, arra * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleThreeBlackCrows(array $open, array $high, array $low, array $close): array { @@ -385,6 +404,7 @@ public static function candleThreeBlackCrows(array $open, array $high, array $lo * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleThreeInsideUpDown(array $open, array $high, array $low, array $close): array { @@ -400,6 +420,7 @@ public static function candleThreeInsideUpDown(array $open, array $high, array $ * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleThreeLineStrike(array $open, array $high, array $low, array $close): array { @@ -415,6 +436,7 @@ public static function candleThreeLineStrike(array $open, array $high, array $lo * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleThreeOutsideUpDown(array $open, array $high, array $low, array $close): array { @@ -430,6 +452,7 @@ public static function candleThreeOutsideUpDown(array $open, array $high, array * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleThreeStarsInTheSouth(array $open, array $high, array $low, array $close): array { @@ -445,6 +468,7 @@ public static function candleThreeStarsInTheSouth(array $open, array $high, arra * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleThreeWhiteSoldiers(array $open, array $high, array $low, array $close): array { @@ -461,6 +485,7 @@ public static function candleThreeWhiteSoldiers(array $open, array $high, array * @param float $penetration Percentage of penetration of a candle within another candle. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleAbandonedBaby(array $open, array $high, array $low, array $close, float $penetration = null): array { @@ -476,6 +501,7 @@ public static function candleAbandonedBaby(array $open, array $high, array $low, * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleAdvanceBlock(array $open, array $high, array $low, array $close): array { @@ -491,6 +517,7 @@ public static function candleAdvanceBlock(array $open, array $high, array $low, * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleBeltHold(array $open, array $high, array $low, array $close): array { @@ -506,6 +533,7 @@ public static function candleBeltHold(array $open, array $high, array $low, arra * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleBreakaway(array $open, array $high, array $low, array $close): array { @@ -521,6 +549,7 @@ public static function candleBreakaway(array $open, array $high, array $low, arr * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleClosingMarubozu(array $open, array $high, array $low, array $close): array { @@ -536,6 +565,7 @@ public static function candleClosingMarubozu(array $open, array $high, array $lo * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleConcealingBabySwallow(array $open, array $high, array $low, array $close): array { @@ -551,6 +581,7 @@ public static function candleConcealingBabySwallow(array $open, array $high, arr * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleCounterattack(array $open, array $high, array $low, array $close): array { @@ -567,6 +598,7 @@ public static function candleCounterattack(array $open, array $high, array $low, * @param float $penetration Percentage of penetration of a candle within another candle. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleDarkCloudCover(array $open, array $high, array $low, array $close, float $penetration = null): array { @@ -582,6 +614,7 @@ public static function candleDarkCloudCover(array $open, array $high, array $low * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleDoji(array $open, array $high, array $low, array $close): array { @@ -597,6 +630,7 @@ public static function candleDoji(array $open, array $high, array $low, array $c * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleDojiStar(array $open, array $high, array $low, array $close): array { @@ -612,6 +646,7 @@ public static function candleDojiStar(array $open, array $high, array $low, arra * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleDragonflyDoji(array $open, array $high, array $low, array $close): array { @@ -627,6 +662,7 @@ public static function candleDragonflyDoji(array $open, array $high, array $low, * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleEngulfingPattern(array $open, array $high, array $low, array $close): array { @@ -643,6 +679,7 @@ public static function candleEngulfingPattern(array $open, array $high, array $l * @param float $penetration Percentage of penetration of a candle within another candle. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleEveningDojiStar(array $open, array $high, array $low, array $close, float $penetration = null): array { @@ -659,6 +696,7 @@ public static function candleEveningDojiStar(array $open, array $high, array $lo * @param float $penetration Percentage of penetration of a candle within another candle. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleEveningStar(array $open, array $high, array $low, array $close, float $penetration = null): array { @@ -674,6 +712,7 @@ public static function candleEveningStar(array $open, array $high, array $low, a * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleUpDownGapsSideBySideWhiteLines(array $open, array $high, array $low, array $close): array { @@ -689,6 +728,7 @@ public static function candleUpDownGapsSideBySideWhiteLines(array $open, array $ * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleGravestoneDoji(array $open, array $high, array $low, array $close): array { @@ -704,6 +744,7 @@ public static function candleGravestoneDoji(array $open, array $high, array $low * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleHammer(array $open, array $high, array $low, array $close): array { @@ -719,6 +760,7 @@ public static function candleHammer(array $open, array $high, array $low, array * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleHangingMan(array $open, array $high, array $low, array $close): array { @@ -734,6 +776,7 @@ public static function candleHangingMan(array $open, array $high, array $low, ar * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleHarami(array $open, array $high, array $low, array $close): array { @@ -749,6 +792,7 @@ public static function candleHarami(array $open, array $high, array $low, array * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleHaramiCross(array $open, array $high, array $low, array $close): array { @@ -764,6 +808,7 @@ public static function candleHaramiCross(array $open, array $high, array $low, a * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleHighWave(array $open, array $high, array $low, array $close): array { @@ -779,6 +824,7 @@ public static function candleHighWave(array $open, array $high, array $low, arra * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleHikkake(array $open, array $high, array $low, array $close): array { @@ -794,6 +840,7 @@ public static function candleHikkake(array $open, array $high, array $low, array * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleModifiedHikkake(array $open, array $high, array $low, array $close): array { @@ -809,6 +856,7 @@ public static function candleModifiedHikkake(array $open, array $high, array $lo * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleHomingPigeon(array $open, array $high, array $low, array $close): array { @@ -824,6 +872,7 @@ public static function candleHomingPigeon(array $open, array $high, array $low, * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleIdenticalThreeCrows(array $open, array $high, array $low, array $close): array { @@ -839,6 +888,7 @@ public static function candleIdenticalThreeCrows(array $open, array $high, array * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleInNeck(array $open, array $high, array $low, array $close): array { @@ -854,6 +904,7 @@ public static function candleInNeck(array $open, array $high, array $low, array * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleInvertedHammer(array $open, array $high, array $low, array $close): array { @@ -869,6 +920,7 @@ public static function candleInvertedHammer(array $open, array $high, array $low * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleKicking(array $open, array $high, array $low, array $close): array { @@ -884,6 +936,7 @@ public static function candleKicking(array $open, array $high, array $low, array * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleKickingByLength(array $open, array $high, array $low, array $close): array { @@ -899,6 +952,7 @@ public static function candleKickingByLength(array $open, array $high, array $lo * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleLadderBottom(array $open, array $high, array $low, array $close): array { @@ -914,6 +968,7 @@ public static function candleLadderBottom(array $open, array $high, array $low, * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleLongLeggedDoji(array $open, array $high, array $low, array $close): array { @@ -929,6 +984,7 @@ public static function candleLongLeggedDoji(array $open, array $high, array $low * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleLongLine(array $open, array $high, array $low, array $close): array { @@ -944,6 +1000,7 @@ public static function candleLongLine(array $open, array $high, array $low, arra * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleMarubozu(array $open, array $high, array $low, array $close): array { @@ -959,6 +1016,7 @@ public static function candleMarubozu(array $open, array $high, array $low, arra * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleMatchingLow(array $open, array $high, array $low, array $close): array { @@ -975,6 +1033,7 @@ public static function candleMatchingLow(array $open, array $high, array $low, a * @param float $penetration Percentage of penetration of a candle within another candle. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleMatHold(array $open, array $high, array $low, array $close, float $penetration = null): array { @@ -991,6 +1050,7 @@ public static function candleMatHold(array $open, array $high, array $low, array * @param float $penetration Percentage of penetration of a candle within another candle. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleMorningDojiStar(array $open, array $high, array $low, array $close, float $penetration = null): array { @@ -1007,6 +1067,7 @@ public static function candleMorningDojiStar(array $open, array $high, array $lo * @param float $penetration Percentage of penetration of a candle within another candle. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleMorningStar(array $open, array $high, array $low, array $close, float $penetration = null): array { @@ -1022,6 +1083,7 @@ public static function candleMorningStar(array $open, array $high, array $low, a * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleOnNeck(array $open, array $high, array $low, array $close): array { @@ -1037,6 +1099,7 @@ public static function candleOnNeck(array $open, array $high, array $low, array * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candlePiercing(array $open, array $high, array $low, array $close): array { @@ -1052,6 +1115,7 @@ public static function candlePiercing(array $open, array $high, array $low, arra * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleRickshawMan(array $open, array $high, array $low, array $close): array { @@ -1067,6 +1131,7 @@ public static function candleRickshawMan(array $open, array $high, array $low, a * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleRisingFallingThreeMethods(array $open, array $high, array $low, array $close): array { @@ -1082,6 +1147,7 @@ public static function candleRisingFallingThreeMethods(array $open, array $high, * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleSeparatingLines(array $open, array $high, array $low, array $close): array { @@ -1097,6 +1163,7 @@ public static function candleSeparatingLines(array $open, array $high, array $lo * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleShootingStar(array $open, array $high, array $low, array $close): array { @@ -1112,6 +1179,7 @@ public static function candleShootingStar(array $open, array $high, array $low, * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleShortLine(array $open, array $high, array $low, array $close): array { @@ -1127,6 +1195,7 @@ public static function candleShortLine(array $open, array $high, array $low, arr * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleSpinningTop(array $open, array $high, array $low, array $close): array { @@ -1142,6 +1211,7 @@ public static function candleSpinningTop(array $open, array $high, array $low, a * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleStalled(array $open, array $high, array $low, array $close): array { @@ -1157,6 +1227,7 @@ public static function candleStalled(array $open, array $high, array $low, array * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleStickSandwich(array $open, array $high, array $low, array $close): array { @@ -1172,6 +1243,7 @@ public static function candleStickSandwich(array $open, array $high, array $low, * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleTakuri(array $open, array $high, array $low, array $close): array { @@ -1187,6 +1259,7 @@ public static function candleTakuri(array $open, array $high, array $low, array * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleTasukiGap(array $open, array $high, array $low, array $close): array { @@ -1202,6 +1275,7 @@ public static function candleTasukiGap(array $open, array $high, array $low, arr * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleThrusting(array $open, array $high, array $low, array $close): array { @@ -1217,6 +1291,7 @@ public static function candleThrusting(array $open, array $high, array $low, arr * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleTristar(array $open, array $high, array $low, array $close): array { @@ -1232,6 +1307,7 @@ public static function candleTristar(array $open, array $high, array $low, array * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleUniqueThreeRiver(array $open, array $high, array $low, array $close): array { @@ -1247,6 +1323,7 @@ public static function candleUniqueThreeRiver(array $open, array $high, array $l * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleUpsideGapTwoCrows(array $open, array $high, array $low, array $close): array { @@ -1262,6 +1339,7 @@ public static function candleUpsideGapTwoCrows(array $open, array $high, array $ * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function candleUpsideDownsideGapThreeMethods(array $open, array $high, array $low, array $close): array { @@ -1276,6 +1354,7 @@ public static function candleUpsideDownsideGapThreeMethods(array $open, array $h * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathCeiling(array $real): array { @@ -1293,6 +1372,7 @@ public static function mathCeiling(array $real): array * @param int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function chandeMomentumOscillator(array $real, int $timePeriod): array { @@ -1309,6 +1389,7 @@ public static function chandeMomentumOscillator(array $real, int $timePeriod): a * @param int|null $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function pearsonCorrelationCoefficient(array $real0, array $real1, int $timePeriod = null): array { @@ -1323,6 +1404,7 @@ public static function pearsonCorrelationCoefficient(array $real0, array $real1, * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathCosine(array $real): array { @@ -1337,6 +1419,7 @@ public static function mathCosine(array $real): array * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathHyperbolicCosine(array $real): array { @@ -1353,6 +1436,7 @@ public static function mathHyperbolicCosine(array $real): array * @param int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function doubleExponentialMovingAverage(array $real, int $timePeriod): array { @@ -1368,6 +1452,7 @@ public static function doubleExponentialMovingAverage(array $real, int $timePeri * @param array $real1 Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathDivision(array $real0, array $real1): array { @@ -1386,6 +1471,7 @@ public static function mathDivision(array $real0, array $real1): array * @param int|null $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function directionalMovementIndex(array $high, array $low, array $close, int $timePeriod = null): array { @@ -1403,6 +1489,7 @@ public static function directionalMovementIndex(array $high, array $low, array $ * @param int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function exponentialMovingAverage(array $real, int $timePeriod): array { @@ -1415,6 +1502,7 @@ public static function exponentialMovingAverage(array $real, int $timePeriod): a * Get error code of the last operation. * * @return int Returns the error code identified by one of the TRADER_ERR_* constants. + * @throws \Exception */ public static function errorNumber(): integer { @@ -1429,6 +1517,7 @@ public static function errorNumber(): integer * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathExponent(array $real): array { @@ -1443,6 +1532,7 @@ public static function mathExponent(array $real): array * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathFloor(array $real): array { @@ -1455,6 +1545,7 @@ public static function mathFloor(array $real): array * Get compatibility mode which affects the way calculations are done by all the extension functions. * * @return int Returns the compatibility mode id which can be identified by TRADER_COMPATIBILITY_* series of constants. + * @throws \Exception */ public static function getCompatibilityMode(): integer { @@ -1469,6 +1560,7 @@ public static function getCompatibilityMode(): integer * @param int $functionId Function ID the factor to be read for. TRADER_FUNC_UNST_* series of constants should be used. * * @return int Returns the unstable period factor for the corresponding function. + * @throws \Exception */ public static function getUnstablePeriod(integer $functionId): integer { @@ -1481,6 +1573,7 @@ public static function getUnstablePeriod(integer $functionId): integer * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function hilbertTransformDominantCyclePeriod(array $real): array { @@ -1493,6 +1586,7 @@ public static function hilbertTransformDominantCyclePeriod(array $real): array * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function hilbertTransformDominantCyclePhase(array $real): array { @@ -1506,6 +1600,7 @@ public static function hilbertTransformDominantCyclePhase(array $real): array * @param array $inPhase Empty array, will be filled with in phase data. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function hilbertTransformPhasorComponents(array $real, array &$inPhase): array { @@ -1519,6 +1614,7 @@ public static function hilbertTransformPhasorComponents(array $real, array &$inP * @param array $sine Empty array, will be filled with sine data. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function hilbertTransformSineWave(array $real, array &$sine): array { @@ -1531,6 +1627,7 @@ public static function hilbertTransformSineWave(array $real, array &$sine): arra * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function hilbertTransformInstantaneousTrendLine(array $real): array { @@ -1543,6 +1640,7 @@ public static function hilbertTransformInstantaneousTrendLine(array $real): arra * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function hilbertTransformTrendVsCycleMode(array $real): array { @@ -1561,6 +1659,7 @@ public static function hilbertTransformTrendVsCycleMode(array $real): array * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function kaufmanAdaptiveMovingAverage(array $real, int $timePeriod = null): array { @@ -1574,6 +1673,7 @@ public static function kaufmanAdaptiveMovingAverage(array $real, int $timePeriod * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function linearRegressionAngle(array $real, int $timePeriod = null): array { @@ -1587,6 +1687,7 @@ public static function linearRegressionAngle(array $real, int $timePeriod = null * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function linearRegressionIntercept(array $real, int $timePeriod = null): array { @@ -1600,6 +1701,7 @@ public static function linearRegressionIntercept(array $real, int $timePeriod = * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function linearRegressionSlope(array $real, int $timePeriod = null): array { @@ -1613,6 +1715,7 @@ public static function linearRegressionSlope(array $real, int $timePeriod = null * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function linearRegression(array $real, int $timePeriod = null): array { @@ -1627,6 +1730,7 @@ public static function linearRegression(array $real, int $timePeriod = null): ar * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathLogarithmNatural(array $real): array { @@ -1641,6 +1745,7 @@ public static function mathLogarithmNatural(array $real): array * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathLogarithmBase10(array $real): array { @@ -1655,6 +1760,7 @@ public static function mathLogarithmBase10(array $real): array * @param int $mAType Type of Moving Average. TRADER_MA_TYPE_* series of constants should be used. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function movingAverage(array $real, int $timePeriod = null, int $mAType = null): array { @@ -1670,6 +1776,7 @@ public static function movingAverage(array $real, int $timePeriod = null, int $m * @param int|null $signalPeriod Smoothing for the signal line (nb of period). Valid range from 1 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function movingAverageConvergenceDivergence(array $real, int $fastPeriod = null, int $slowPeriod = null, int $signalPeriod = null): array { @@ -1687,6 +1794,7 @@ public static function movingAverageConvergenceDivergence(array $real, int $fast * @param int|null $signalPeriod Smoothing for the signal line (nb of period). Valid range from 1 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function movingAverageConvergenceDivergenceExtended(array $real, int $fastPeriod = null, int $fastMAType = null, int $slowPeriod = null, int $slowMAType = null, int $signalPeriod = null): array { @@ -1700,6 +1808,7 @@ public static function movingAverageConvergenceDivergenceExtended(array $real, i * @param int|null $signalPeriod Smoothing for the signal line (nb of period). Valid range from 1 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function movingAverageConvergenceDivergenceFixed(array $real, int $signalPeriod = null): array { @@ -1714,6 +1823,7 @@ public static function movingAverageConvergenceDivergenceFixed(array $real, int * @param float|null $slowLimit Lower limit use in the adaptive algorithm. Valid range from 0.01 to 0.99. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mesaAdaptiveMovingAverage(array $real, float $fastLimit = null, float $slowLimit = null): array { @@ -1730,6 +1840,7 @@ public static function mesaAdaptiveMovingAverage(array $real, float $fastLimit = * @param int|null $mAType Type of Moving Average. TRADER_MA_TYPE_* series of constants should be used. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function movingAverageVariablePeriod(array $real, array $periods, int $minPeriod = null, int $maxPeriod = null, int $mAType = null): array { @@ -1743,6 +1854,7 @@ public static function movingAverageVariablePeriod(array $real, array $periods, * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathMax(array $real, int $timePeriod = null): array { @@ -1756,6 +1868,7 @@ public static function mathMax(array $real, int $timePeriod = null): array * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathMaxIndex(array $real, int $timePeriod = null): array { @@ -1769,6 +1882,7 @@ public static function mathMaxIndex(array $real, int $timePeriod = null): array * @param array $low Low price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathMedianPrice(array $high, array $low): array { @@ -1785,6 +1899,7 @@ public static function mathMedianPrice(array $high, array $low): array * @param int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function moneyFlowIndex(array $high, array $low, array $close, array $volume, int $timePeriod = null): array { @@ -1798,6 +1913,7 @@ public static function moneyFlowIndex(array $high, array $low, array $close, arr * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function middlePoint(array $real, int $timePeriod = null): array { @@ -1812,6 +1928,7 @@ public static function middlePoint(array $real, int $timePeriod = null): array * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function middlePointPrice(array $high, array $low, int $timePeriod = null) { @@ -1825,6 +1942,7 @@ public static function middlePointPrice(array $high, array $low, int $timePeriod * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathMin(array $real, int $timePeriod = null): array { @@ -1838,6 +1956,7 @@ public static function mathMin(array $real, int $timePeriod = null): array * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathMinIndex(array $real, int $timePeriod = null): array { @@ -1851,6 +1970,7 @@ public static function mathMinIndex(array $real, int $timePeriod = null): array * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathMinMax(array $real, int $timePeriod = null): array { @@ -1864,6 +1984,7 @@ public static function mathMinMax(array $real, int $timePeriod = null): array * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathMinMaxIndex(array $real, int $timePeriod = null): array { @@ -1879,6 +2000,7 @@ public static function mathMinMaxIndex(array $real, int $timePeriod = null): arr * @param int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function minusDirectionalIndicator(array $high, array $low, array $close, int $timePeriod = null): array { @@ -1893,6 +2015,7 @@ public static function minusDirectionalIndicator(array $high, array $low, array * @param int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function minusDirectionalMovement(array $high, array $low, int $timePeriod = null): array { @@ -1906,6 +2029,7 @@ public static function minusDirectionalMovement(array $high, array $low, int $ti * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function momentum(array $real, int $timePeriod = null): array { @@ -1920,6 +2044,7 @@ public static function momentum(array $real, int $timePeriod = null): array * @param array $real1 Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathMultiply(array $real0, array $real1): array { @@ -1935,6 +2060,7 @@ public static function mathMultiply(array $real0, array $real1): array * @param int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function normalizedAverageTrueRange(array $high, array $low, array $close, int $timePeriod = null): array { @@ -1948,6 +2074,7 @@ public static function normalizedAverageTrueRange(array $high, array $low, array * @param array $volume Volume traded, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function onBalanceVolume(array $real, array $volume): array { @@ -1963,6 +2090,7 @@ public static function onBalanceVolume(array $real, array $volume): array * @param int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function plusDirectionalIndicator(array $high, array $low, array $close, int $timePeriod = null): array { @@ -1977,6 +2105,7 @@ public static function plusDirectionalIndicator(array $high, array $low, array $ * @param int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function plusDirectionalMovement(array $high, array $low, int $timePeriod = null): array { @@ -1992,6 +2121,7 @@ public static function plusDirectionalMovement(array $high, array $low, int $tim * @param int|null $mAType Type of Moving Average. TRADER_MA_TYPE_* series of constants should be used. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function percentagePriceOscillator(array $real, int $fastPeriod = null, int $slowPeriod = null, int $mAType = null): array { @@ -2005,6 +2135,7 @@ public static function percentagePriceOscillator(array $real, int $fastPeriod = * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function rateOfChange(array $real, int $timePeriod = null): array { @@ -2018,6 +2149,7 @@ public static function rateOfChange(array $real, int $timePeriod = null): array * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function rateOfChangePercentage(array $real, int $timePeriod = null): array { @@ -2031,6 +2163,7 @@ public static function rateOfChangePercentage(array $real, int $timePeriod = nul * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function rateOfChangeRatio100(array $real, int $timePeriod = null): array { @@ -2044,6 +2177,7 @@ public static function rateOfChangeRatio100(array $real, int $timePeriod = null) * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function rateOfChangeRatio(array $real, int $timePeriod = null): array { @@ -2057,6 +2191,7 @@ public static function rateOfChangeRatio(array $real, int $timePeriod = null): a * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function relativeStrengthIndex(array $real, int $timePeriod = null): array { @@ -2072,6 +2207,7 @@ public static function relativeStrengthIndex(array $real, int $timePeriod = null * @param float|null $maximum Acceleration Factor Maximum value. Valid range from 0 to TRADER_REAL_MAX. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function parabolicSAR(array $high, array $low, float $acceleration = null, float $maximum = null): array { @@ -2093,6 +2229,7 @@ public static function parabolicSAR(array $high, array $low, float $acceleration * @param float|null $accelerationMaxShort Acceleration Factor maximum value for the Short direction. Valid range from 0 to TRADER_REAL_MAX. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function parabolicSARExtended(array $high, array $low, float $startValue = null, float $offsetOnReverse = null, float $accelerationInitLong = null, float $accelerationLong = null, float $accelerationMaxLong = null, float $accelerationInitShort = null, float $accelerationShort = null, float $accelerationMaxShort = null): array { @@ -2104,6 +2241,7 @@ public static function parabolicSARExtended(array $high, array $low, float $star * Set compatibility mode which will affect the way calculations are done by all the extension functions. * * @param int $compatId Compatibility Id. TRADER_COMPATIBILITY_* series of constants should be used. + * @throws \Exception */ public static function setCompatibilityMode(integer $compatId) { @@ -2116,6 +2254,7 @@ public static function setCompatibilityMode(integer $compatId) * * @param int $functionId Function ID the factor should be set for. TRADER_FUNC_UNST_* constant series can be used to affect the corresponding function. * @param int $timePeriod Unstable period value. + * @throws \Exception */ public static function setUnstablePeriod(integer $functionId, int $timePeriod) { @@ -2129,6 +2268,7 @@ public static function setUnstablePeriod(integer $functionId, int $timePeriod) * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathSine(array $real): array { @@ -2142,6 +2282,7 @@ public static function mathSine(array $real): array * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathHyperbolicSine(array $real): array { @@ -2155,6 +2296,7 @@ public static function mathHyperbolicSine(array $real): array * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function simpleMovingAverage(array $real, int $timePeriod = null): array { @@ -2168,6 +2310,7 @@ public static function simpleMovingAverage(array $real, int $timePeriod = null): * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathSquareRoot(array $real): array { @@ -2182,6 +2325,7 @@ public static function mathSquareRoot(array $real): array * @param float $nbDev * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function standardDeviation(array $real, int $timePeriod = null, float $nbDev = null): array { @@ -2201,6 +2345,7 @@ public static function standardDeviation(array $real, int $timePeriod = null, fl * @param int|null $slowD_MAType Type of Moving Average for Slow-D. TRADER_MA_TYPE_* series of constants should be used. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function stochastic(array $high, array $low, array $close, int $fastK_Period = null, int $slowK_Period = null, int $slowK_MAType = null, int $slowD_Period = null, int $slowD_MAType = null): array { @@ -2218,6 +2363,7 @@ public static function stochastic(array $high, array $low, array $close, int $fa * @param int|null $fastD_MAType Type of Moving Average for Fast-D. TRADER_MA_TYPE_* series of constants should be used. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function stochasticFast(array $high, array $low, array $close, int $fastK_Period = null, int $fastD_Period = null, int $fastD_MAType = null): array { @@ -2234,6 +2380,7 @@ public static function stochasticFast(array $high, array $low, array $close, int * @param int|null $fastD_MAType Type of Moving Average for Fast-D. TRADER_MA_TYPE_* series of constants should be used. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function stochasticRelativeStrengthIndex(array $real, int $timePeriod = null, int $fastK_Period = null, int $fastD_Period = null, int $fastD_MAType = null): array { @@ -2248,6 +2395,7 @@ public static function stochasticRelativeStrengthIndex(array $real, int $timePer * @param array $real1 Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathSubtraction(array $real0, array $real1): array { @@ -2261,6 +2409,7 @@ public static function mathSubtraction(array $real0, array $real1): array * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathSummation(array $real, int $timePeriod = null): array { @@ -2275,6 +2424,7 @@ public static function mathSummation(array $real, int $timePeriod = null): array * @param float $vFactor Volume Factor. Valid range from 1 to 0. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function tripleExponentialMovingAverageT3(array $real, int $timePeriod = null, float $vFactor = null): array { @@ -2288,6 +2438,7 @@ public static function tripleExponentialMovingAverageT3(array $real, int $timePe * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathTangent(array $real): array { @@ -2301,6 +2452,7 @@ public static function mathTangent(array $real): array * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mathHyperbolicTangent(array $real): array { @@ -2314,6 +2466,7 @@ public static function mathHyperbolicTangent(array $real): array * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function tripleExponentialMovingAverage(array $real, int $timePeriod = null): array { @@ -2328,6 +2481,7 @@ public static function tripleExponentialMovingAverage(array $real, int $timePeri * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function trueRange(array $high, array $low, array $close): array { @@ -2341,6 +2495,7 @@ public static function trueRange(array $high, array $low, array $close): array * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function triangularMovingAverage(array $real, int $timePeriod = null): array { @@ -2354,6 +2509,7 @@ public static function triangularMovingAverage(array $real, int $timePeriod = nu * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function tripleExponentialAverage(array $real, int $timePeriod = null): array { @@ -2367,6 +2523,7 @@ public static function tripleExponentialAverage(array $real, int $timePeriod = n * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function timeSeriesForecast(array $real, int $timePeriod = null): array { @@ -2381,6 +2538,7 @@ public static function timeSeriesForecast(array $real, int $timePeriod = null): * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function typicalPrice(array $high, array $low, array $close): array { @@ -2398,6 +2556,7 @@ public static function typicalPrice(array $high, array $low, array $close): arra * @param int|null $timePeriod3 Number of bars for 3rd period. Valid range from 1 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function ultimateOscillator(array $high, array $low, array $close, int $timePeriod1 = null, int $timePeriod2 = null, int $timePeriod3 = null): array { @@ -2412,6 +2571,7 @@ public static function ultimateOscillator(array $high, array $low, array $close, * @param float $nbDev * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function variance(array $real, int $timePeriod = null, float $nbDev = null): array { @@ -2426,6 +2586,7 @@ public static function variance(array $real, int $timePeriod = null, float $nbDe * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function weightedClosePrice(array $high, array $low, array $close): array { @@ -2441,6 +2602,7 @@ public static function weightedClosePrice(array $high, array $low, array $close) * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function williamsR(array $high, array $low, array $close, int $timePeriod = null): array { @@ -2454,6 +2616,7 @@ public static function williamsR(array $high, array $low, array $close, int $tim * @param null|int $timePeriod Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function weightedMovingAverage(array $real, int $timePeriod = null): array { diff --git a/source/TraderTrait.php b/source/TraderTrait.php index 0eec98a..f703316 100644 --- a/source/TraderTrait.php +++ b/source/TraderTrait.php @@ -90,6 +90,9 @@ trait TraderTrait 65535 => "Unknown error", ]; + /** + * @throws \Exception + */ protected static function checkForError() { $errorNumber = trader_errno(); @@ -107,6 +110,7 @@ protected static function checkForError() * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function acos(array $real): array { @@ -125,6 +129,7 @@ public static function acos(array $real): array * @param array $volume Volume traded, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function ad(array $high, array $low, array $close, array $volume): array { @@ -141,6 +146,7 @@ public static function ad(array $high, array $low, array $close, array $volume): * @param array $real1 Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function add(array $real0, array $real1): array { @@ -161,6 +167,7 @@ public static function add(array $real0, array $real1): array * @param int $slowPeriod [OPTIONAL] [DEFAULT 10] Number of period for the slow MA. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function adosc(array $high, array $low, array $close, array $volume, int $fastPeriod = null, int $slowPeriod = null): array { @@ -181,6 +188,7 @@ public static function adosc(array $high, array $low, array $close, array $volum * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function adx(array $high, array $low, array $close, int $timePeriod = null): array { @@ -200,6 +208,7 @@ public static function adx(array $high, array $low, array $close, int $timePerio * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function adxr(array $high, array $low, array $close, int $timePeriod = null): array { @@ -219,6 +228,7 @@ public static function adxr(array $high, array $low, array $close, int $timePeri * @param int $mAType [OPTIONAL] [DEFAULT TRADER_MA_TYPE_SMA] Type of Moving Average. TRADER_MA_TYPE_* series of constants should be used. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function apo(array $real, int $fastPeriod = null, int $slowPeriod = null, int $mAType = null): array { @@ -239,6 +249,7 @@ public static function apo(array $real, int $fastPeriod = null, int $slowPeriod * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function aroon(array $high, array $low, int $timePeriod = null): array { @@ -257,6 +268,7 @@ public static function aroon(array $high, array $low, int $timePeriod = null): a * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function aroonosc(array $high, array $low, int $timePeriod = null): array { @@ -274,6 +286,7 @@ public static function aroonosc(array $high, array $low, int $timePeriod = null) * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function asin(array $real): array { @@ -290,6 +303,7 @@ public static function asin(array $real): array * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function atan(array $real): array { @@ -308,6 +322,7 @@ public static function atan(array $real): array * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function atr(array $high, array $low, array $close, int $timePeriod = null): array { @@ -327,6 +342,7 @@ public static function atr(array $high, array $low, array $close, int $timePerio * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function avgprice(array $open, array $high, array $low, array $close): array { @@ -346,6 +362,7 @@ public static function avgprice(array $open, array $high, array $low, array $clo * @param int $mAType [OPTIONAL] [DEFAULT TRADER_MA_TYPE_SMA] Type of Moving Average. TRADER_MA_TYPE_* series of constants should be used. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function bbands(array $real, int $timePeriod = null, float $nbDevUp = null, float $nbDevDn = null, int $mAType = null): array { @@ -367,6 +384,7 @@ public static function bbands(array $real, int $timePeriod = null, float $nbDevU * @param int $timePeriod [OPTIONAL] [DEFAULT 5] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function beta(array $real0, array $real1, int $timePeriod = null): array { @@ -386,6 +404,7 @@ public static function beta(array $real0, array $real1, int $timePeriod = null): * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function bop(array $open, array $high, array $low, array $close): array { @@ -404,6 +423,7 @@ public static function bop(array $open, array $high, array $low, array $close): * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cci(array $high, array $low, array $close, int $timePeriod = null): array { @@ -423,6 +443,7 @@ public static function cci(array $high, array $low, array $close, int $timePerio * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdl2crows(array $open, array $high, array $low, array $close): array { @@ -441,6 +462,7 @@ public static function cdl2crows(array $open, array $high, array $low, array $cl * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdl3blackcrows(array $open, array $high, array $low, array $close): array { @@ -459,6 +481,7 @@ public static function cdl3blackcrows(array $open, array $high, array $low, arra * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdl3inside(array $open, array $high, array $low, array $close): array { @@ -477,6 +500,7 @@ public static function cdl3inside(array $open, array $high, array $low, array $c * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdl3linestrike(array $open, array $high, array $low, array $close): array { @@ -495,6 +519,7 @@ public static function cdl3linestrike(array $open, array $high, array $low, arra * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdl3outside(array $open, array $high, array $low, array $close): array { @@ -513,6 +538,7 @@ public static function cdl3outside(array $open, array $high, array $low, array $ * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdl3starsinsouth(array $open, array $high, array $low, array $close): array { @@ -531,6 +557,7 @@ public static function cdl3starsinsouth(array $open, array $high, array $low, ar * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdl3whitesoldiers(array $open, array $high, array $low, array $close): array { @@ -550,6 +577,7 @@ public static function cdl3whitesoldiers(array $open, array $high, array $low, a * @param float $penetration [OPTIONAL] [DEFAULT 0.3] Percentage of penetration of a candle within another candle. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlabandonedbaby(array $open, array $high, array $low, array $close, float $penetration = null): array { @@ -569,6 +597,7 @@ public static function cdlabandonedbaby(array $open, array $high, array $low, ar * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdladvanceblock(array $open, array $high, array $low, array $close): array { @@ -587,6 +616,7 @@ public static function cdladvanceblock(array $open, array $high, array $low, arr * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlbelthold(array $open, array $high, array $low, array $close): array { @@ -605,6 +635,7 @@ public static function cdlbelthold(array $open, array $high, array $low, array $ * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlbreakaway(array $open, array $high, array $low, array $close): array { @@ -623,6 +654,7 @@ public static function cdlbreakaway(array $open, array $high, array $low, array * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlclosingmarubozu(array $open, array $high, array $low, array $close): array { @@ -641,6 +673,7 @@ public static function cdlclosingmarubozu(array $open, array $high, array $low, * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlconcealbabyswall(array $open, array $high, array $low, array $close): array { @@ -659,6 +692,7 @@ public static function cdlconcealbabyswall(array $open, array $high, array $low, * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlcounterattack(array $open, array $high, array $low, array $close): array { @@ -678,6 +712,7 @@ public static function cdlcounterattack(array $open, array $high, array $low, ar * @param float $penetration [OPTIONAL] [DEFAULT 0.5] Percentage of penetration of a candle within another candle. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdldarkcloudcover(array $open, array $high, array $low, array $close, float $penetration = null): array { @@ -697,6 +732,7 @@ public static function cdldarkcloudcover(array $open, array $high, array $low, a * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdldoji(array $open, array $high, array $low, array $close): array { @@ -715,6 +751,7 @@ public static function cdldoji(array $open, array $high, array $low, array $clos * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdldojistar(array $open, array $high, array $low, array $close): array { @@ -733,6 +770,7 @@ public static function cdldojistar(array $open, array $high, array $low, array $ * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdldragonflydoji(array $open, array $high, array $low, array $close): array { @@ -751,6 +789,7 @@ public static function cdldragonflydoji(array $open, array $high, array $low, ar * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlengulfing(array $open, array $high, array $low, array $close): array { @@ -770,6 +809,7 @@ public static function cdlengulfing(array $open, array $high, array $low, array * @param float $penetration [OPTIONAL] [DEFAULT 0.3] Percentage of penetration of a candle within another candle. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdleveningdojistar(array $open, array $high, array $low, array $close, float $penetration = null): array { @@ -790,6 +830,7 @@ public static function cdleveningdojistar(array $open, array $high, array $low, * @param float $penetration [OPTIONAL] [DEFAULT 0.3] Percentage of penetration of a candle within another candle. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdleveningstar(array $open, array $high, array $low, array $close, float $penetration = null): array { @@ -809,6 +850,7 @@ public static function cdleveningstar(array $open, array $high, array $low, arra * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlgapsidesidewhite(array $open, array $high, array $low, array $close): array { @@ -827,6 +869,7 @@ public static function cdlgapsidesidewhite(array $open, array $high, array $low, * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlgravestonedoji(array $open, array $high, array $low, array $close): array { @@ -845,6 +888,7 @@ public static function cdlgravestonedoji(array $open, array $high, array $low, a * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlhammer(array $open, array $high, array $low, array $close): array { @@ -863,6 +907,7 @@ public static function cdlhammer(array $open, array $high, array $low, array $cl * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlhangingman(array $open, array $high, array $low, array $close): array { @@ -881,6 +926,7 @@ public static function cdlhangingman(array $open, array $high, array $low, array * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlharami(array $open, array $high, array $low, array $close): array { @@ -899,6 +945,7 @@ public static function cdlharami(array $open, array $high, array $low, array $cl * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlharamicross(array $open, array $high, array $low, array $close): array { @@ -917,6 +964,7 @@ public static function cdlharamicross(array $open, array $high, array $low, arra * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlhighwave(array $open, array $high, array $low, array $close): array { @@ -935,6 +983,7 @@ public static function cdlhighwave(array $open, array $high, array $low, array $ * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlhikkake(array $open, array $high, array $low, array $close): array { @@ -953,6 +1002,7 @@ public static function cdlhikkake(array $open, array $high, array $low, array $c * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlhikkakemod(array $open, array $high, array $low, array $close): array { @@ -971,6 +1021,7 @@ public static function cdlhikkakemod(array $open, array $high, array $low, array * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlhomingpigeon(array $open, array $high, array $low, array $close): array { @@ -989,6 +1040,7 @@ public static function cdlhomingpigeon(array $open, array $high, array $low, arr * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlidentical3crows(array $open, array $high, array $low, array $close): array { @@ -1007,6 +1059,7 @@ public static function cdlidentical3crows(array $open, array $high, array $low, * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlinneck(array $open, array $high, array $low, array $close): array { @@ -1025,6 +1078,7 @@ public static function cdlinneck(array $open, array $high, array $low, array $cl * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlinvertedhammer(array $open, array $high, array $low, array $close): array { @@ -1043,6 +1097,7 @@ public static function cdlinvertedhammer(array $open, array $high, array $low, a * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlkicking(array $open, array $high, array $low, array $close): array { @@ -1061,6 +1116,7 @@ public static function cdlkicking(array $open, array $high, array $low, array $c * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlkickingbylength(array $open, array $high, array $low, array $close): array { @@ -1079,6 +1135,7 @@ public static function cdlkickingbylength(array $open, array $high, array $low, * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlladderbottom(array $open, array $high, array $low, array $close): array { @@ -1097,6 +1154,7 @@ public static function cdlladderbottom(array $open, array $high, array $low, arr * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdllongleggeddoji(array $open, array $high, array $low, array $close): array { @@ -1115,6 +1173,7 @@ public static function cdllongleggeddoji(array $open, array $high, array $low, a * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdllongline(array $open, array $high, array $low, array $close): array { @@ -1133,6 +1192,7 @@ public static function cdllongline(array $open, array $high, array $low, array $ * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlmarubozu(array $open, array $high, array $low, array $close): array { @@ -1151,6 +1211,7 @@ public static function cdlmarubozu(array $open, array $high, array $low, array $ * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlmatchinglow(array $open, array $high, array $low, array $close): array { @@ -1170,6 +1231,7 @@ public static function cdlmatchinglow(array $open, array $high, array $low, arra * @param float $penetration [OPTIONAL] [DEFAULT 0.5] Percentage of penetration of a candle within another candle. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlmathold(array $open, array $high, array $low, array $close, float $penetration = null): array { @@ -1190,6 +1252,7 @@ public static function cdlmathold(array $open, array $high, array $low, array $c * @param float $penetration [OPTIONAL] [DEFAULT 0.3] Percentage of penetration of a candle within another candle. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlmorningdojistar(array $open, array $high, array $low, array $close, float $penetration = null): array { @@ -1210,6 +1273,7 @@ public static function cdlmorningdojistar(array $open, array $high, array $low, * @param float $penetration [OPTIONAL] [DEFAULT 0.3] Percentage of penetration of a candle within another candle. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlmorningstar(array $open, array $high, array $low, array $close, float $penetration = null): array { @@ -1229,6 +1293,7 @@ public static function cdlmorningstar(array $open, array $high, array $low, arra * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlonneck(array $open, array $high, array $low, array $close): array { @@ -1247,6 +1312,7 @@ public static function cdlonneck(array $open, array $high, array $low, array $cl * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlpiercing(array $open, array $high, array $low, array $close): array { @@ -1265,6 +1331,7 @@ public static function cdlpiercing(array $open, array $high, array $low, array $ * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlrickshawman(array $open, array $high, array $low, array $close): array { @@ -1283,6 +1350,7 @@ public static function cdlrickshawman(array $open, array $high, array $low, arra * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlrisefall3methods(array $open, array $high, array $low, array $close): array { @@ -1301,6 +1369,7 @@ public static function cdlrisefall3methods(array $open, array $high, array $low, * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlseparatinglines(array $open, array $high, array $low, array $close): array { @@ -1319,6 +1388,7 @@ public static function cdlseparatinglines(array $open, array $high, array $low, * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlshootingstar(array $open, array $high, array $low, array $close): array { @@ -1337,6 +1407,7 @@ public static function cdlshootingstar(array $open, array $high, array $low, arr * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlshortline(array $open, array $high, array $low, array $close): array { @@ -1355,6 +1426,7 @@ public static function cdlshortline(array $open, array $high, array $low, array * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlspinningtop(array $open, array $high, array $low, array $close): array { @@ -1373,6 +1445,7 @@ public static function cdlspinningtop(array $open, array $high, array $low, arra * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlstalledpattern(array $open, array $high, array $low, array $close): array { @@ -1391,6 +1464,7 @@ public static function cdlstalledpattern(array $open, array $high, array $low, a * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlsticksandwich(array $open, array $high, array $low, array $close): array { @@ -1409,6 +1483,7 @@ public static function cdlsticksandwich(array $open, array $high, array $low, ar * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdltakuri(array $open, array $high, array $low, array $close): array { @@ -1427,6 +1502,7 @@ public static function cdltakuri(array $open, array $high, array $low, array $cl * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdltasukigap(array $open, array $high, array $low, array $close): array { @@ -1445,6 +1521,7 @@ public static function cdltasukigap(array $open, array $high, array $low, array * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlthrusting(array $open, array $high, array $low, array $close): array { @@ -1463,6 +1540,7 @@ public static function cdlthrusting(array $open, array $high, array $low, array * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdltristar(array $open, array $high, array $low, array $close): array { @@ -1481,6 +1559,7 @@ public static function cdltristar(array $open, array $high, array $low, array $c * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlunique3river(array $open, array $high, array $low, array $close): array { @@ -1499,6 +1578,7 @@ public static function cdlunique3river(array $open, array $high, array $low, arr * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlupsidegap2crows(array $open, array $high, array $low, array $close): array { @@ -1517,6 +1597,7 @@ public static function cdlupsidegap2crows(array $open, array $high, array $low, * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cdlxsidegap3methods(array $open, array $high, array $low, array $close): array { @@ -1533,6 +1614,7 @@ public static function cdlxsidegap3methods(array $open, array $high, array $low, * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function ceil(array $real): array { @@ -1549,6 +1631,7 @@ public static function ceil(array $real): array * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cmo(array $real, int $timePeriod = null): array { @@ -1567,6 +1650,7 @@ public static function cmo(array $real, int $timePeriod = null): array * @param int $timePeriod [OPTIONAL] [DEFAULT 30] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function correl(array $real0, array $real1, int $timePeriod = null): array { @@ -1584,6 +1668,7 @@ public static function correl(array $real0, array $real1, int $timePeriod = null * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cos(array $real): array { @@ -1600,6 +1685,7 @@ public static function cos(array $real): array * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function cosh(array $real): array { @@ -1616,6 +1702,7 @@ public static function cosh(array $real): array * @param int $timePeriod [OPTIONAL] [DEFAULT 3.] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function dema(array $real, int $timePeriod = null): array { @@ -1634,6 +1721,7 @@ public static function dema(array $real, int $timePeriod = null): array * @param array $real1 Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function div(array $real0, array $real1): array { @@ -1652,6 +1740,7 @@ public static function div(array $real0, array $real1): array * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function dx(array $high, array $low, array $close, int $timePeriod = null): array { @@ -1669,6 +1758,7 @@ public static function dx(array $high, array $low, array $close, int $timePeriod * @param int $timePeriod [OPTIONAL] [DEFAULT 30] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function ema(array $real, int $timePeriod = null): array { @@ -1684,6 +1774,7 @@ public static function ema(array $real, int $timePeriod = null): array * Get error code of the last operation. * * @return int Returns the error code identified by one of the TRADER_ERR_* constants. + * @throws \Exception */ public static function errno(): integer { @@ -1700,6 +1791,7 @@ public static function errno(): integer * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function exp(array $real): array { @@ -1716,6 +1808,7 @@ public static function exp(array $real): array * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function floor(array $real): array { @@ -1730,6 +1823,7 @@ public static function floor(array $real): array * Get compatibility mode which affects the way calculations are done by all the extension functions. * * @return int Returns the compatibility mode id which can be identified by TRADER_COMPATIBILITY_* series of constants. + * @throws \Exception */ public static function get_compat(): integer { @@ -1746,6 +1840,7 @@ public static function get_compat(): integer * @param int $functionId Function ID the factor to be read for. TRADER_FUNC_UNST_* series of constants should be used. * * @return int Returns the unstable period factor for the corresponding function. + * @throws \Exception */ public static function get_unstable_period(integer $functionId): integer { @@ -1761,6 +1856,7 @@ public static function get_unstable_period(integer $functionId): integer * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function ht_dcperiod(array $real): array { @@ -1776,6 +1872,7 @@ public static function ht_dcperiod(array $real): array * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function ht_dcphase(array $real): array { @@ -1792,6 +1889,7 @@ public static function ht_dcphase(array $real): array * @param array $inPhase Empty array, will be filled with in phase data. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function ht_phasor(array $real, array &$inPhase): array { @@ -1808,6 +1906,7 @@ public static function ht_phasor(array $real, array &$inPhase): array * @param array $sine Empty array, will be filled with sine data. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function ht_sine(array $real, array &$sine): array { @@ -1823,6 +1922,7 @@ public static function ht_sine(array $real, array &$sine): array * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function ht_trendline(array $real): array { @@ -1838,6 +1938,7 @@ public static function ht_trendline(array $real): array * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function ht_trendmode(array $real): array { @@ -1854,6 +1955,7 @@ public static function ht_trendmode(array $real): array * @param int $timePeriod [OPTIONAL] [DEFAULT 30] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function kama(array $real, int $timePeriod = null): array { @@ -1871,6 +1973,7 @@ public static function kama(array $real, int $timePeriod = null): array * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function linearreg_angle(array $real, int $timePeriod = null): array { @@ -1888,6 +1991,7 @@ public static function linearreg_angle(array $real, int $timePeriod = null): arr * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function linearreg_intercept(array $real, int $timePeriod = null): array { @@ -1905,6 +2009,7 @@ public static function linearreg_intercept(array $real, int $timePeriod = null): * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function linearreg_slope(array $real, int $timePeriod = null): array { @@ -1922,6 +2027,7 @@ public static function linearreg_slope(array $real, int $timePeriod = null): arr * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function linearreg(array $real, int $timePeriod = null): array { @@ -1939,6 +2045,7 @@ public static function linearreg(array $real, int $timePeriod = null): array * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function ln(array $real): array { @@ -1955,6 +2062,7 @@ public static function ln(array $real): array * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function log10(array $real): array { @@ -1972,6 +2080,7 @@ public static function log10(array $real): array * @param int $mAType [OPTIONAL] [DEFAULT TRADER_MA_TYPE_SMA] Type of Moving Average. TRADER_MA_TYPE_* series of constants should be used. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function ma(array $real, int $timePeriod = null, int $mAType = null): array { @@ -1992,6 +2101,7 @@ public static function ma(array $real, int $timePeriod = null, int $mAType = nul * @param int $signalPeriod [OPTIONAL] [DEFAULT 9] Smoothing for the signal line (nb of period). Valid range from 1 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function macd(array $real, int $fastPeriod = null, int $slowPeriod = null, int $signalPeriod = null): array { @@ -2015,6 +2125,7 @@ public static function macd(array $real, int $fastPeriod = null, int $slowPeriod * @param int $signalPeriod [OPTIONAL] [DEFAULT 9] Smoothing for the signal line (nb of period). Valid range from 1 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function macdext(array $real, int $fastPeriod = null, int $fastMAType = null, int $slowPeriod = null, int $slowMAType = null, int $signalPeriod = null): array { @@ -2036,6 +2147,7 @@ public static function macdext(array $real, int $fastPeriod = null, int $fastMAT * @param int $signalPeriod [OPTIONAL] [DEFAULT 9] Smoothing for the signal line (nb of period). Valid range from 1 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function macdfix(array $real, int $signalPeriod = null): array { @@ -2054,6 +2166,7 @@ public static function macdfix(array $real, int $signalPeriod = null): array * @param float $slowLimit [OPTIONAL] [DEFAULT 0.05] Lower limit use in the adaptive algorithm. Valid range from 0.01 to 0.99. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mama(array $real, float $fastLimit = null, float $slowLimit = null): array { @@ -2075,6 +2188,7 @@ public static function mama(array $real, float $fastLimit = null, float $slowLim * @param int $mAType [OPTIONAL] [DEFAULT TRADER_MA_TYPE_SMA] Type of Moving Average. TRADER_MA_TYPE_* series of constants should be used. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mavp(array $real, array $periods, int $minPeriod = null, int $maxPeriod = null, int $mAType = null): array { @@ -2094,6 +2208,7 @@ public static function mavp(array $real, array $periods, int $minPeriod = null, * @param int $timePeriod [OPTIONAL] [DEFAULT 30] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function max(array $real, int $timePeriod = null): array { @@ -2111,6 +2226,7 @@ public static function max(array $real, int $timePeriod = null): array * @param int $timePeriod [OPTIONAL] [DEFAULT 30] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function maxindex(array $real, int $timePeriod = null): array { @@ -2128,6 +2244,7 @@ public static function maxindex(array $real, int $timePeriod = null): array * @param array $low Low price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function medprice(array $high, array $low): array { @@ -2147,6 +2264,7 @@ public static function medprice(array $high, array $low): array * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mfi(array $high, array $low, array $close, array $volume, int $timePeriod = null): array { @@ -2164,6 +2282,7 @@ public static function mfi(array $high, array $low, array $close, array $volume, * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function midpoint(array $real, int $timePeriod = null): array { @@ -2182,6 +2301,7 @@ public static function midpoint(array $real, int $timePeriod = null): array * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function midprice(array $high, array $low, int $timePeriod = null) { @@ -2199,6 +2319,7 @@ public static function midprice(array $high, array $low, int $timePeriod = null) * @param int $timePeriod [OPTIONAL] [DEFAULT 30] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function min(array $real, int $timePeriod = null): array { @@ -2216,6 +2337,7 @@ public static function min(array $real, int $timePeriod = null): array * @param int $timePeriod [OPTIONAL] [DEFAULT 30] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function minindex(array $real, int $timePeriod = null): array { @@ -2233,6 +2355,7 @@ public static function minindex(array $real, int $timePeriod = null): array * @param int $timePeriod [OPTIONAL] [DEFAULT 30] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function minmax(array $real, int $timePeriod = null): array { @@ -2250,6 +2373,7 @@ public static function minmax(array $real, int $timePeriod = null): array * @param int $timePeriod [OPTIONAL] [DEFAULT 30] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function minmaxindex(array $real, int $timePeriod = null): array { @@ -2269,6 +2393,7 @@ public static function minmaxindex(array $real, int $timePeriod = null): array * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function minus_di(array $high, array $low, array $close, int $timePeriod = null): array { @@ -2287,6 +2412,7 @@ public static function minus_di(array $high, array $low, array $close, int $time * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function minus_dm(array $high, array $low, int $timePeriod = null): array { @@ -2304,6 +2430,7 @@ public static function minus_dm(array $high, array $low, int $timePeriod = null) * @param int $timePeriod [OPTIONAL] [DEFAULT 10] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mom(array $real, int $timePeriod = null): array { @@ -2322,6 +2449,7 @@ public static function mom(array $real, int $timePeriod = null): array * @param array $real1 Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function mult(array $real0, array $real1): array { @@ -2340,6 +2468,7 @@ public static function mult(array $real0, array $real1): array * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function natr(array $high, array $low, array $close, int $timePeriod = null): array { @@ -2357,6 +2486,7 @@ public static function natr(array $high, array $low, array $close, int $timePeri * @param array $volume Volume traded, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function obv(array $real, array $volume): array { @@ -2375,6 +2505,7 @@ public static function obv(array $real, array $volume): array * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function plus_di(array $high, array $low, array $close, int $timePeriod = null): array { @@ -2393,6 +2524,7 @@ public static function plus_di(array $high, array $low, array $close, int $timeP * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function plus_dm(array $high, array $low, int $timePeriod = null): array { @@ -2412,6 +2544,7 @@ public static function plus_dm(array $high, array $low, int $timePeriod = null): * @param int $mAType [OPTIONAL] [DEFAULT TRADER_MA_TYPE_SMA] Type of Moving Average. TRADER_MA_TYPE_* series of constants should be used. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function ppo(array $real, int $fastPeriod = null, int $slowPeriod = null, int $mAType = null): array { @@ -2431,6 +2564,7 @@ public static function ppo(array $real, int $fastPeriod = null, int $slowPeriod * @param int $timePeriod [OPTIONAL] [DEFAULT 10] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function roc(array $real, int $timePeriod = null): array { @@ -2448,6 +2582,7 @@ public static function roc(array $real, int $timePeriod = null): array * @param int $timePeriod [OPTIONAL] [DEFAULT 10] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function rocp(array $real, int $timePeriod = null): array { @@ -2465,6 +2600,7 @@ public static function rocp(array $real, int $timePeriod = null): array * @param int $timePeriod [OPTIONAL] [DEFAULT 10] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function rocr100(array $real, int $timePeriod = null): array { @@ -2482,6 +2618,7 @@ public static function rocr100(array $real, int $timePeriod = null): array * @param int $timePeriod [OPTIONAL] [DEFAULT 10] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function rocr(array $real, int $timePeriod = null): array { @@ -2499,6 +2636,7 @@ public static function rocr(array $real, int $timePeriod = null): array * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function rsi(array $real, int $timePeriod = null): array { @@ -2518,6 +2656,7 @@ public static function rsi(array $real, int $timePeriod = null): array * @param float $maximum [OPTIONAL] [DEFAULT 0.2] Acceleration Factor Maximum value. Valid range from 0 to TRADER_REAL_MAX. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function sar(array $high, array $low, float $acceleration = null, float $maximum = null): array { @@ -2544,6 +2683,7 @@ public static function sar(array $high, array $low, float $acceleration = null, * @param float $accelerationMaxShort [OPTIONAL] [DEFAULT 0.2] Acceleration Factor maximum value for the Short direction. Valid range from 0 to TRADER_REAL_MAX. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function sarext(array $high, array $low, float $startValue = null, float $offsetOnReverse = null, float $accelerationInitLong = null, float $accelerationLong = null, float $accelerationMaxLong = null, float $accelerationInitShort = null, float $accelerationShort = null, float $accelerationMaxShort = null): array { @@ -2566,6 +2706,8 @@ public static function sarext(array $high, array $low, float $startValue = null, * Set compatibility mode which will affect the way calculations are done by all the extension functions. * * @param int $compatId Compatibility Id. TRADER_COMPATIBILITY_* series of constants should be used. + * + * @throws \Exception */ public static function set_compat(integer $compatId) { @@ -2581,6 +2723,8 @@ public static function set_compat(integer $compatId) * * @param int $functionId Function ID the factor should be set for. TRADER_FUNC_UNST_* constant series can be used to affect the corresponding function. * @param int $timePeriod Unstable period value. + * + * @throws \Exception */ public static function set_unstable_period(integer $functionId, int $timePeriod) { @@ -2597,6 +2741,7 @@ public static function set_unstable_period(integer $functionId, int $timePeriod) * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function sin(array $real): array { @@ -2613,6 +2758,7 @@ public static function sin(array $real): array * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function sinh(array $real): array { @@ -2629,6 +2775,7 @@ public static function sinh(array $real): array * @param int $timePeriod [OPTIONAL] [DEFAULT 30] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function sma(array $real, int $timePeriod = null): array { @@ -2646,6 +2793,7 @@ public static function sma(array $real, int $timePeriod = null): array * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function sqrt(array $real): array { @@ -2663,6 +2811,7 @@ public static function sqrt(array $real): array * @param float $nbDev [OPTIONAL] [DEFAULT 1.0] Number of deviations * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function stddev(array $real, int $timePeriod = null, float $nbDev = null): array { @@ -2687,6 +2836,7 @@ public static function stddev(array $real, int $timePeriod = null, float $nbDev * @param int $slowD_MAType [OPTIONAL] [DEFAULT TRADER_MA_TYPE_SMA] Type of Moving Average for Slow-D. TRADER_MA_TYPE_* series of constants should be used. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function stoch(array $high, array $low, array $close, int $fastK_Period = null, int $slowK_Period = null, int $slowK_MAType = null, int $slowD_Period = null, int $slowD_MAType = null): array { @@ -2712,6 +2862,7 @@ public static function stoch(array $high, array $low, array $close, int $fastK_P * @param int $fastD_MAType [OPTIONAL] [DEFAULT TRADER_MA_TYPE_SMA] Type of Moving Average for Fast-D. TRADER_MA_TYPE_* series of constants should be used. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function stochf(array $high, array $low, array $close, int $fastK_Period = null, int $fastD_Period = null, int $fastD_MAType = null): array { @@ -2734,6 +2885,7 @@ public static function stochf(array $high, array $low, array $close, int $fastK_ * @param int $fastD_MAType [OPTIONAL] [DEFAULT TRADER_MA_TYPE_SMA] Type of Moving Average for Fast-D. TRADER_MA_TYPE_* series of constants should be used. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function stochrsi(array $real, int $timePeriod = null, int $fastK_Period = null, int $fastD_Period = null, int $fastD_MAType = null): array { @@ -2755,6 +2907,7 @@ public static function stochrsi(array $real, int $timePeriod = null, int $fastK_ * @param array $real1 Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function sub(array $real0, array $real1): array { @@ -2771,6 +2924,7 @@ public static function sub(array $real0, array $real1): array * @param int $timePeriod [OPTIONAL] [DEFAULT 30] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function sum(array $real, int $timePeriod = null): array { @@ -2789,6 +2943,7 @@ public static function sum(array $real, int $timePeriod = null): array * @param float $vFactor [OPTIONAL] [DEFAULT 0.7] Volume Factor. Valid range from 1 to 0. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function t3(array $real, int $timePeriod = null, float $vFactor = null): array { @@ -2807,6 +2962,7 @@ public static function t3(array $real, int $timePeriod = null, float $vFactor = * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function tan(array $real): array { @@ -2823,6 +2979,7 @@ public static function tan(array $real): array * @param array $real Array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function tanh(array $real): array { @@ -2839,6 +2996,7 @@ public static function tanh(array $real): array * @param int $timePeriod [OPTIONAL] [DEFAULT 30] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function tema(array $real, int $timePeriod = null): array { @@ -2857,6 +3015,7 @@ public static function tema(array $real, int $timePeriod = null): array * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function trange(array $high, array $low, array $close): array { @@ -2869,10 +3028,11 @@ public static function trange(array $high, array $low, array $close): array /** * Triangular Moving Average * - * @param array $real Array of real values. - * @param int $timePeriod [OPTIONAL] [DEFAULT 30] Number of period. Valid range from 2 to 100000. + * @param array $real Array of real values. + * @param int $timePeriod [OPTIONAL] [DEFAULT 30] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function trima(array $real, int $timePeriod = null): array { @@ -2886,10 +3046,11 @@ public static function trima(array $real, int $timePeriod = null): array /** * 1-day Rate-Of-Change (ROC) of a Triple Smooth EMA * - * @param array $real Array of real values. - * @param int $timePeriod [OPTIONAL] [DEFAULT 30] Number of period. Valid range from 2 to 100000. + * @param array $real Array of real values. + * @param int $timePeriod [OPTIONAL] [DEFAULT 30] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function trix(array $real, int $timePeriod = null): array { @@ -2903,10 +3064,11 @@ public static function trix(array $real, int $timePeriod = null): array /** * Time Series Forecast * - * @param array $real Array of real values. - * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. + * @param array $real Array of real values. + * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function tsf(array $real, int $timePeriod = null): array { @@ -2925,6 +3087,7 @@ public static function tsf(array $real, int $timePeriod = null): array * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function typprice(array $high, array $low, array $close): array { @@ -2937,14 +3100,15 @@ public static function typprice(array $high, array $low, array $close): array /** * Ultimate Oscillator * - * @param array $high High price, array of real values. - * @param array $low Low price, array of real values. - * @param array $close Closing price, array of real values. - * @param int $timePeriod1 [OPTIONAL] [DEFAULT 7] Number of bars for 1st period. Valid range from 1 to 100000. - * @param int $timePeriod2 [OPTIONAL] [DEFAULT 14] Number of bars for 2nd period. Valid range from 1 to 100000. - * @param int $timePeriod3 [OPTIONAL] [DEFAULT 28] Number of bars for 3rd period. Valid range from 1 to 100000. + * @param array $high High price, array of real values. + * @param array $low Low price, array of real values. + * @param array $close Closing price, array of real values. + * @param int $timePeriod1 [OPTIONAL] [DEFAULT 7] Number of bars for 1st period. Valid range from 1 to 100000. + * @param int $timePeriod2 [OPTIONAL] [DEFAULT 14] Number of bars for 2nd period. Valid range from 1 to 100000. + * @param int $timePeriod3 [OPTIONAL] [DEFAULT 28] Number of bars for 3rd period. Valid range from 1 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function ultosc(array $high, array $low, array $close, int $timePeriod1 = null, int $timePeriod2 = null, int $timePeriod3 = null): array { @@ -2960,11 +3124,12 @@ public static function ultosc(array $high, array $low, array $close, int $timePe /** * Variance * - * @param array $real Array of real values. - * @param int $timePeriod [OPTIONAL] [DEFAULT 5] Number of period. Valid range from 2 to 100000. - * @param float $nbDev [OPTIONAL] [DEFAULT 1.0] Number of deviations + * @param array $real Array of real values. + * @param int $timePeriod [OPTIONAL] [DEFAULT 5] Number of period. Valid range from 2 to 100000. + * @param float $nbDev [OPTIONAL] [DEFAULT 1.0] Number of deviations * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function var(array $real, int $timePeriod = null, float $nbDev = null): array { @@ -2984,6 +3149,7 @@ public static function var(array $real, int $timePeriod = null, float $nbDev = n * @param array $close Closing price, array of real values. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function wclprice(array $high, array $low, array $close): array { @@ -2996,12 +3162,13 @@ public static function wclprice(array $high, array $low, array $close): array /** * Williams' %R * - * @param array $high High price, array of real values. - * @param array $low Low price, array of real values. - * @param array $close Closing price, array of real values. - * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. + * @param array $high High price, array of real values. + * @param array $low Low price, array of real values. + * @param array $close Closing price, array of real values. + * @param int $timePeriod [OPTIONAL] [DEFAULT 14] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function willr(array $high, array $low, array $close, int $timePeriod = null): array { @@ -3015,10 +3182,11 @@ public static function willr(array $high, array $low, array $close, int $timePer /** * Weighted Moving Average * - * @param array $real Array of real values. - * @param int $timePeriod [OPTIONAL] [DEFAULT 30] Number of period. Valid range from 2 to 100000. + * @param array $real Array of real values. + * @param int $timePeriod [OPTIONAL] [DEFAULT 30] Number of period. Valid range from 2 to 100000. * * @return array Returns an array with calculated data or false on failure. + * @throws \Exception */ public static function wma(array $real, int $timePeriod = null): array { From a5040d4da4bda6e1b82ded25116e9f750c233019 Mon Sep 17 00:00:00 2001 From: Anthony daCosta Date: Fri, 2 Feb 2018 12:39:01 -0500 Subject: [PATCH 16/31] removed return statements for functions that return nothing set_compat set_unstable_period --- source/Trader.php | 6 ++++-- source/TraderTrait.php | 8 ++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/source/Trader.php b/source/Trader.php index ad3597d..79a15d8 100644 --- a/source/Trader.php +++ b/source/Trader.php @@ -2241,11 +2241,12 @@ public static function parabolicSARExtended(array $high, array $low, float $star * Set compatibility mode which will affect the way calculations are done by all the extension functions. * * @param int $compatId Compatibility Id. TRADER_COMPATIBILITY_* series of constants should be used. + * * @throws \Exception */ public static function setCompatibilityMode(integer $compatId) { - return static::set_compat($compatId); + static::set_compat($compatId); } /** @@ -2254,11 +2255,12 @@ public static function setCompatibilityMode(integer $compatId) * * @param int $functionId Function ID the factor should be set for. TRADER_FUNC_UNST_* constant series can be used to affect the corresponding function. * @param int $timePeriod Unstable period value. + * * @throws \Exception */ public static function setUnstablePeriod(integer $functionId, int $timePeriod) { - return static::set_unstable_period($functionId, $timePeriod); + static::set_unstable_period($functionId, $timePeriod); } /** diff --git a/source/TraderTrait.php b/source/TraderTrait.php index f703316..7bef844 100644 --- a/source/TraderTrait.php +++ b/source/TraderTrait.php @@ -2711,10 +2711,8 @@ public static function sarext(array $high, array $low, float $startValue = null, */ public static function set_compat(integer $compatId) { - $return = trader_set_compat($compatId); + trader_set_compat($compatId); static::checkForError(); - - return $return; } /** @@ -2728,10 +2726,8 @@ public static function set_compat(integer $compatId) */ public static function set_unstable_period(integer $functionId, int $timePeriod) { - $return = trader_set_unstable_period($functionId, $timePeriod); + trader_set_unstable_period($functionId, $timePeriod); static::checkForError(); - - return $return; } /** From c693fc56a4b212c00ef5e6ede789683db01f36b6 Mon Sep 17 00:00:00 2001 From: Anthony daCosta Date: Fri, 2 Feb 2018 12:42:57 -0500 Subject: [PATCH 17/31] add missing array return typehint --- source/Trader.php | 2 +- source/TraderTrait.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Trader.php b/source/Trader.php index 79a15d8..ef71da1 100644 --- a/source/Trader.php +++ b/source/Trader.php @@ -1930,7 +1930,7 @@ public static function middlePoint(array $real, int $timePeriod = null): array * @return array Returns an array with calculated data or false on failure. * @throws \Exception */ - public static function middlePointPrice(array $high, array $low, int $timePeriod = null) + public static function middlePointPrice(array $high, array $low, int $timePeriod = null): array { return static::midprice($high, $low, $timePeriod); } diff --git a/source/TraderTrait.php b/source/TraderTrait.php index 7bef844..abae79a 100644 --- a/source/TraderTrait.php +++ b/source/TraderTrait.php @@ -2303,7 +2303,7 @@ public static function midpoint(array $real, int $timePeriod = null): array * @return array Returns an array with calculated data or false on failure. * @throws \Exception */ - public static function midprice(array $high, array $low, int $timePeriod = null) + public static function midprice(array $high, array $low, int $timePeriod = null): array { $timePeriod = $timePeriod ?? 14; $return = trader_midprice($high, $low, $timePeriod); From 89a214054b2b10f56fd83d008fbd8cd869e264d7 Mon Sep 17 00:00:00 2001 From: Joshua Date: Fri, 2 Feb 2018 10:12:31 -0800 Subject: [PATCH 18/31] Corrected the license, packagist notified me it was not in the correct format. see https://getcomposer.org/doc/04-schema.md#license --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0027494..2e0c13d 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "An interface to the PHP Trader extension.", "version": "1.0.2", "type": "library", - "license": "GNU GPLv3", + "license": "GPL-3.0-or-later", "authors": [ { "name": "Joshua Lopez", From 359d0b2343be137500a080a41c9dbc51002a3379 Mon Sep 17 00:00:00 2001 From: Joshua Date: Fri, 2 Feb 2018 10:15:08 -0800 Subject: [PATCH 19/31] Removed the codacy coverage badge. It use to work, but it has just been stating 0% for a while now. --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 74aacc9..e18a004 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/221a58d6d99943688ff68ca1141a1c86)](https://www.codacy.com/app/jbspublic/phpTraderInterface?utm_source=github.com&utm_medium=referral&utm_content=LupeCode/phpTraderInterface&utm_campaign=Badge_Grade) -[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/221a58d6d99943688ff68ca1141a1c86)](https://www.codacy.com/app/jbspublic/phpTraderInterface?utm_source=github.com&utm_medium=referral&utm_content=LupeCode/phpTraderInterface&utm_campaign=Badge_Coverage) - This is an interface to the PHP Trader Extension. The PHP Trader Extension is available from . The extension and the source for it can be downloaded there. From 00acdd6e2282882a6c11a55facba585719622adb Mon Sep 17 00:00:00 2001 From: Joshua Date: Mon, 12 Feb 2018 15:50:40 -0800 Subject: [PATCH 20/31] Converted to Trader 0.4.1 --- README.md | 10 ++-------- Tests/TraderTest.php | 16 ++++------------ composer.json | 2 +- source/Trader.php | 10 ++++------ source/TraderTrait.php | 12 +++++------- 5 files changed, 16 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index e18a004..dadcf75 100644 --- a/README.md +++ b/README.md @@ -14,15 +14,9 @@ This project is just an interface to that extension, and does not work without i Variable types are set on all function parameters. -## Note About Mis-documented Functions +### Requires PECL Trader 0.4.1. -The php.net documentation for trader_ht_phasor and trader_ht_sine are incorrect. This was discovered through unit testing of this interface. Both functions require a second parameter, a by reference array that extra data will be written into. - -This interface has the correct version of those functions. - -### Bug in Trader 0.4.0 - -The PECL Trader package version 0.4.0 has a bug regarding the two functions above. Though the output parameters are required for the function to execute, they are not used. The returned array is a 2-Dimensional array with the return value and the output parameter combined. +If you are using version 0.4.0, see the branch `trader-0.4.0` for that. ## How to use diff --git a/Tests/TraderTest.php b/Tests/TraderTest.php index d8e8717..38779c0 100644 --- a/Tests/TraderTest.php +++ b/Tests/TraderTest.php @@ -923,16 +923,12 @@ public function testInterfaceFunctions_ht_dcphase() public function testInterfaceFunctions_ht_phasor() { - $inPhase1 = []; - $inPhase2 = []; - $this->assertEquals(trader_ht_phasor($this->Close, $inPhase1), Trader::ht_phasor($this->Close, $inPhase2)); + $this->assertEquals(trader_ht_phasor($this->Close), Trader::ht_phasor($this->Close)); } public function testInterfaceFunctions_ht_sine() { - $sine1 = []; - $sine2 = []; - $this->assertEquals(trader_ht_sine($this->Close, $sine1), Trader::ht_sine($this->Close, $sine2)); + $this->assertEquals(trader_ht_sine($this->Close), Trader::ht_sine($this->Close)); } public function testInterfaceFunctions_ht_trendline() @@ -1721,16 +1717,12 @@ public function testFriendlyFunctions_ht_dcphase() public function testFriendlyFunctions_ht_phasor() { - $inPhase1 = []; - $inPhase2 = []; - $this->assertEquals(trader_ht_phasor($this->Close, $inPhase1), Trader::hilbertTransformPhasorComponents($this->Close, $inPhase2)); + $this->assertEquals(trader_ht_phasor($this->Close), Trader::hilbertTransformPhasorComponents($this->Close)); } public function testFriendlyFunctions_ht_sine() { - $sine1 = []; - $sine2 = []; - $this->assertEquals(trader_ht_sine($this->Close, $sine1), Trader::hilbertTransformSineWave($this->Close, $sine2)); + $this->assertEquals(trader_ht_sine($this->Close), Trader::hilbertTransformSineWave($this->Close)); } public function testFriendlyFunctions_ht_trendline() diff --git a/composer.json b/composer.json index 2e0c13d..00e9e8a 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ ], "require": { "php": ">=7.0.0", - "ext-trader": "*" + "ext-trader": "0.4.1" }, "require-dev": { "phpunit/phpunit": "~6.3.0", diff --git a/source/Trader.php b/source/Trader.php index ef71da1..850dcc6 100644 --- a/source/Trader.php +++ b/source/Trader.php @@ -1597,28 +1597,26 @@ public static function hilbertTransformDominantCyclePhase(array $real): array * Hilbert Transform - Phasor Components * * @param array $real Array of real values. - * @param array $inPhase Empty array, will be filled with in phase data. * * @return array Returns an array with calculated data or false on failure. * @throws \Exception */ - public static function hilbertTransformPhasorComponents(array $real, array &$inPhase): array + public static function hilbertTransformPhasorComponents(array $real): array { - return static::ht_phasor($real, $inPhase); + return static::ht_phasor($real); } /** * Hilbert Transform - SineWave * * @param array $real Array of real values. - * @param array $sine Empty array, will be filled with sine data. * * @return array Returns an array with calculated data or false on failure. * @throws \Exception */ - public static function hilbertTransformSineWave(array $real, array &$sine): array + public static function hilbertTransformSineWave(array $real): array { - return static::ht_sine($real, $sine); + return static::ht_sine($real); } /** diff --git a/source/TraderTrait.php b/source/TraderTrait.php index abae79a..e2dee1c 100644 --- a/source/TraderTrait.php +++ b/source/TraderTrait.php @@ -1886,14 +1886,13 @@ public static function ht_dcphase(array $real): array * Hilbert Transform - Phasor Components * * @param array $real Array of real values. - * @param array $inPhase Empty array, will be filled with in phase data. * * @return array Returns an array with calculated data or false on failure. * @throws \Exception */ - public static function ht_phasor(array $real, array &$inPhase): array + public static function ht_phasor(array $real): array { - $return = trader_ht_phasor($real, $inPhase); + $return = trader_ht_phasor($real); static::checkForError(); return $return; @@ -1903,14 +1902,13 @@ public static function ht_phasor(array $real, array &$inPhase): array * Hilbert Transform - SineWave * * @param array $real Array of real values. - * @param array $sine Empty array, will be filled with sine data. * * @return array Returns an array with calculated data or false on failure. * @throws \Exception */ - public static function ht_sine(array $real, array &$sine): array + public static function ht_sine(array $real): array { - $return = trader_ht_sine($real, $sine); + $return = trader_ht_sine($real); static::checkForError(); return $return; @@ -3193,4 +3191,4 @@ public static function wma(array $real, int $timePeriod = null): array return $return; } -} \ No newline at end of file +} From c3d44e60d24b081be77dde23f3ff849078b43940 Mon Sep 17 00:00:00 2001 From: Joshua Date: Mon, 12 Feb 2018 15:50:57 -0800 Subject: [PATCH 21/31] Added more than 1 version of PHP to the PHP Unit tests. --- .gitignore | 2 +- README.md | 15 ++++++++++++++- phpunit.xml | 3 --- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index b88dc5a..ac168b2 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,4 @@ /vendor/ /logs/ /metrics/ -/update metrics.bat +*.bat diff --git a/README.md b/README.md index dadcf75..a71f5b8 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,21 @@ or the friendly named This is helpful if you do not have the code stub for the Trader Extension. Loading this interface will provide your IDE with the function information and auto completing. +## Metrics & Coverage +### PHP Metrics Report +To see the current report of metrics by PHP Metrics, visit [Metrics](https://projects.lupecode.com/phpTraderInterface/metrics/) +### PHP Unit Coverage +To see the current report of coverage by PHP Unit, visit [Coverage](https://projects.lupecode.com/phpTraderInterface/logs/report/) +### PHP Unit Test Results + * PHP 7.0 NTS [[XML]](https://projects.lupecode.com/phpTraderInterface/logs/logfile-7.0NTS.xml) [[TXT]](https://projects.lupecode.com/phpTraderInterface/logs/testdox-7.0NTS.txt) [[HTML]](https://projects.lupecode.com/phpTraderInterface/logs/testdox-7.0NTS.html) + * PHP 7.0 TS [[XML]](https://projects.lupecode.com/phpTraderInterface/logs/logfile-7.0TS.xml) [[TXT]](https://projects.lupecode.com/phpTraderInterface/logs/testdox-7.0TS.txt) [[HTML]](https://projects.lupecode.com/phpTraderInterface/logs/testdox-7.0TS.html) + * PHP 7.1 NTS [[XML]](https://projects.lupecode.com/phpTraderInterface/logs/logfile-7.1NTS.xml) [[TXT]](https://projects.lupecode.com/phpTraderInterface/logs/testdox-7.1NTS.txt) [[HTML]](https://projects.lupecode.com/phpTraderInterface/logs/testdox-7.1NTS.html) + * PHP 7.1 TS [[XML]](https://projects.lupecode.com/phpTraderInterface/logs/logfile-7.1TS.xml) [[TXT]](https://projects.lupecode.com/phpTraderInterface/logs/testdox-7.1TS.txt) [[HTML]](https://projects.lupecode.com/phpTraderInterface/logs/testdox-7.1TS.html) + * PHP 7.2 NTS [[XML]](https://projects.lupecode.com/phpTraderInterface/logs/logfile-7.2NTS.xml) [[TXT]](https://projects.lupecode.com/phpTraderInterface/logs/testdox-7.2NTS.txt) [[HTML]](https://projects.lupecode.com/phpTraderInterface/logs/testdox-7.2TS.html) + * PHP 7.2 TS [[XML]](https://projects.lupecode.com/phpTraderInterface/logs/logfile-7.2TS.xml) [[TXT]](https://projects.lupecode.com/phpTraderInterface/logs/testdox-7.2TS.txt) [[HTML]](https://projects.lupecode.com/phpTraderInterface/logs/testdox-7.2TS.html) + ## License -Copyright (C) 2016 Lupe Code, LLC.; Joshua Saige +Copyright (C) Lupe Code, LLC.; Joshua Saige This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. diff --git a/phpunit.xml b/phpunit.xml index 34a56b1..32c9919 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -31,8 +31,5 @@ - - - From 89ea53f8f21812fe782e1c445267947a5ecc9308 Mon Sep 17 00:00:00 2001 From: Joshua Date: Mon, 12 Feb 2018 15:51:49 -0800 Subject: [PATCH 22/31] Version 1.0.3 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 00e9e8a..644faf9 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "lupecode/php-trader-interface", "description": "An interface to the PHP Trader extension.", - "version": "1.0.2", + "version": "1.0.3", "type": "library", "license": "GPL-3.0-or-later", "authors": [ From e6758ea8bee56a9551f1a16d09d7615f1f70d35f Mon Sep 17 00:00:00 2001 From: Joshua Date: Mon, 5 Mar 2018 09:10:51 -0800 Subject: [PATCH 23/31] Updated the readme --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a71f5b8..0843860 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,12 @@ Variable types are set on all function parameters. If you are using version 0.4.0, see the branch `trader-0.4.0` for that. +## Purpose + +This package is meant to help when using the Trader PECL package. +This is helpful if you do not have the code stub for the Trader Extension. +Loading this interface will provide your IDE with the function information and auto completing. + ## How to use Lets assume that you want to generate a correlation indicator. @@ -28,8 +34,6 @@ You can now use the exact named or the friendly named `\LupeCode\phpTraderInterface\Trader::pearsonCorrelationCoefficient($Open, $Close, 30)` -This is helpful if you do not have the code stub for the Trader Extension. Loading this interface will provide your IDE with the function information and auto completing. - ## Metrics & Coverage ### PHP Metrics Report To see the current report of metrics by PHP Metrics, visit [Metrics](https://projects.lupecode.com/phpTraderInterface/metrics/) @@ -44,7 +48,7 @@ To see the current report of coverage by PHP Unit, visit [Coverage](https://proj * PHP 7.2 TS [[XML]](https://projects.lupecode.com/phpTraderInterface/logs/logfile-7.2TS.xml) [[TXT]](https://projects.lupecode.com/phpTraderInterface/logs/testdox-7.2TS.txt) [[HTML]](https://projects.lupecode.com/phpTraderInterface/logs/testdox-7.2TS.html) ## License -Copyright (C) Lupe Code, LLC.; Joshua Saige +Copyright (C) Lupe Code, LLC.; Joshua Lopez This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. From 91976b8665199f441e4f43842461104f82f3ef66 Mon Sep 17 00:00:00 2001 From: Joshua Date: Mon, 5 Mar 2018 09:52:53 -0800 Subject: [PATCH 24/31] Added link to the php trader native repo. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0843860..03735ef 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # PHP Trader Interface -[![Codacy Badge](https://api.codacy.com/project/badge/Grade/221a58d6d99943688ff68ca1141a1c86)](https://www.codacy.com/app/jbspublic/phpTraderInterface?utm_source=github.com&utm_medium=referral&utm_content=LupeCode/phpTraderInterface&utm_campaign=Badge_Grade) - This is an interface to the PHP Trader Extension. The PHP Trader Extension is available from . The extension and the source for it can be downloaded there. @@ -10,6 +8,8 @@ The extension and the source for it can be downloaded there. This project is just an interface to that extension, and does not work without it. +If you cannot install the PECL extension, try the [PHP Trader Native](https://github.com/LupeCode/phpTraderNative) project instead. + ### Requires PHP 7.0.0 or newer Variable types are set on all function parameters. From a9deaf20c2586a4feebd71d936a75c0e27e09bad Mon Sep 17 00:00:00 2001 From: Joshua Date: Sun, 2 Feb 2020 11:59:03 -0800 Subject: [PATCH 25/31] Updated the allowable trader ext version --- README.md | 2 +- composer.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 03735ef..1c85827 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ If you cannot install the PECL extension, try the [PHP Trader Native](https://gi Variable types are set on all function parameters. -### Requires PECL Trader 0.4.1. +### Requires PECL Trader 0.4.1 or newer. If you are using version 0.4.0, see the branch `trader-0.4.0` for that. diff --git a/composer.json b/composer.json index 644faf9..0e3a264 100644 --- a/composer.json +++ b/composer.json @@ -1,20 +1,20 @@ { "name": "lupecode/php-trader-interface", "description": "An interface to the PHP Trader extension.", - "version": "1.0.3", + "version": "1.0.4", "type": "library", "license": "GPL-3.0-or-later", "authors": [ { "name": "Joshua Lopez", "email": "joshua@lupecode.com", - "homepage": "http://github.com/jbsaige", + "homepage": "http://github.com/LupeCode", "role": "Developer" } ], "require": { "php": ">=7.0.0", - "ext-trader": "0.4.1" + "ext-trader": ">=0.4.1" }, "require-dev": { "phpunit/phpunit": "~6.3.0", From e0491f12dd42d210d817bae8d33a0fd768f097e2 Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 10 Apr 2021 14:15:00 +0100 Subject: [PATCH 26/31] Update TraderTrait to use correct scalar types --- source/TraderTrait.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/TraderTrait.php b/source/TraderTrait.php index e2dee1c..d64515f 100644 --- a/source/TraderTrait.php +++ b/source/TraderTrait.php @@ -1776,7 +1776,7 @@ public static function ema(array $real, int $timePeriod = null): array * @return int Returns the error code identified by one of the TRADER_ERR_* constants. * @throws \Exception */ - public static function errno(): integer + public static function errno(): int { $return = trader_errno(); static::checkForError(); @@ -1825,7 +1825,7 @@ public static function floor(array $real): array * @return int Returns the compatibility mode id which can be identified by TRADER_COMPATIBILITY_* series of constants. * @throws \Exception */ - public static function get_compat(): integer + public static function get_compat(): int { $return = trader_get_compat(); static::checkForError(); @@ -1842,7 +1842,7 @@ public static function get_compat(): integer * @return int Returns the unstable period factor for the corresponding function. * @throws \Exception */ - public static function get_unstable_period(integer $functionId): integer + public static function get_unstable_period(int $functionId): int { $return = trader_get_unstable_period($functionId); static::checkForError(); @@ -2707,7 +2707,7 @@ public static function sarext(array $high, array $low, float $startValue = null, * * @throws \Exception */ - public static function set_compat(integer $compatId) + public static function set_compat(int $compatId) { trader_set_compat($compatId); static::checkForError(); @@ -2722,7 +2722,7 @@ public static function set_compat(integer $compatId) * * @throws \Exception */ - public static function set_unstable_period(integer $functionId, int $timePeriod) + public static function set_unstable_period(int $functionId, int $timePeriod) { trader_set_unstable_period($functionId, $timePeriod); static::checkForError(); From d81d9f0edd35e94d42e40616004001df9b1ac3ab Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 10 Apr 2021 14:16:18 +0100 Subject: [PATCH 27/31] Update Trader to use the correct scalar types --- source/Trader.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/Trader.php b/source/Trader.php index 850dcc6..6704327 100644 --- a/source/Trader.php +++ b/source/Trader.php @@ -1504,7 +1504,7 @@ public static function exponentialMovingAverage(array $real, int $timePeriod): a * @return int Returns the error code identified by one of the TRADER_ERR_* constants. * @throws \Exception */ - public static function errorNumber(): integer + public static function errorNumber(): int { return static::errno(); } @@ -1547,7 +1547,7 @@ public static function mathFloor(array $real): array * @return int Returns the compatibility mode id which can be identified by TRADER_COMPATIBILITY_* series of constants. * @throws \Exception */ - public static function getCompatibilityMode(): integer + public static function getCompatibilityMode(): int { return static::get_compat(); } @@ -1562,7 +1562,7 @@ public static function getCompatibilityMode(): integer * @return int Returns the unstable period factor for the corresponding function. * @throws \Exception */ - public static function getUnstablePeriod(integer $functionId): integer + public static function getUnstablePeriod(int $functionId): int { return static::get_unstable_period($functionId); } @@ -2242,7 +2242,7 @@ public static function parabolicSARExtended(array $high, array $low, float $star * * @throws \Exception */ - public static function setCompatibilityMode(integer $compatId) + public static function setCompatibilityMode(int $compatId) { static::set_compat($compatId); } @@ -2256,7 +2256,7 @@ public static function setCompatibilityMode(integer $compatId) * * @throws \Exception */ - public static function setUnstablePeriod(integer $functionId, int $timePeriod) + public static function setUnstablePeriod(int $functionId, int $timePeriod) { static::set_unstable_period($functionId, $timePeriod); } From 0fe722c563cfe8866d2c4ab007c3431f0268a11b Mon Sep 17 00:00:00 2001 From: Joshua Date: Sat, 10 Apr 2021 17:26:12 -0700 Subject: [PATCH 28/31] Updated PHPUnit test to use static access Per recommendations. --- Tests/TraderTest.php | 744 +++++++++++++++++++++---------------------- 1 file changed, 372 insertions(+), 372 deletions(-) diff --git a/Tests/TraderTest.php b/Tests/TraderTest.php index 38779c0..406200c 100644 --- a/Tests/TraderTest.php +++ b/Tests/TraderTest.php @@ -185,282 +185,282 @@ class TraderTest extends TestCase // public function testConstants_TRADER_MA_TYPE_SMA() { - $this->assertEquals(TRADER_MA_TYPE_SMA, Trader::$TRADER_MA_TYPE_SMA); + self::assertEquals(TRADER_MA_TYPE_SMA, Trader::$TRADER_MA_TYPE_SMA); } public function testConstants_TRADER_MA_TYPE_EMA() { - $this->assertEquals(TRADER_MA_TYPE_EMA, Trader::$TRADER_MA_TYPE_EMA); + self::assertEquals(TRADER_MA_TYPE_EMA, Trader::$TRADER_MA_TYPE_EMA); } public function testConstants_TRADER_MA_TYPE_WMA() { - $this->assertEquals(TRADER_MA_TYPE_WMA, Trader::$TRADER_MA_TYPE_WMA); + self::assertEquals(TRADER_MA_TYPE_WMA, Trader::$TRADER_MA_TYPE_WMA); } public function testConstants_TRADER_MA_TYPE_DEMA() { - $this->assertEquals(TRADER_MA_TYPE_DEMA, Trader::$TRADER_MA_TYPE_DEMA); + self::assertEquals(TRADER_MA_TYPE_DEMA, Trader::$TRADER_MA_TYPE_DEMA); } public function testConstants_TRADER_MA_TYPE_TEMA() { - $this->assertEquals(TRADER_MA_TYPE_TEMA, Trader::$TRADER_MA_TYPE_TEMA); + self::assertEquals(TRADER_MA_TYPE_TEMA, Trader::$TRADER_MA_TYPE_TEMA); } public function testConstants_TRADER_MA_TYPE_TRIMA() { - $this->assertEquals(TRADER_MA_TYPE_TRIMA, Trader::$TRADER_MA_TYPE_TRIMA); + self::assertEquals(TRADER_MA_TYPE_TRIMA, Trader::$TRADER_MA_TYPE_TRIMA); } public function testConstants_TRADER_MA_TYPE_KAMA() { - $this->assertEquals(TRADER_MA_TYPE_KAMA, Trader::$TRADER_MA_TYPE_KAMA); + self::assertEquals(TRADER_MA_TYPE_KAMA, Trader::$TRADER_MA_TYPE_KAMA); } public function testConstants_TRADER_MA_TYPE_MAMA() { - $this->assertEquals(TRADER_MA_TYPE_MAMA, Trader::$TRADER_MA_TYPE_MAMA); + self::assertEquals(TRADER_MA_TYPE_MAMA, Trader::$TRADER_MA_TYPE_MAMA); } public function testConstants_TRADER_MA_TYPE_T3() { - $this->assertEquals(TRADER_MA_TYPE_T3, Trader::$TRADER_MA_TYPE_T3); + self::assertEquals(TRADER_MA_TYPE_T3, Trader::$TRADER_MA_TYPE_T3); } public function testConstants_TRADER_REAL_MIN() { - $this->assertEquals(TRADER_REAL_MIN, Trader::$TRADER_REAL_MIN); + self::assertEquals(TRADER_REAL_MIN, Trader::$TRADER_REAL_MIN); } public function testConstants_TRADER_REAL_MAX() { - $this->assertEquals(TRADER_REAL_MAX, Trader::$TRADER_REAL_MAX); + self::assertEquals(TRADER_REAL_MAX, Trader::$TRADER_REAL_MAX); } public function testConstants_TRADER_FUNC_UNST_ADX() { - $this->assertEquals(TRADER_FUNC_UNST_ADX, Trader::$TRADER_FUNC_UNST_ADX); + self::assertEquals(TRADER_FUNC_UNST_ADX, Trader::$TRADER_FUNC_UNST_ADX); } public function testConstants_TRADER_FUNC_UNST_ADXR() { - $this->assertEquals(TRADER_FUNC_UNST_ADXR, Trader::$TRADER_FUNC_UNST_ADXR); + self::assertEquals(TRADER_FUNC_UNST_ADXR, Trader::$TRADER_FUNC_UNST_ADXR); } public function testConstants_TRADER_FUNC_UNST_ATR() { - $this->assertEquals(TRADER_FUNC_UNST_ATR, Trader::$TRADER_FUNC_UNST_ATR); + self::assertEquals(TRADER_FUNC_UNST_ATR, Trader::$TRADER_FUNC_UNST_ATR); } public function testConstants_TRADER_FUNC_UNST_CMO() { - $this->assertEquals(TRADER_FUNC_UNST_CMO, Trader::$TRADER_FUNC_UNST_CMO); + self::assertEquals(TRADER_FUNC_UNST_CMO, Trader::$TRADER_FUNC_UNST_CMO); } public function testConstants_TRADER_FUNC_UNST_DX() { - $this->assertEquals(TRADER_FUNC_UNST_DX, Trader::$TRADER_FUNC_UNST_DX); + self::assertEquals(TRADER_FUNC_UNST_DX, Trader::$TRADER_FUNC_UNST_DX); } public function testConstants_TRADER_FUNC_UNST_EMA() { - $this->assertEquals(TRADER_FUNC_UNST_EMA, Trader::$TRADER_FUNC_UNST_EMA); + self::assertEquals(TRADER_FUNC_UNST_EMA, Trader::$TRADER_FUNC_UNST_EMA); } public function testConstants_TRADER_FUNC_UNST_HT_DCPERIOD() { - $this->assertEquals(TRADER_FUNC_UNST_HT_DCPERIOD, Trader::$TRADER_FUNC_UNST_HT_DCPERIOD); + self::assertEquals(TRADER_FUNC_UNST_HT_DCPERIOD, Trader::$TRADER_FUNC_UNST_HT_DCPERIOD); } public function testConstants_TRADER_FUNC_UNST_HT_DCPHASE() { - $this->assertEquals(TRADER_FUNC_UNST_HT_DCPHASE, Trader::$TRADER_FUNC_UNST_HT_DCPHASE); + self::assertEquals(TRADER_FUNC_UNST_HT_DCPHASE, Trader::$TRADER_FUNC_UNST_HT_DCPHASE); } public function testConstants_TRADER_FUNC_UNST_HT_PHASOR() { - $this->assertEquals(TRADER_FUNC_UNST_HT_PHASOR, Trader::$TRADER_FUNC_UNST_HT_PHASOR); + self::assertEquals(TRADER_FUNC_UNST_HT_PHASOR, Trader::$TRADER_FUNC_UNST_HT_PHASOR); } public function testConstants_TRADER_FUNC_UNST_HT_TRENDLINE() { - $this->assertEquals(TRADER_FUNC_UNST_HT_TRENDLINE, Trader::$TRADER_FUNC_UNST_HT_TRENDLINE); + self::assertEquals(TRADER_FUNC_UNST_HT_TRENDLINE, Trader::$TRADER_FUNC_UNST_HT_TRENDLINE); } public function testConstants_TRADER_FUNC_UNST_HT_TRENDMODE() { - $this->assertEquals(TRADER_FUNC_UNST_HT_TRENDMODE, Trader::$TRADER_FUNC_UNST_HT_TRENDMODE); + self::assertEquals(TRADER_FUNC_UNST_HT_TRENDMODE, Trader::$TRADER_FUNC_UNST_HT_TRENDMODE); } public function testConstants_TRADER_FUNC_UNST_KAMA() { - $this->assertEquals(TRADER_FUNC_UNST_KAMA, Trader::$TRADER_FUNC_UNST_KAMA); + self::assertEquals(TRADER_FUNC_UNST_KAMA, Trader::$TRADER_FUNC_UNST_KAMA); } public function testConstants_TRADER_FUNC_UNST_MAMA() { - $this->assertEquals(TRADER_FUNC_UNST_MAMA, Trader::$TRADER_FUNC_UNST_MAMA); + self::assertEquals(TRADER_FUNC_UNST_MAMA, Trader::$TRADER_FUNC_UNST_MAMA); } public function testConstants_TRADER_FUNC_UNST_MFI() { - $this->assertEquals(TRADER_FUNC_UNST_MFI, Trader::$TRADER_FUNC_UNST_MFI); + self::assertEquals(TRADER_FUNC_UNST_MFI, Trader::$TRADER_FUNC_UNST_MFI); } public function testConstants_TRADER_FUNC_UNST_MINUS_DI() { - $this->assertEquals(TRADER_FUNC_UNST_MINUS_DI, Trader::$TRADER_FUNC_UNST_MINUS_DI); + self::assertEquals(TRADER_FUNC_UNST_MINUS_DI, Trader::$TRADER_FUNC_UNST_MINUS_DI); } public function testConstants_TRADER_FUNC_UNST_MINUS_DM() { - $this->assertEquals(TRADER_FUNC_UNST_MINUS_DM, Trader::$TRADER_FUNC_UNST_MINUS_DM); + self::assertEquals(TRADER_FUNC_UNST_MINUS_DM, Trader::$TRADER_FUNC_UNST_MINUS_DM); } public function testConstants_TRADER_FUNC_UNST_NATR() { - $this->assertEquals(TRADER_FUNC_UNST_NATR, Trader::$TRADER_FUNC_UNST_NATR); + self::assertEquals(TRADER_FUNC_UNST_NATR, Trader::$TRADER_FUNC_UNST_NATR); } public function testConstants_TRADER_FUNC_UNST_PLUS_DI() { - $this->assertEquals(TRADER_FUNC_UNST_PLUS_DI, Trader::$TRADER_FUNC_UNST_PLUS_DI); + self::assertEquals(TRADER_FUNC_UNST_PLUS_DI, Trader::$TRADER_FUNC_UNST_PLUS_DI); } public function testConstants_TRADER_FUNC_UNST_PLUS_DM() { - $this->assertEquals(TRADER_FUNC_UNST_PLUS_DM, Trader::$TRADER_FUNC_UNST_PLUS_DM); + self::assertEquals(TRADER_FUNC_UNST_PLUS_DM, Trader::$TRADER_FUNC_UNST_PLUS_DM); } public function testConstants_TRADER_FUNC_UNST_RSI() { - $this->assertEquals(TRADER_FUNC_UNST_RSI, Trader::$TRADER_FUNC_UNST_RSI); + self::assertEquals(TRADER_FUNC_UNST_RSI, Trader::$TRADER_FUNC_UNST_RSI); } public function testConstants_TRADER_FUNC_UNST_STOCHRSI() { - $this->assertEquals(TRADER_FUNC_UNST_STOCHRSI, Trader::$TRADER_FUNC_UNST_STOCHRSI); + self::assertEquals(TRADER_FUNC_UNST_STOCHRSI, Trader::$TRADER_FUNC_UNST_STOCHRSI); } public function testConstants_TRADER_FUNC_UNST_T3() { - $this->assertEquals(TRADER_FUNC_UNST_T3, Trader::$TRADER_FUNC_UNST_T3); + self::assertEquals(TRADER_FUNC_UNST_T3, Trader::$TRADER_FUNC_UNST_T3); } public function testConstants_TRADER_FUNC_UNST_ALL() { - $this->assertEquals(TRADER_FUNC_UNST_ALL, Trader::$TRADER_FUNC_UNST_ALL); + self::assertEquals(TRADER_FUNC_UNST_ALL, Trader::$TRADER_FUNC_UNST_ALL); } public function testConstants_TRADER_FUNC_UNST_NONE() { - $this->assertEquals(TRADER_FUNC_UNST_NONE, Trader::$TRADER_FUNC_UNST_NONE); + self::assertEquals(TRADER_FUNC_UNST_NONE, Trader::$TRADER_FUNC_UNST_NONE); } public function testConstants_TRADER_COMPATIBILITY_DEFAULT() { - $this->assertEquals(TRADER_COMPATIBILITY_DEFAULT, Trader::$TRADER_COMPATIBILITY_DEFAULT); + self::assertEquals(TRADER_COMPATIBILITY_DEFAULT, Trader::$TRADER_COMPATIBILITY_DEFAULT); } public function testConstants_TRADER_COMPATIBILITY_METASTOCK() { - $this->assertEquals(TRADER_COMPATIBILITY_METASTOCK, Trader::$TRADER_COMPATIBILITY_METASTOCK); + self::assertEquals(TRADER_COMPATIBILITY_METASTOCK, Trader::$TRADER_COMPATIBILITY_METASTOCK); } public function testConstants_TRADER_ERR_SUCCESS() { - $this->assertEquals(TRADER_ERR_SUCCESS, Trader::$TRADER_ERR_SUCCESS); + self::assertEquals(TRADER_ERR_SUCCESS, Trader::$TRADER_ERR_SUCCESS); } public function testConstants_TRADER_ERR_LIB_NOT_INITIALIZE() { - $this->assertEquals(TRADER_ERR_LIB_NOT_INITIALIZE, Trader::$TRADER_ERR_LIB_NOT_INITIALIZE); + self::assertEquals(TRADER_ERR_LIB_NOT_INITIALIZE, Trader::$TRADER_ERR_LIB_NOT_INITIALIZE); } public function testConstants_TRADER_ERR_BAD_PARAM() { - $this->assertEquals(TRADER_ERR_BAD_PARAM, Trader::$TRADER_ERR_BAD_PARAM); + self::assertEquals(TRADER_ERR_BAD_PARAM, Trader::$TRADER_ERR_BAD_PARAM); } public function testConstants_TRADER_ERR_ALLOC_ERR() { - $this->assertEquals(TRADER_ERR_ALLOC_ERR, Trader::$TRADER_ERR_ALLOC_ERR); + self::assertEquals(TRADER_ERR_ALLOC_ERR, Trader::$TRADER_ERR_ALLOC_ERR); } public function testConstants_TRADER_ERR_GROUP_NOT_FOUND() { - $this->assertEquals(TRADER_ERR_GROUP_NOT_FOUND, Trader::$TRADER_ERR_GROUP_NOT_FOUND); + self::assertEquals(TRADER_ERR_GROUP_NOT_FOUND, Trader::$TRADER_ERR_GROUP_NOT_FOUND); } public function testConstants_TRADER_ERR_FUNC_NOT_FOUND() { - $this->assertEquals(TRADER_ERR_FUNC_NOT_FOUND, Trader::$TRADER_ERR_FUNC_NOT_FOUND); + self::assertEquals(TRADER_ERR_FUNC_NOT_FOUND, Trader::$TRADER_ERR_FUNC_NOT_FOUND); } public function testConstants_TRADER_ERR_INVALID_HANDLE() { - $this->assertEquals(TRADER_ERR_INVALID_HANDLE, Trader::$TRADER_ERR_INVALID_HANDLE); + self::assertEquals(TRADER_ERR_INVALID_HANDLE, Trader::$TRADER_ERR_INVALID_HANDLE); } public function testConstants_TRADER_ERR_INVALID_PARAM_HOLDER() { - $this->assertEquals(TRADER_ERR_INVALID_PARAM_HOLDER, Trader::$TRADER_ERR_INVALID_PARAM_HOLDER); + self::assertEquals(TRADER_ERR_INVALID_PARAM_HOLDER, Trader::$TRADER_ERR_INVALID_PARAM_HOLDER); } public function testConstants_TRADER_ERR_INVALID_PARAM_HOLDER_TYPE() { - $this->assertEquals(TRADER_ERR_INVALID_PARAM_HOLDER_TYPE, Trader::$TRADER_ERR_INVALID_PARAM_HOLDER_TYPE); + self::assertEquals(TRADER_ERR_INVALID_PARAM_HOLDER_TYPE, Trader::$TRADER_ERR_INVALID_PARAM_HOLDER_TYPE); } public function testConstants_TRADER_ERR_INVALID_PARAM_FUNCTION() { - $this->assertEquals(TRADER_ERR_INVALID_PARAM_FUNCTION, Trader::$TRADER_ERR_INVALID_PARAM_FUNCTION); + self::assertEquals(TRADER_ERR_INVALID_PARAM_FUNCTION, Trader::$TRADER_ERR_INVALID_PARAM_FUNCTION); } public function testConstants_TRADER_ERR_INPUT_NOT_ALL_INITIALIZE() { - $this->assertEquals(TRADER_ERR_INPUT_NOT_ALL_INITIALIZE, Trader::$TRADER_ERR_INPUT_NOT_ALL_INITIALIZE); + self::assertEquals(TRADER_ERR_INPUT_NOT_ALL_INITIALIZE, Trader::$TRADER_ERR_INPUT_NOT_ALL_INITIALIZE); } public function testConstants_TRADER_ERR_OUTPUT_NOT_ALL_INITIALIZE() { - $this->assertEquals(TRADER_ERR_OUTPUT_NOT_ALL_INITIALIZE, Trader::$TRADER_ERR_OUTPUT_NOT_ALL_INITIALIZE); + self::assertEquals(TRADER_ERR_OUTPUT_NOT_ALL_INITIALIZE, Trader::$TRADER_ERR_OUTPUT_NOT_ALL_INITIALIZE); } public function testConstants_TRADER_ERR_OUT_OF_RANGE_START_INDEX() { - $this->assertEquals(TRADER_ERR_OUT_OF_RANGE_START_INDEX, Trader::$TRADER_ERR_OUT_OF_RANGE_START_INDEX); + self::assertEquals(TRADER_ERR_OUT_OF_RANGE_START_INDEX, Trader::$TRADER_ERR_OUT_OF_RANGE_START_INDEX); } public function testConstants_TRADER_ERR_OUT_OF_RANGE_END_INDEX() { - $this->assertEquals(TRADER_ERR_OUT_OF_RANGE_END_INDEX, Trader::$TRADER_ERR_OUT_OF_RANGE_END_INDEX); + self::assertEquals(TRADER_ERR_OUT_OF_RANGE_END_INDEX, Trader::$TRADER_ERR_OUT_OF_RANGE_END_INDEX); } public function testConstants_TRADER_ERR_INVALID_LIST_TYPE() { - $this->assertEquals(TRADER_ERR_INVALID_LIST_TYPE, Trader::$TRADER_ERR_INVALID_LIST_TYPE); + self::assertEquals(TRADER_ERR_INVALID_LIST_TYPE, Trader::$TRADER_ERR_INVALID_LIST_TYPE); } public function testConstants_TRADER_ERR_BAD_OBJECT() { - $this->assertEquals(TRADER_ERR_BAD_OBJECT, Trader::$TRADER_ERR_BAD_OBJECT); + self::assertEquals(TRADER_ERR_BAD_OBJECT, Trader::$TRADER_ERR_BAD_OBJECT); } public function testConstants_TRADER_ERR_NOT_SUPPORTED() { - $this->assertEquals(TRADER_ERR_NOT_SUPPORTED, Trader::$TRADER_ERR_NOT_SUPPORTED); + self::assertEquals(TRADER_ERR_NOT_SUPPORTED, Trader::$TRADER_ERR_NOT_SUPPORTED); } public function testConstants_TRADER_ERR_INTERNAL_ERROR() { - $this->assertEquals(TRADER_ERR_INTERNAL_ERROR, Trader::$TRADER_ERR_INTERNAL_ERROR); + self::assertEquals(TRADER_ERR_INTERNAL_ERROR, Trader::$TRADER_ERR_INTERNAL_ERROR); } public function testConstants_TRADER_ERR_UNKNOWN_ERROR() { - $this->assertEquals(TRADER_ERR_UNKNOWN_ERROR, Trader::$TRADER_ERR_UNKNOWN_ERROR); + self::assertEquals(TRADER_ERR_UNKNOWN_ERROR, Trader::$TRADER_ERR_UNKNOWN_ERROR); } // @@ -468,792 +468,792 @@ public function testConstants_TRADER_ERR_UNKNOWN_ERROR() public function testInterfaceFunctions_acos() { - $this->assertEquals(trader_acos(array_map('cos', $this->Close)), Trader::acos(array_map('cos', $this->Close))); + self::assertEquals(trader_acos(array_map('cos', $this->Close)), Trader::acos(array_map('cos', $this->Close))); } public function testInterfaceFunctions_ad() { - $this->assertEquals(trader_ad($this->High, $this->Low, $this->Close, $this->Volume), Trader::ad($this->High, $this->Low, $this->Close, $this->Volume)); + self::assertEquals(trader_ad($this->High, $this->Low, $this->Close, $this->Volume), Trader::ad($this->High, $this->Low, $this->Close, $this->Volume)); } public function testInterfaceFunctions_add() { - $this->assertEquals(trader_add($this->High, $this->Low), Trader::add($this->High, $this->Low)); + self::assertEquals(trader_add($this->High, $this->Low), Trader::add($this->High, $this->Low)); } public function testInterfaceFunctions_adosc() { - $this->assertEquals(trader_adosc($this->High, $this->Low, $this->Close, $this->Volume, 3, 10), Trader::adosc($this->High, $this->Low, $this->Close, $this->Volume, 3, 10)); + self::assertEquals(trader_adosc($this->High, $this->Low, $this->Close, $this->Volume, 3, 10), Trader::adosc($this->High, $this->Low, $this->Close, $this->Volume, 3, 10)); } public function testInterfaceFunctions_adx() { - $this->assertEquals(trader_adx($this->High, $this->Low, $this->Close, 14), Trader::adx($this->High, $this->Low, $this->Close, 14)); + self::assertEquals(trader_adx($this->High, $this->Low, $this->Close, 14), Trader::adx($this->High, $this->Low, $this->Close, 14)); } public function testInterfaceFunctions_adxr() { - $this->assertEquals(trader_adxr($this->High, $this->Low, $this->Close, 14), Trader::adxr($this->High, $this->Low, $this->Close, 14)); + self::assertEquals(trader_adxr($this->High, $this->Low, $this->Close, 14), Trader::adxr($this->High, $this->Low, $this->Close, 14)); } public function testInterfaceFunctions_apo() { - $this->assertEquals(trader_apo($this->Close, 12, 26, TRADER_MA_TYPE_SMA), Trader::apo($this->Close, 12, 26, TRADER_MA_TYPE_SMA)); + self::assertEquals(trader_apo($this->Close, 12, 26, TRADER_MA_TYPE_SMA), Trader::apo($this->Close, 12, 26, TRADER_MA_TYPE_SMA)); } public function testInterfaceFunctions_aroon() { - $this->assertEquals(trader_aroon($this->High, $this->Low, 14), Trader::aroon($this->High, $this->Low, 14)); + self::assertEquals(trader_aroon($this->High, $this->Low, 14), Trader::aroon($this->High, $this->Low, 14)); } public function testInterfaceFunctions_arronosc() { - $this->assertEquals(trader_aroonosc($this->High, $this->Low, 14), Trader::aroonosc($this->High, $this->Low, 14)); + self::assertEquals(trader_aroonosc($this->High, $this->Low, 14), Trader::aroonosc($this->High, $this->Low, 14)); } public function testInterfaceFunctions_asin() { - $this->assertEquals(trader_asin(array_map('sin', $this->Close)), Trader::asin(array_map('sin', $this->Close))); + self::assertEquals(trader_asin(array_map('sin', $this->Close)), Trader::asin(array_map('sin', $this->Close))); } public function testInterfaceFunctions_atan() { - $this->assertEquals(trader_atan(array_map('tan', $this->Close)), Trader::atan(array_map('tan', $this->Close))); + self::assertEquals(trader_atan(array_map('tan', $this->Close)), Trader::atan(array_map('tan', $this->Close))); } public function testInterfaceFunctions_atr() { - $this->assertEquals(trader_atr($this->High, $this->Low, $this->Close, 14), Trader::atr($this->High, $this->Low, $this->Close, 14)); + self::assertEquals(trader_atr($this->High, $this->Low, $this->Close, 14), Trader::atr($this->High, $this->Low, $this->Close, 14)); } public function testInterfaceFunctions_avgprice() { - $this->assertEquals(trader_avgprice($this->Open, $this->High, $this->Low, $this->Close), Trader::avgprice($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_avgprice($this->Open, $this->High, $this->Low, $this->Close), Trader::avgprice($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_bbands() { - $this->assertEquals(trader_bbands($this->Close, 5, 2.0, 2.0, TRADER_MA_TYPE_SMA), Trader::bbands($this->Close, 5, 2.0, 2.0, TRADER_MA_TYPE_SMA)); + self::assertEquals(trader_bbands($this->Close, 5, 2.0, 2.0, TRADER_MA_TYPE_SMA), Trader::bbands($this->Close, 5, 2.0, 2.0, TRADER_MA_TYPE_SMA)); } public function testInterfaceFunctions_beta() { - $this->assertEquals(trader_beta($this->Open, $this->Close, 5), Trader::beta($this->Open, $this->Close, 5)); + self::assertEquals(trader_beta($this->Open, $this->Close, 5), Trader::beta($this->Open, $this->Close, 5)); } public function testInterfaceFunctions_bop() { - $this->assertEquals(trader_bop($this->Open, $this->High, $this->Low, $this->Close), Trader::bop($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_bop($this->Open, $this->High, $this->Low, $this->Close), Trader::bop($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cci() { - $this->assertEquals(trader_cci($this->High, $this->Low, $this->Close, 14), Trader::cci($this->High, $this->Low, $this->Close, 14)); + self::assertEquals(trader_cci($this->High, $this->Low, $this->Close, 14), Trader::cci($this->High, $this->Low, $this->Close, 14)); } public function testInterfaceFunctions_cdl2crows() { - $this->assertEquals(trader_cdl2crows($this->Open, $this->High, $this->Low, $this->Close), Trader::cdl2crows($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdl2crows($this->Open, $this->High, $this->Low, $this->Close), Trader::cdl2crows($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdl3blackcrows() { - $this->assertEquals(trader_cdl3blackcrows($this->Open, $this->High, $this->Low, $this->Close), Trader::cdl3blackcrows($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdl3blackcrows($this->Open, $this->High, $this->Low, $this->Close), Trader::cdl3blackcrows($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdl3inside() { - $this->assertEquals(trader_cdl3inside($this->Open, $this->High, $this->Low, $this->Close), Trader::cdl3inside($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdl3inside($this->Open, $this->High, $this->Low, $this->Close), Trader::cdl3inside($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdl3linestrike() { - $this->assertEquals(trader_cdl3linestrike($this->Open, $this->High, $this->Low, $this->Close), Trader::cdl3linestrike($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdl3linestrike($this->Open, $this->High, $this->Low, $this->Close), Trader::cdl3linestrike($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdl3outside() { - $this->assertEquals(trader_cdl3outside($this->Open, $this->High, $this->Low, $this->Close), Trader::cdl3outside($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdl3outside($this->Open, $this->High, $this->Low, $this->Close), Trader::cdl3outside($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdl3starsinsouth() { - $this->assertEquals(trader_cdl3starsinsouth($this->Open, $this->High, $this->Low, $this->Close), Trader::cdl3starsinsouth($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdl3starsinsouth($this->Open, $this->High, $this->Low, $this->Close), Trader::cdl3starsinsouth($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdl3whitesoldiers() { - $this->assertEquals(trader_cdl3whitesoldiers($this->Open, $this->High, $this->Low, $this->Close), Trader::cdl3whitesoldiers($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdl3whitesoldiers($this->Open, $this->High, $this->Low, $this->Close), Trader::cdl3whitesoldiers($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlabandonedbaby() { - $this->assertEquals(trader_cdlabandonedbaby($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlabandonedbaby($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlabandonedbaby($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlabandonedbaby($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdladvanceblock() { - $this->assertEquals(trader_cdladvanceblock($this->Open, $this->High, $this->Low, $this->Close), Trader::cdladvanceblock($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdladvanceblock($this->Open, $this->High, $this->Low, $this->Close), Trader::cdladvanceblock($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlbelthold() { - $this->assertEquals(trader_cdlbelthold($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlbelthold($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlbelthold($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlbelthold($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlbreakaway() { - $this->assertEquals(trader_cdlbreakaway($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlbreakaway($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlbreakaway($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlbreakaway($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlclosingmarubozu() { - $this->assertEquals(trader_cdlclosingmarubozu($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlclosingmarubozu($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlclosingmarubozu($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlclosingmarubozu($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlconcealbabyswall() { - $this->assertEquals(trader_cdlconcealbabyswall($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlconcealbabyswall($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlconcealbabyswall($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlconcealbabyswall($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlcounterattack() { - $this->assertEquals(trader_cdlcounterattack($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlcounterattack($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlcounterattack($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlcounterattack($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdldarkcloudcover() { - $this->assertEquals(trader_cdldarkcloudcover($this->Open, $this->High, $this->Low, $this->Close, 0.5), Trader::cdldarkcloudcover($this->Open, $this->High, $this->Low, $this->Close, 0.5)); + self::assertEquals(trader_cdldarkcloudcover($this->Open, $this->High, $this->Low, $this->Close, 0.5), Trader::cdldarkcloudcover($this->Open, $this->High, $this->Low, $this->Close, 0.5)); } public function testInterfaceFunctions_cdldoji() { - $this->assertEquals(trader_cdldoji($this->Open, $this->High, $this->Low, $this->Close), Trader::cdldoji($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdldoji($this->Open, $this->High, $this->Low, $this->Close), Trader::cdldoji($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdldojistar() { - $this->assertEquals(trader_cdldojistar($this->Open, $this->High, $this->Low, $this->Close), Trader::cdldojistar($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdldojistar($this->Open, $this->High, $this->Low, $this->Close), Trader::cdldojistar($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdldragonflydoji() { - $this->assertEquals(trader_cdldragonflydoji($this->Open, $this->High, $this->Low, $this->Close), Trader::cdldragonflydoji($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdldragonflydoji($this->Open, $this->High, $this->Low, $this->Close), Trader::cdldragonflydoji($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlengulfing() { - $this->assertEquals(trader_cdlengulfing($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlengulfing($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlengulfing($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlengulfing($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdleveningdojistar() { - $this->assertEquals(trader_cdleveningdojistar($this->Open, $this->High, $this->Low, $this->Close, 0.3), Trader::cdleveningdojistar($this->Open, $this->High, $this->Low, $this->Close, 0.3)); + self::assertEquals(trader_cdleveningdojistar($this->Open, $this->High, $this->Low, $this->Close, 0.3), Trader::cdleveningdojistar($this->Open, $this->High, $this->Low, $this->Close, 0.3)); } public function testInterfaceFunctions_cdleveningstar() { - $this->assertEquals(trader_cdleveningstar($this->Open, $this->High, $this->Low, $this->Close, 0.3), Trader::cdleveningstar($this->Open, $this->High, $this->Low, $this->Close, 0.3)); + self::assertEquals(trader_cdleveningstar($this->Open, $this->High, $this->Low, $this->Close, 0.3), Trader::cdleveningstar($this->Open, $this->High, $this->Low, $this->Close, 0.3)); } public function testInterfaceFunctions_cdlgapsidesidewhite() { - $this->assertEquals(trader_cdlgapsidesidewhite($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlgapsidesidewhite($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlgapsidesidewhite($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlgapsidesidewhite($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlgravestonedoji() { - $this->assertEquals(trader_cdlgravestonedoji($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlgravestonedoji($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlgravestonedoji($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlgravestonedoji($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlhammer() { - $this->assertEquals(trader_cdlhammer($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlhammer($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlhammer($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlhammer($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlhangingman() { - $this->assertEquals(trader_cdlhangingman($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlhangingman($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlhangingman($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlhangingman($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlharami() { - $this->assertEquals(trader_cdlharami($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlharami($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlharami($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlharami($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlharamicross() { - $this->assertEquals(trader_cdlharamicross($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlharamicross($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlharamicross($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlharamicross($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlhighwave() { - $this->assertEquals(trader_cdlhighwave($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlhighwave($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlhighwave($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlhighwave($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlhikkake() { - $this->assertEquals(trader_cdlhikkake($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlhikkake($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlhikkake($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlhikkake($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlhikkakemod() { - $this->assertEquals(trader_cdlhikkakemod($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlhikkakemod($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlhikkakemod($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlhikkakemod($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlhomingpigeon() { - $this->assertEquals(trader_cdlhomingpigeon($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlhomingpigeon($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlhomingpigeon($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlhomingpigeon($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlidentical3crows() { - $this->assertEquals(trader_cdlidentical3crows($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlidentical3crows($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlidentical3crows($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlidentical3crows($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlinneck() { - $this->assertEquals(trader_cdlinneck($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlinneck($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlinneck($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlinneck($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlinvertedhammer() { - $this->assertEquals(trader_cdlinvertedhammer($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlinvertedhammer($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlinvertedhammer($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlinvertedhammer($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlkicking() { - $this->assertEquals(trader_cdlkicking($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlkicking($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlkicking($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlkicking($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlkickingbylength() { - $this->assertEquals(trader_cdlkickingbylength($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlkickingbylength($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlkickingbylength($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlkickingbylength($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlladderbottom() { - $this->assertEquals(trader_cdlladderbottom($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlladderbottom($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlladderbottom($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlladderbottom($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdllongleggeddoji() { - $this->assertEquals(trader_cdllongleggeddoji($this->Open, $this->High, $this->Low, $this->Close), Trader::cdllongleggeddoji($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdllongleggeddoji($this->Open, $this->High, $this->Low, $this->Close), Trader::cdllongleggeddoji($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdllongline() { - $this->assertEquals(trader_cdllongline($this->Open, $this->High, $this->Low, $this->Close), Trader::cdllongline($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdllongline($this->Open, $this->High, $this->Low, $this->Close), Trader::cdllongline($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlmarubozu() { - $this->assertEquals(trader_cdlmarubozu($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlmarubozu($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlmarubozu($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlmarubozu($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlmatchinglow() { - $this->assertEquals(trader_cdlmatchinglow($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlmatchinglow($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlmatchinglow($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlmatchinglow($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlmathold() { - $this->assertEquals(trader_cdlmathold($this->Open, $this->High, $this->Low, $this->Close, 0.5), Trader::cdlmathold($this->Open, $this->High, $this->Low, $this->Close, 0.5)); + self::assertEquals(trader_cdlmathold($this->Open, $this->High, $this->Low, $this->Close, 0.5), Trader::cdlmathold($this->Open, $this->High, $this->Low, $this->Close, 0.5)); } public function testInterfaceFunctions_cdlmorningdojistar() { - $this->assertEquals(trader_cdlmorningdojistar($this->Open, $this->High, $this->Low, $this->Close, 0.3), Trader::cdlmorningdojistar($this->Open, $this->High, $this->Low, $this->Close, 0.3)); + self::assertEquals(trader_cdlmorningdojistar($this->Open, $this->High, $this->Low, $this->Close, 0.3), Trader::cdlmorningdojistar($this->Open, $this->High, $this->Low, $this->Close, 0.3)); } public function testInterfaceFunctions_cdlmorningstar() { - $this->assertEquals(trader_cdlmorningstar($this->Open, $this->High, $this->Low, $this->Close, 0.3), Trader::cdlmorningstar($this->Open, $this->High, $this->Low, $this->Close, 0.3)); + self::assertEquals(trader_cdlmorningstar($this->Open, $this->High, $this->Low, $this->Close, 0.3), Trader::cdlmorningstar($this->Open, $this->High, $this->Low, $this->Close, 0.3)); } public function testInterfaceFunctions_cdlonneck() { - $this->assertEquals(trader_cdlonneck($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlonneck($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlonneck($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlonneck($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlpiercing() { - $this->assertEquals(trader_cdlpiercing($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlpiercing($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlpiercing($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlpiercing($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlrickshawman() { - $this->assertEquals(trader_cdlrickshawman($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlrickshawman($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlrickshawman($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlrickshawman($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlrisefall3methods() { - $this->assertEquals(trader_cdlrisefall3methods($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlrisefall3methods($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlrisefall3methods($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlrisefall3methods($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlseparatinglines() { - $this->assertEquals(trader_cdlseparatinglines($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlseparatinglines($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlseparatinglines($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlseparatinglines($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlshootingstar() { - $this->assertEquals(trader_cdlshootingstar($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlshootingstar($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlshootingstar($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlshootingstar($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlshortline() { - $this->assertEquals(trader_cdlshortline($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlshortline($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlshortline($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlshortline($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlspinningtop() { - $this->assertEquals(trader_cdlspinningtop($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlspinningtop($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlspinningtop($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlspinningtop($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlstalledpattern() { - $this->assertEquals(trader_cdlstalledpattern($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlstalledpattern($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlstalledpattern($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlstalledpattern($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlsticksandwich() { - $this->assertEquals(trader_cdlsticksandwich($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlsticksandwich($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlsticksandwich($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlsticksandwich($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdltakuri() { - $this->assertEquals(trader_cdltakuri($this->Open, $this->High, $this->Low, $this->Close), Trader::cdltakuri($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdltakuri($this->Open, $this->High, $this->Low, $this->Close), Trader::cdltakuri($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdltasukigap() { - $this->assertEquals(trader_cdltasukigap($this->Open, $this->High, $this->Low, $this->Close), Trader::cdltasukigap($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdltasukigap($this->Open, $this->High, $this->Low, $this->Close), Trader::cdltasukigap($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlthrusting() { - $this->assertEquals(trader_cdlthrusting($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlthrusting($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlthrusting($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlthrusting($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdltristar() { - $this->assertEquals(trader_cdltristar($this->Open, $this->High, $this->Low, $this->Close), Trader::cdltristar($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdltristar($this->Open, $this->High, $this->Low, $this->Close), Trader::cdltristar($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlunique3river() { - $this->assertEquals(trader_cdlunique3river($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlunique3river($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlunique3river($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlunique3river($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlupsidegap2crows() { - $this->assertEquals(trader_cdlupsidegap2crows($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlupsidegap2crows($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlupsidegap2crows($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlupsidegap2crows($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_cdlxsidegap3methods() { - $this->assertEquals(trader_cdlxsidegap3methods($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlxsidegap3methods($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlxsidegap3methods($this->Open, $this->High, $this->Low, $this->Close), Trader::cdlxsidegap3methods($this->Open, $this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_ceil() { - $this->assertEquals(trader_ceil($this->Close), Trader::ceil($this->Close)); + self::assertEquals(trader_ceil($this->Close), Trader::ceil($this->Close)); } public function testInterfaceFunctions_cmo() { - $this->assertEquals(trader_cmo($this->Close, 14), Trader::cmo($this->Close, 14)); + self::assertEquals(trader_cmo($this->Close, 14), Trader::cmo($this->Close, 14)); } public function testInterfaceFunctions_correl() { - $this->assertEquals(trader_correl($this->Open, $this->Close, 30), Trader::correl($this->Open, $this->Close, 30)); + self::assertEquals(trader_correl($this->Open, $this->Close, 30), Trader::correl($this->Open, $this->Close, 30)); } public function testInterfaceFunctions_cos() { - $this->assertEquals(trader_cos($this->Close), Trader::cos($this->Close)); + self::assertEquals(trader_cos($this->Close), Trader::cos($this->Close)); } public function testInterfaceFunctions_cosh() { - $this->assertEquals(trader_cosh($this->Close), Trader::cosh($this->Close)); + self::assertEquals(trader_cosh($this->Close), Trader::cosh($this->Close)); } public function testInterfaceFunctions_dema() { - $this->assertEquals(trader_dema($this->Close, 30), Trader::dema($this->Close, 30)); + self::assertEquals(trader_dema($this->Close, 30), Trader::dema($this->Close, 30)); } public function testInterfaceFunctions_div() { - $this->assertEquals(trader_div($this->Open, $this->Close), Trader::div($this->Open, $this->Close)); + self::assertEquals(trader_div($this->Open, $this->Close), Trader::div($this->Open, $this->Close)); } public function testInterfaceFunctions_dx() { - $this->assertEquals(trader_dx($this->High, $this->Low, $this->Close, 14), Trader::dx($this->High, $this->Low, $this->Close, 14)); + self::assertEquals(trader_dx($this->High, $this->Low, $this->Close, 14), Trader::dx($this->High, $this->Low, $this->Close, 14)); } public function testInterfaceFunctions_ema() { - $this->assertEquals(trader_ema($this->Close, 30), Trader::ema($this->Close, 30)); + self::assertEquals(trader_ema($this->Close, 30), Trader::ema($this->Close, 30)); } public function testInterfaceFunctions_exp() { - $this->assertEquals(trader_exp($this->Close), Trader::exp($this->Close)); + self::assertEquals(trader_exp($this->Close), Trader::exp($this->Close)); } public function testInterfaceFunctions_floor() { - $this->assertEquals(trader_floor($this->Close), Trader::floor($this->Close)); + self::assertEquals(trader_floor($this->Close), Trader::floor($this->Close)); } public function testInterfaceFunctions_ht_dcperiod() { - $this->assertEquals(trader_ht_dcperiod($this->Close), Trader::ht_dcperiod($this->Close)); + self::assertEquals(trader_ht_dcperiod($this->Close), Trader::ht_dcperiod($this->Close)); } public function testInterfaceFunctions_ht_dcphase() { - $this->assertEquals(trader_ht_dcphase($this->Close), Trader::ht_dcphase($this->Close)); + self::assertEquals(trader_ht_dcphase($this->Close), Trader::ht_dcphase($this->Close)); } public function testInterfaceFunctions_ht_phasor() { - $this->assertEquals(trader_ht_phasor($this->Close), Trader::ht_phasor($this->Close)); + self::assertEquals(trader_ht_phasor($this->Close), Trader::ht_phasor($this->Close)); } public function testInterfaceFunctions_ht_sine() { - $this->assertEquals(trader_ht_sine($this->Close), Trader::ht_sine($this->Close)); + self::assertEquals(trader_ht_sine($this->Close), Trader::ht_sine($this->Close)); } public function testInterfaceFunctions_ht_trendline() { - $this->assertEquals(trader_ht_trendline($this->Close), Trader::ht_trendline($this->Close)); + self::assertEquals(trader_ht_trendline($this->Close), Trader::ht_trendline($this->Close)); } public function testInterfaceFunctions_ht_trendmode() { - $this->assertEquals(trader_ht_trendmode($this->Close), Trader::ht_trendmode($this->Close)); + self::assertEquals(trader_ht_trendmode($this->Close), Trader::ht_trendmode($this->Close)); } public function testInterfaceFunctions_kama() { - $this->assertEquals(trader_kama($this->Close, 30), Trader::kama($this->Close, 30)); + self::assertEquals(trader_kama($this->Close, 30), Trader::kama($this->Close, 30)); } public function testInterfaceFunctions_linearreg_angle() { - $this->assertEquals(trader_linearreg_angle($this->Close, 14), Trader::linearreg_angle($this->Close, 14)); + self::assertEquals(trader_linearreg_angle($this->Close, 14), Trader::linearreg_angle($this->Close, 14)); } public function testInterfaceFunctions_linearreg_intercept() { - $this->assertEquals(trader_linearreg_intercept($this->Close, 14), Trader::linearreg_intercept($this->Close, 14)); + self::assertEquals(trader_linearreg_intercept($this->Close, 14), Trader::linearreg_intercept($this->Close, 14)); } public function testInterfaceFunctions_linearreg_slope() { - $this->assertEquals(trader_linearreg_slope($this->Close, 14), Trader::linearreg_slope($this->Close, 14)); + self::assertEquals(trader_linearreg_slope($this->Close, 14), Trader::linearreg_slope($this->Close, 14)); } public function testInterfaceFunctions_linearreg() { - $this->assertEquals(trader_linearreg($this->Close, 14), Trader::linearreg($this->Close, 14)); + self::assertEquals(trader_linearreg($this->Close, 14), Trader::linearreg($this->Close, 14)); } public function testInterfaceFunctions_ln() { - $this->assertEquals(trader_ln($this->Close), Trader::ln($this->Close)); + self::assertEquals(trader_ln($this->Close), Trader::ln($this->Close)); } public function testInterfaceFunctions_log10() { - $this->assertEquals(trader_log10($this->Close), Trader::log10($this->Close)); + self::assertEquals(trader_log10($this->Close), Trader::log10($this->Close)); } public function testInterfaceFunctions_ma() { - $this->assertEquals(trader_ma($this->Close, 30, TRADER_MA_TYPE_SMA), Trader::ma($this->Close, 30, TRADER_MA_TYPE_SMA)); + self::assertEquals(trader_ma($this->Close, 30, TRADER_MA_TYPE_SMA), Trader::ma($this->Close, 30, TRADER_MA_TYPE_SMA)); } public function testInterfaceFunctions_macd() { - $this->assertEquals(trader_macd($this->Close, 12, 26, 9), Trader::macd($this->Close, 12, 26, 9)); + self::assertEquals(trader_macd($this->Close, 12, 26, 9), Trader::macd($this->Close, 12, 26, 9)); } public function testInterfaceFunctions_macdext() { - $this->assertEquals(trader_macdext($this->Close, 12, TRADER_MA_TYPE_SMA, 26, TRADER_MA_TYPE_SMA, 9), Trader::macdext($this->Close, 12, TRADER_MA_TYPE_SMA, 26, TRADER_MA_TYPE_SMA, 9)); + self::assertEquals(trader_macdext($this->Close, 12, TRADER_MA_TYPE_SMA, 26, TRADER_MA_TYPE_SMA, 9), Trader::macdext($this->Close, 12, TRADER_MA_TYPE_SMA, 26, TRADER_MA_TYPE_SMA, 9)); } public function testInterfaceFunctions_macdfix() { - $this->assertEquals(trader_macdfix($this->Close, 9), Trader::macdfix($this->Close, 9)); + self::assertEquals(trader_macdfix($this->Close, 9), Trader::macdfix($this->Close, 9)); } public function testInterfaceFunctions_mama() { - $this->assertEquals(trader_mama($this->Close, 0.5, 0.05), Trader::mama($this->Close, 0.5, 0.05)); + self::assertEquals(trader_mama($this->Close, 0.5, 0.05), Trader::mama($this->Close, 0.5, 0.05)); } public function testInterfaceFunctions_mavp() { - $this->assertEquals(trader_mavp($this->Close, $this->Open, 2, 30, TRADER_MA_TYPE_SMA), Trader::mavp($this->Close, $this->Open, 2, 30, TRADER_MA_TYPE_SMA)); + self::assertEquals(trader_mavp($this->Close, $this->Open, 2, 30, TRADER_MA_TYPE_SMA), Trader::mavp($this->Close, $this->Open, 2, 30, TRADER_MA_TYPE_SMA)); } public function testInterfaceFunctions_max() { - $this->assertEquals(trader_max($this->Close, 30), Trader::max($this->Close, 30)); + self::assertEquals(trader_max($this->Close, 30), Trader::max($this->Close, 30)); } public function testInterfaceFunctions_maxindex() { - $this->assertEquals(trader_maxindex($this->Close, 30), Trader::maxindex($this->Close, 30)); + self::assertEquals(trader_maxindex($this->Close, 30), Trader::maxindex($this->Close, 30)); } public function testInterfaceFunctions_medprice() { - $this->assertEquals(trader_medprice($this->High, $this->Low), Trader::medprice($this->High, $this->Low)); + self::assertEquals(trader_medprice($this->High, $this->Low), Trader::medprice($this->High, $this->Low)); } public function testInterfaceFunctions_mfi() { - $this->assertEquals(trader_mfi($this->High, $this->Low, $this->Close, $this->Volume, 14), Trader::mfi($this->High, $this->Low, $this->Close, $this->Volume, 14)); + self::assertEquals(trader_mfi($this->High, $this->Low, $this->Close, $this->Volume, 14), Trader::mfi($this->High, $this->Low, $this->Close, $this->Volume, 14)); } public function testInterfaceFunctions_midpoint() { - $this->assertEquals(trader_midpoint($this->Close, 14), Trader::midpoint($this->Close, 14)); + self::assertEquals(trader_midpoint($this->Close, 14), Trader::midpoint($this->Close, 14)); } public function testInterfaceFunctions_midprice() { - $this->assertEquals(trader_midprice($this->High, $this->Low, 14), Trader::midprice($this->High, $this->Low, 14)); + self::assertEquals(trader_midprice($this->High, $this->Low, 14), Trader::midprice($this->High, $this->Low, 14)); } public function testInterfaceFunctions_min() { - $this->assertEquals(trader_min($this->High, 30), Trader::min($this->High, 30)); + self::assertEquals(trader_min($this->High, 30), Trader::min($this->High, 30)); } public function testInterfaceFunctions_minindex() { - $this->assertEquals(trader_minindex($this->High, 30), Trader::minindex($this->High, 30)); + self::assertEquals(trader_minindex($this->High, 30), Trader::minindex($this->High, 30)); } public function testInterfaceFunctions_minmax() { - $this->assertEquals(trader_minmax($this->High, 30), Trader::minmax($this->High, 30)); + self::assertEquals(trader_minmax($this->High, 30), Trader::minmax($this->High, 30)); } public function testInterfaceFunctions_minmaxindex() { - $this->assertEquals(trader_minmaxindex($this->High, 30), Trader::minmaxindex($this->High, 30)); + self::assertEquals(trader_minmaxindex($this->High, 30), Trader::minmaxindex($this->High, 30)); } public function testInterfaceFunctions_minus_di() { - $this->assertEquals(trader_minus_di($this->High, $this->Low, $this->Close, 14), Trader::minus_di($this->High, $this->Low, $this->Close, 14)); + self::assertEquals(trader_minus_di($this->High, $this->Low, $this->Close, 14), Trader::minus_di($this->High, $this->Low, $this->Close, 14)); } public function testInterfaceFunctions_minus_dmi() { - $this->assertEquals(trader_minus_dm($this->High, $this->Low, 14), Trader::minus_dm($this->High, $this->Low, 14)); + self::assertEquals(trader_minus_dm($this->High, $this->Low, 14), Trader::minus_dm($this->High, $this->Low, 14)); } public function testInterfaceFunctions_mom() { - $this->assertEquals(trader_mom($this->High, 10), Trader::mom($this->High, 10)); + self::assertEquals(trader_mom($this->High, 10), Trader::mom($this->High, 10)); } public function testInterfaceFunctions_mult() { - $this->assertEquals(trader_mult($this->Open, $this->Close), Trader::mult($this->Open, $this->Close)); + self::assertEquals(trader_mult($this->Open, $this->Close), Trader::mult($this->Open, $this->Close)); } public function testInterfaceFunctions_natr() { - $this->assertEquals(trader_natr($this->High, $this->Low, $this->Close, 14), Trader::natr($this->High, $this->Low, $this->Close, 14)); + self::assertEquals(trader_natr($this->High, $this->Low, $this->Close, 14), Trader::natr($this->High, $this->Low, $this->Close, 14)); } public function testInterfaceFunctions_obv() { - $this->assertEquals(trader_obv($this->Close, $this->Volume), Trader::obv($this->Close, $this->Volume)); + self::assertEquals(trader_obv($this->Close, $this->Volume), Trader::obv($this->Close, $this->Volume)); } public function testInterfaceFunctions_plus_di() { - $this->assertEquals(trader_plus_di($this->High, $this->Low, $this->Close, 14), Trader::plus_di($this->High, $this->Low, $this->Close, 14)); + self::assertEquals(trader_plus_di($this->High, $this->Low, $this->Close, 14), Trader::plus_di($this->High, $this->Low, $this->Close, 14)); } public function testInterfaceFunctions_plus_dm() { - $this->assertEquals(trader_plus_dm($this->High, $this->Low, 14), Trader::plus_dm($this->High, $this->Low, 14)); + self::assertEquals(trader_plus_dm($this->High, $this->Low, 14), Trader::plus_dm($this->High, $this->Low, 14)); } public function testInterfaceFunctions_ppo() { - $this->assertEquals(trader_ppo($this->Close, 12, 26, TRADER_MA_TYPE_SMA), Trader::ppo($this->Close, 12, 26, TRADER_MA_TYPE_SMA)); + self::assertEquals(trader_ppo($this->Close, 12, 26, TRADER_MA_TYPE_SMA), Trader::ppo($this->Close, 12, 26, TRADER_MA_TYPE_SMA)); } public function testInterfaceFunctions_roc() { - $this->assertEquals(trader_roc($this->Close, 10), Trader::roc($this->Close, 10)); + self::assertEquals(trader_roc($this->Close, 10), Trader::roc($this->Close, 10)); } public function testInterfaceFunctions_rocp() { - $this->assertEquals(trader_rocp($this->Close, 10), Trader::rocp($this->Close, 10)); + self::assertEquals(trader_rocp($this->Close, 10), Trader::rocp($this->Close, 10)); } public function testInterfaceFunctions_rocr100() { - $this->assertEquals(trader_rocr100($this->Close, 10), Trader::rocr100($this->Close, 10)); + self::assertEquals(trader_rocr100($this->Close, 10), Trader::rocr100($this->Close, 10)); } public function testInterfaceFunctions_rocr() { - $this->assertEquals(trader_rocr($this->Close, 10), Trader::rocr($this->Close, 10)); + self::assertEquals(trader_rocr($this->Close, 10), Trader::rocr($this->Close, 10)); } public function testInterfaceFunctions_rsi() { - $this->assertEquals(trader_rsi($this->Close, 14), Trader::rsi($this->Close, 14)); + self::assertEquals(trader_rsi($this->Close, 14), Trader::rsi($this->Close, 14)); } public function testInterfaceFunctions_sar() { - $this->assertEquals(trader_sar($this->Close, $this->Low, 0.02, 0.2), Trader::sar($this->Close, $this->Low, 0.02, 0.2)); + self::assertEquals(trader_sar($this->Close, $this->Low, 0.02, 0.2), Trader::sar($this->Close, $this->Low, 0.02, 0.2)); } public function testInterfaceFunctions_sarext() { - $this->assertEquals(trader_sarext($this->Close, $this->Low, 0.0, 0.0, 0.02, 0.02, 0.2, 0.02, 0.02, 0.2), Trader::sarext($this->Close, $this->Low, 0.0, 0.0, 0.02, 0.02, 0.2, 0.02, 0.02, 0.2)); + self::assertEquals(trader_sarext($this->Close, $this->Low, 0.0, 0.0, 0.02, 0.02, 0.2, 0.02, 0.02, 0.2), Trader::sarext($this->Close, $this->Low, 0.0, 0.0, 0.02, 0.02, 0.2, 0.02, 0.02, 0.2)); } public function testInterfaceFunctions_sin() { - $this->assertEquals(trader_sin($this->Close), Trader::sin($this->Close)); + self::assertEquals(trader_sin($this->Close), Trader::sin($this->Close)); } public function testInterfaceFunctions_sinh() { - $this->assertEquals(trader_sinh($this->Close), Trader::sinh($this->Close)); + self::assertEquals(trader_sinh($this->Close), Trader::sinh($this->Close)); } public function testInterfaceFunctions_sma() { - $this->assertEquals(trader_sma($this->Close, 30), Trader::sma($this->Close, 30)); + self::assertEquals(trader_sma($this->Close, 30), Trader::sma($this->Close, 30)); } public function testInterfaceFunctions_sqrt() { - $this->assertEquals(trader_sqrt($this->Close), Trader::sqrt($this->Close)); + self::assertEquals(trader_sqrt($this->Close), Trader::sqrt($this->Close)); } public function testInterfaceFunctions_stddev() { - $this->assertEquals(trader_stddev($this->Close, 5, 1.0), Trader::stddev($this->Close, 5, 1.0)); + self::assertEquals(trader_stddev($this->Close, 5, 1.0), Trader::stddev($this->Close, 5, 1.0)); } public function testInterfaceFunctions_stoch() { - $this->assertEquals(trader_stoch($this->High, $this->Low, $this->Close, 5, 3, TRADER_MA_TYPE_SMA, 3, TRADER_MA_TYPE_SMA), Trader::stoch($this->High, $this->Low, $this->Close, 5, 3, TRADER_MA_TYPE_SMA, 3, TRADER_MA_TYPE_SMA)); + self::assertEquals(trader_stoch($this->High, $this->Low, $this->Close, 5, 3, TRADER_MA_TYPE_SMA, 3, TRADER_MA_TYPE_SMA), Trader::stoch($this->High, $this->Low, $this->Close, 5, 3, TRADER_MA_TYPE_SMA, 3, TRADER_MA_TYPE_SMA)); } public function testInterfaceFunctions_stochf() { - $this->assertEquals(trader_stochf($this->High, $this->Low, $this->Close, 5, 3, TRADER_MA_TYPE_SMA), Trader::stochf($this->High, $this->Low, $this->Close, 5, 3, TRADER_MA_TYPE_SMA)); + self::assertEquals(trader_stochf($this->High, $this->Low, $this->Close, 5, 3, TRADER_MA_TYPE_SMA), Trader::stochf($this->High, $this->Low, $this->Close, 5, 3, TRADER_MA_TYPE_SMA)); } public function testInterfaceFunctions_stochrsi() { - $this->assertEquals(trader_stochrsi($this->Close, 14, 5, 3, TRADER_MA_TYPE_SMA), Trader::stochrsi($this->Close, 14, 5, 3, TRADER_MA_TYPE_SMA)); + self::assertEquals(trader_stochrsi($this->Close, 14, 5, 3, TRADER_MA_TYPE_SMA), Trader::stochrsi($this->Close, 14, 5, 3, TRADER_MA_TYPE_SMA)); } public function testInterfaceFunctions_sub() { - $this->assertEquals(trader_sub($this->High, $this->Low), Trader::sub($this->High, $this->Low)); + self::assertEquals(trader_sub($this->High, $this->Low), Trader::sub($this->High, $this->Low)); } public function testInterfaceFunctions_sum() { - $this->assertEquals(trader_sum($this->High, 30), Trader::sum($this->High, 30)); + self::assertEquals(trader_sum($this->High, 30), Trader::sum($this->High, 30)); } public function testInterfaceFunctions_t3() { - $this->assertEquals(trader_t3($this->High, 5, 0.7), Trader::t3($this->High, 5, 0.7)); + self::assertEquals(trader_t3($this->High, 5, 0.7), Trader::t3($this->High, 5, 0.7)); } public function testInterfaceFunctions_tan() { - $this->assertEquals(trader_tan($this->Close), Trader::tan($this->Close)); + self::assertEquals(trader_tan($this->Close), Trader::tan($this->Close)); } public function testInterfaceFunctions_tanh() { - $this->assertEquals(trader_tanh($this->Close), Trader::tanh($this->Close)); + self::assertEquals(trader_tanh($this->Close), Trader::tanh($this->Close)); } public function testInterfaceFunctions_tema() { - $this->assertEquals(trader_tema($this->Close, 30), Trader::tema($this->Close, 30)); + self::assertEquals(trader_tema($this->Close, 30), Trader::tema($this->Close, 30)); } public function testInterfaceFunctions_trange() { - $this->assertEquals(trader_trange($this->High, $this->Low, $this->Close), Trader::trange($this->High, $this->Low, $this->Close)); + self::assertEquals(trader_trange($this->High, $this->Low, $this->Close), Trader::trange($this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_trima() { - $this->assertEquals(trader_trima($this->Close, 30), Trader::trima($this->Close, 30)); + self::assertEquals(trader_trima($this->Close, 30), Trader::trima($this->Close, 30)); } public function testInterfaceFunctions_trix() { - $this->assertEquals(trader_trix($this->Close, 30), Trader::trix($this->Close, 30)); + self::assertEquals(trader_trix($this->Close, 30), Trader::trix($this->Close, 30)); } public function testInterfaceFunctions_tsf() { - $this->assertEquals(trader_tsf($this->Close, 14), Trader::tsf($this->Close, 14)); + self::assertEquals(trader_tsf($this->Close, 14), Trader::tsf($this->Close, 14)); } public function testInterfaceFunctions_typprice() { - $this->assertEquals(trader_typprice($this->High, $this->Low, $this->Close), Trader::typprice($this->High, $this->Low, $this->Close)); + self::assertEquals(trader_typprice($this->High, $this->Low, $this->Close), Trader::typprice($this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_ultosc() { - $this->assertEquals(trader_ultosc($this->High, $this->Low, $this->Close, 7, 14, 28), Trader::ultosc($this->High, $this->Low, $this->Close, 7, 14, 28)); + self::assertEquals(trader_ultosc($this->High, $this->Low, $this->Close, 7, 14, 28), Trader::ultosc($this->High, $this->Low, $this->Close, 7, 14, 28)); } public function testInterfaceFunctions_var() { - $this->assertEquals(trader_var($this->Close, 5, 1.0), Trader::var($this->Close, 5, 1.0)); + self::assertEquals(trader_var($this->Close, 5, 1.0), Trader::var($this->Close, 5, 1.0)); } public function testInterfaceFunctions_wclprice() { - $this->assertEquals(trader_wclprice($this->High, $this->Low, $this->Close), Trader::wclprice($this->High, $this->Low, $this->Close)); + self::assertEquals(trader_wclprice($this->High, $this->Low, $this->Close), Trader::wclprice($this->High, $this->Low, $this->Close)); } public function testInterfaceFunctions_willr() { - $this->assertEquals(trader_willr($this->High, $this->Low, $this->Close, 14), Trader::willr($this->High, $this->Low, $this->Close, 14)); + self::assertEquals(trader_willr($this->High, $this->Low, $this->Close, 14), Trader::willr($this->High, $this->Low, $this->Close, 14)); } public function testInterfaceFunctions_wma() { - $this->assertEquals(trader_wma($this->Close, 30), Trader::wma($this->Close, 30)); + self::assertEquals(trader_wma($this->Close, 30), Trader::wma($this->Close, 30)); } // @@ -1262,792 +1262,792 @@ public function testInterfaceFunctions_wma() public function testFriendlyFunctions_acos() { - $this->assertEquals(trader_acos(array_map('cos', $this->Close)), Trader::mathArcCosine(array_map('cos', $this->Close))); + self::assertEquals(trader_acos(array_map('cos', $this->Close)), Trader::mathArcCosine(array_map('cos', $this->Close))); } public function testFriendlyFunctions_ad() { - $this->assertEquals(trader_ad($this->High, $this->Low, $this->Close, $this->Volume), Trader::chaikinAccumulationDistributionLine($this->High, $this->Low, $this->Close, $this->Volume)); + self::assertEquals(trader_ad($this->High, $this->Low, $this->Close, $this->Volume), Trader::chaikinAccumulationDistributionLine($this->High, $this->Low, $this->Close, $this->Volume)); } public function testFriendlyFunctions_add() { - $this->assertEquals(trader_add($this->High, $this->Low), Trader::mathAddition($this->High, $this->Low)); + self::assertEquals(trader_add($this->High, $this->Low), Trader::mathAddition($this->High, $this->Low)); } public function testFriendlyFunctions_adosc() { - $this->assertEquals(trader_adosc($this->High, $this->Low, $this->Close, $this->Volume, 3, 10), Trader::chaikinAccumulationDistributionOscillator($this->High, $this->Low, $this->Close, $this->Volume, 3, 10)); + self::assertEquals(trader_adosc($this->High, $this->Low, $this->Close, $this->Volume, 3, 10), Trader::chaikinAccumulationDistributionOscillator($this->High, $this->Low, $this->Close, $this->Volume, 3, 10)); } public function testFriendlyFunctions_adx() { - $this->assertEquals(trader_adx($this->High, $this->Low, $this->Close, 14), Trader::averageDirectionalMovementIndex($this->High, $this->Low, $this->Close, 14)); + self::assertEquals(trader_adx($this->High, $this->Low, $this->Close, 14), Trader::averageDirectionalMovementIndex($this->High, $this->Low, $this->Close, 14)); } public function testFriendlyFunctions_adxr() { - $this->assertEquals(trader_adxr($this->High, $this->Low, $this->Close, 14), Trader::averageDirectionalMovementIndexRating($this->High, $this->Low, $this->Close, 14)); + self::assertEquals(trader_adxr($this->High, $this->Low, $this->Close, 14), Trader::averageDirectionalMovementIndexRating($this->High, $this->Low, $this->Close, 14)); } public function testFriendlyFunctions_apo() { - $this->assertEquals(trader_apo($this->Close, 12, 26, TRADER_MA_TYPE_SMA), Trader::absolutePriceOscillator($this->Close, 12, 26, TRADER_MA_TYPE_SMA)); + self::assertEquals(trader_apo($this->Close, 12, 26, TRADER_MA_TYPE_SMA), Trader::absolutePriceOscillator($this->Close, 12, 26, TRADER_MA_TYPE_SMA)); } public function testFriendlyFunctions_aroon() { - $this->assertEquals(trader_aroon($this->High, $this->Low, 14), Trader::aroonIndicator($this->High, $this->Low, 14)); + self::assertEquals(trader_aroon($this->High, $this->Low, 14), Trader::aroonIndicator($this->High, $this->Low, 14)); } public function testFriendlyFunctions_arronosc() { - $this->assertEquals(trader_aroonosc($this->High, $this->Low, 14), Trader::arronOscillator($this->High, $this->Low, 14)); + self::assertEquals(trader_aroonosc($this->High, $this->Low, 14), Trader::arronOscillator($this->High, $this->Low, 14)); } public function testFriendlyFunctions_asin() { - $this->assertEquals(trader_asin(array_map('sin', $this->Close)), Trader::mathArcSine(array_map('sin', $this->Close))); + self::assertEquals(trader_asin(array_map('sin', $this->Close)), Trader::mathArcSine(array_map('sin', $this->Close))); } public function testFriendlyFunctions_atan() { - $this->assertEquals(trader_atan(array_map('tan', $this->Close)), Trader::mathArcTangent(array_map('tan', $this->Close))); + self::assertEquals(trader_atan(array_map('tan', $this->Close)), Trader::mathArcTangent(array_map('tan', $this->Close))); } public function testFriendlyFunctions_atr() { - $this->assertEquals(trader_atr($this->High, $this->Low, $this->Close, 14), Trader::averageTrueRange($this->High, $this->Low, $this->Close, 14)); + self::assertEquals(trader_atr($this->High, $this->Low, $this->Close, 14), Trader::averageTrueRange($this->High, $this->Low, $this->Close, 14)); } public function testFriendlyFunctions_avgprice() { - $this->assertEquals(trader_avgprice($this->Open, $this->High, $this->Low, $this->Close), Trader::averagePrice($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_avgprice($this->Open, $this->High, $this->Low, $this->Close), Trader::averagePrice($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_bbands() { - $this->assertEquals(trader_bbands($this->Close, 5, 2.0, 2.0, TRADER_MA_TYPE_SMA), Trader::bollingerBands($this->Close, 5, 2.0, 2.0, TRADER_MA_TYPE_SMA)); + self::assertEquals(trader_bbands($this->Close, 5, 2.0, 2.0, TRADER_MA_TYPE_SMA), Trader::bollingerBands($this->Close, 5, 2.0, 2.0, TRADER_MA_TYPE_SMA)); } public function testFriendlyFunctions_beta() { - $this->assertEquals(trader_beta($this->Open, $this->Close, 5), Trader::betaVolatility($this->Open, $this->Close, 5)); + self::assertEquals(trader_beta($this->Open, $this->Close, 5), Trader::betaVolatility($this->Open, $this->Close, 5)); } public function testFriendlyFunctions_bop() { - $this->assertEquals(trader_bop($this->Open, $this->High, $this->Low, $this->Close), Trader::balanceOfPower($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_bop($this->Open, $this->High, $this->Low, $this->Close), Trader::balanceOfPower($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cci() { - $this->assertEquals(trader_cci($this->High, $this->Low, $this->Close, 14), Trader::commodityChannelIndex($this->High, $this->Low, $this->Close, 14)); + self::assertEquals(trader_cci($this->High, $this->Low, $this->Close, 14), Trader::commodityChannelIndex($this->High, $this->Low, $this->Close, 14)); } public function testFriendlyFunctions_cdl2crows() { - $this->assertEquals(trader_cdl2crows($this->Open, $this->High, $this->Low, $this->Close), Trader::candleTwoCrows($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdl2crows($this->Open, $this->High, $this->Low, $this->Close), Trader::candleTwoCrows($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdl3blackcrows() { - $this->assertEquals(trader_cdl3blackcrows($this->Open, $this->High, $this->Low, $this->Close), Trader::candleThreeBlackCrows($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdl3blackcrows($this->Open, $this->High, $this->Low, $this->Close), Trader::candleThreeBlackCrows($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdl3inside() { - $this->assertEquals(trader_cdl3inside($this->Open, $this->High, $this->Low, $this->Close), Trader::candleThreeInsideUpDown($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdl3inside($this->Open, $this->High, $this->Low, $this->Close), Trader::candleThreeInsideUpDown($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdl3linestrike() { - $this->assertEquals(trader_cdl3linestrike($this->Open, $this->High, $this->Low, $this->Close), Trader::candleThreeLineStrike($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdl3linestrike($this->Open, $this->High, $this->Low, $this->Close), Trader::candleThreeLineStrike($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdl3outside() { - $this->assertEquals(trader_cdl3outside($this->Open, $this->High, $this->Low, $this->Close), Trader::candleThreeOutsideUpDown($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdl3outside($this->Open, $this->High, $this->Low, $this->Close), Trader::candleThreeOutsideUpDown($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdl3starsinsouth() { - $this->assertEquals(trader_cdl3starsinsouth($this->Open, $this->High, $this->Low, $this->Close), Trader::candleThreeStarsInTheSouth($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdl3starsinsouth($this->Open, $this->High, $this->Low, $this->Close), Trader::candleThreeStarsInTheSouth($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdl3whitesoldiers() { - $this->assertEquals(trader_cdl3whitesoldiers($this->Open, $this->High, $this->Low, $this->Close), Trader::candleThreeWhiteSoldiers($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdl3whitesoldiers($this->Open, $this->High, $this->Low, $this->Close), Trader::candleThreeWhiteSoldiers($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlabandonedbaby() { - $this->assertEquals(trader_cdlabandonedbaby($this->Open, $this->High, $this->Low, $this->Close), Trader::candleAbandonedBaby($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlabandonedbaby($this->Open, $this->High, $this->Low, $this->Close), Trader::candleAbandonedBaby($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdladvanceblock() { - $this->assertEquals(trader_cdladvanceblock($this->Open, $this->High, $this->Low, $this->Close), Trader::candleAdvanceBlock($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdladvanceblock($this->Open, $this->High, $this->Low, $this->Close), Trader::candleAdvanceBlock($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlbelthold() { - $this->assertEquals(trader_cdlbelthold($this->Open, $this->High, $this->Low, $this->Close), Trader::candleBeltHold($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlbelthold($this->Open, $this->High, $this->Low, $this->Close), Trader::candleBeltHold($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlbreakaway() { - $this->assertEquals(trader_cdlbreakaway($this->Open, $this->High, $this->Low, $this->Close), Trader::candleBreakaway($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlbreakaway($this->Open, $this->High, $this->Low, $this->Close), Trader::candleBreakaway($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlclosingmarubozu() { - $this->assertEquals(trader_cdlclosingmarubozu($this->Open, $this->High, $this->Low, $this->Close), Trader::candleClosingMarubozu($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlclosingmarubozu($this->Open, $this->High, $this->Low, $this->Close), Trader::candleClosingMarubozu($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlconcealbabyswall() { - $this->assertEquals(trader_cdlconcealbabyswall($this->Open, $this->High, $this->Low, $this->Close), Trader::candleConcealingBabySwallow($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlconcealbabyswall($this->Open, $this->High, $this->Low, $this->Close), Trader::candleConcealingBabySwallow($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlcounterattack() { - $this->assertEquals(trader_cdlcounterattack($this->Open, $this->High, $this->Low, $this->Close), Trader::candleCounterattack($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlcounterattack($this->Open, $this->High, $this->Low, $this->Close), Trader::candleCounterattack($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdldarkcloudcover() { - $this->assertEquals(trader_cdldarkcloudcover($this->Open, $this->High, $this->Low, $this->Close, 0.5), Trader::candleDarkCloudCover($this->Open, $this->High, $this->Low, $this->Close, 0.5)); + self::assertEquals(trader_cdldarkcloudcover($this->Open, $this->High, $this->Low, $this->Close, 0.5), Trader::candleDarkCloudCover($this->Open, $this->High, $this->Low, $this->Close, 0.5)); } public function testFriendlyFunctions_cdldoji() { - $this->assertEquals(trader_cdldoji($this->Open, $this->High, $this->Low, $this->Close), Trader::candleDoji($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdldoji($this->Open, $this->High, $this->Low, $this->Close), Trader::candleDoji($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdldojistar() { - $this->assertEquals(trader_cdldojistar($this->Open, $this->High, $this->Low, $this->Close), Trader::candleDojiStar($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdldojistar($this->Open, $this->High, $this->Low, $this->Close), Trader::candleDojiStar($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdldragonflydoji() { - $this->assertEquals(trader_cdldragonflydoji($this->Open, $this->High, $this->Low, $this->Close), Trader::candleDragonflyDoji($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdldragonflydoji($this->Open, $this->High, $this->Low, $this->Close), Trader::candleDragonflyDoji($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlengulfing() { - $this->assertEquals(trader_cdlengulfing($this->Open, $this->High, $this->Low, $this->Close), Trader::candleEngulfingPattern($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlengulfing($this->Open, $this->High, $this->Low, $this->Close), Trader::candleEngulfingPattern($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdleveningdojistar() { - $this->assertEquals(trader_cdleveningdojistar($this->Open, $this->High, $this->Low, $this->Close, 0.3), Trader::candleEveningDojiStar($this->Open, $this->High, $this->Low, $this->Close, 0.3)); + self::assertEquals(trader_cdleveningdojistar($this->Open, $this->High, $this->Low, $this->Close, 0.3), Trader::candleEveningDojiStar($this->Open, $this->High, $this->Low, $this->Close, 0.3)); } public function testFriendlyFunctions_cdleveningstar() { - $this->assertEquals(trader_cdleveningstar($this->Open, $this->High, $this->Low, $this->Close, 0.3), Trader::candleEveningStar($this->Open, $this->High, $this->Low, $this->Close, 0.3)); + self::assertEquals(trader_cdleveningstar($this->Open, $this->High, $this->Low, $this->Close, 0.3), Trader::candleEveningStar($this->Open, $this->High, $this->Low, $this->Close, 0.3)); } public function testFriendlyFunctions_cdlgapsidesidewhite() { - $this->assertEquals(trader_cdlgapsidesidewhite($this->Open, $this->High, $this->Low, $this->Close), Trader::candleUpDownGapsSideBySideWhiteLines($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlgapsidesidewhite($this->Open, $this->High, $this->Low, $this->Close), Trader::candleUpDownGapsSideBySideWhiteLines($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlgravestonedoji() { - $this->assertEquals(trader_cdlgravestonedoji($this->Open, $this->High, $this->Low, $this->Close), Trader::candleGravestoneDoji($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlgravestonedoji($this->Open, $this->High, $this->Low, $this->Close), Trader::candleGravestoneDoji($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlhammer() { - $this->assertEquals(trader_cdlhammer($this->Open, $this->High, $this->Low, $this->Close), Trader::candleHammer($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlhammer($this->Open, $this->High, $this->Low, $this->Close), Trader::candleHammer($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlhangingman() { - $this->assertEquals(trader_cdlhangingman($this->Open, $this->High, $this->Low, $this->Close), Trader::candleHangingMan($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlhangingman($this->Open, $this->High, $this->Low, $this->Close), Trader::candleHangingMan($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlharami() { - $this->assertEquals(trader_cdlharami($this->Open, $this->High, $this->Low, $this->Close), Trader::candleHarami($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlharami($this->Open, $this->High, $this->Low, $this->Close), Trader::candleHarami($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlharamicross() { - $this->assertEquals(trader_cdlharamicross($this->Open, $this->High, $this->Low, $this->Close), Trader::candleHaramiCross($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlharamicross($this->Open, $this->High, $this->Low, $this->Close), Trader::candleHaramiCross($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlhighwave() { - $this->assertEquals(trader_cdlhighwave($this->Open, $this->High, $this->Low, $this->Close), Trader::candleHighWave($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlhighwave($this->Open, $this->High, $this->Low, $this->Close), Trader::candleHighWave($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlhikkake() { - $this->assertEquals(trader_cdlhikkake($this->Open, $this->High, $this->Low, $this->Close), Trader::candleHikkake($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlhikkake($this->Open, $this->High, $this->Low, $this->Close), Trader::candleHikkake($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlhikkakemod() { - $this->assertEquals(trader_cdlhikkakemod($this->Open, $this->High, $this->Low, $this->Close), Trader::candleModifiedHikkake($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlhikkakemod($this->Open, $this->High, $this->Low, $this->Close), Trader::candleModifiedHikkake($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlhomingpigeon() { - $this->assertEquals(trader_cdlhomingpigeon($this->Open, $this->High, $this->Low, $this->Close), Trader::candleHomingPigeon($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlhomingpigeon($this->Open, $this->High, $this->Low, $this->Close), Trader::candleHomingPigeon($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlidentical3crows() { - $this->assertEquals(trader_cdlidentical3crows($this->Open, $this->High, $this->Low, $this->Close), Trader::candleIdenticalThreeCrows($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlidentical3crows($this->Open, $this->High, $this->Low, $this->Close), Trader::candleIdenticalThreeCrows($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlinneck() { - $this->assertEquals(trader_cdlinneck($this->Open, $this->High, $this->Low, $this->Close), Trader::candleInNeck($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlinneck($this->Open, $this->High, $this->Low, $this->Close), Trader::candleInNeck($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlinvertedhammer() { - $this->assertEquals(trader_cdlinvertedhammer($this->Open, $this->High, $this->Low, $this->Close), Trader::candleInvertedHammer($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlinvertedhammer($this->Open, $this->High, $this->Low, $this->Close), Trader::candleInvertedHammer($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlkicking() { - $this->assertEquals(trader_cdlkicking($this->Open, $this->High, $this->Low, $this->Close), Trader::candleKicking($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlkicking($this->Open, $this->High, $this->Low, $this->Close), Trader::candleKicking($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlkickingbylength() { - $this->assertEquals(trader_cdlkickingbylength($this->Open, $this->High, $this->Low, $this->Close), Trader::candleKickingByLength($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlkickingbylength($this->Open, $this->High, $this->Low, $this->Close), Trader::candleKickingByLength($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlladderbottom() { - $this->assertEquals(trader_cdlladderbottom($this->Open, $this->High, $this->Low, $this->Close), Trader::candleLadderBottom($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlladderbottom($this->Open, $this->High, $this->Low, $this->Close), Trader::candleLadderBottom($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdllongleggeddoji() { - $this->assertEquals(trader_cdllongleggeddoji($this->Open, $this->High, $this->Low, $this->Close), Trader::candleLongLeggedDoji($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdllongleggeddoji($this->Open, $this->High, $this->Low, $this->Close), Trader::candleLongLeggedDoji($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdllongline() { - $this->assertEquals(trader_cdllongline($this->Open, $this->High, $this->Low, $this->Close), Trader::candleLongLine($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdllongline($this->Open, $this->High, $this->Low, $this->Close), Trader::candleLongLine($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlmarubozu() { - $this->assertEquals(trader_cdlmarubozu($this->Open, $this->High, $this->Low, $this->Close), Trader::candleMarubozu($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlmarubozu($this->Open, $this->High, $this->Low, $this->Close), Trader::candleMarubozu($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlmatchinglow() { - $this->assertEquals(trader_cdlmatchinglow($this->Open, $this->High, $this->Low, $this->Close), Trader::candleMatchingLow($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlmatchinglow($this->Open, $this->High, $this->Low, $this->Close), Trader::candleMatchingLow($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlmathold() { - $this->assertEquals(trader_cdlmathold($this->Open, $this->High, $this->Low, $this->Close, 0.5), Trader::candleMatHold($this->Open, $this->High, $this->Low, $this->Close, 0.5)); + self::assertEquals(trader_cdlmathold($this->Open, $this->High, $this->Low, $this->Close, 0.5), Trader::candleMatHold($this->Open, $this->High, $this->Low, $this->Close, 0.5)); } public function testFriendlyFunctions_cdlmorningdojistar() { - $this->assertEquals(trader_cdlmorningdojistar($this->Open, $this->High, $this->Low, $this->Close, 0.3), Trader::candleMorningDojiStar($this->Open, $this->High, $this->Low, $this->Close, 0.3)); + self::assertEquals(trader_cdlmorningdojistar($this->Open, $this->High, $this->Low, $this->Close, 0.3), Trader::candleMorningDojiStar($this->Open, $this->High, $this->Low, $this->Close, 0.3)); } public function testFriendlyFunctions_cdlmorningstar() { - $this->assertEquals(trader_cdlmorningstar($this->Open, $this->High, $this->Low, $this->Close, 0.3), Trader::candleMorningStar($this->Open, $this->High, $this->Low, $this->Close, 0.3)); + self::assertEquals(trader_cdlmorningstar($this->Open, $this->High, $this->Low, $this->Close, 0.3), Trader::candleMorningStar($this->Open, $this->High, $this->Low, $this->Close, 0.3)); } public function testFriendlyFunctions_cdlonneck() { - $this->assertEquals(trader_cdlonneck($this->Open, $this->High, $this->Low, $this->Close), Trader::candleOnNeck($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlonneck($this->Open, $this->High, $this->Low, $this->Close), Trader::candleOnNeck($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlpiercing() { - $this->assertEquals(trader_cdlpiercing($this->Open, $this->High, $this->Low, $this->Close), Trader::candlePiercing($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlpiercing($this->Open, $this->High, $this->Low, $this->Close), Trader::candlePiercing($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlrickshawman() { - $this->assertEquals(trader_cdlrickshawman($this->Open, $this->High, $this->Low, $this->Close), Trader::candleRickshawMan($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlrickshawman($this->Open, $this->High, $this->Low, $this->Close), Trader::candleRickshawMan($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlrisefall3methods() { - $this->assertEquals(trader_cdlrisefall3methods($this->Open, $this->High, $this->Low, $this->Close), Trader::candleRisingFallingThreeMethods($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlrisefall3methods($this->Open, $this->High, $this->Low, $this->Close), Trader::candleRisingFallingThreeMethods($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlseparatinglines() { - $this->assertEquals(trader_cdlseparatinglines($this->Open, $this->High, $this->Low, $this->Close), Trader::candleSeparatingLines($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlseparatinglines($this->Open, $this->High, $this->Low, $this->Close), Trader::candleSeparatingLines($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlshootingstar() { - $this->assertEquals(trader_cdlshootingstar($this->Open, $this->High, $this->Low, $this->Close), Trader::candleShootingStar($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlshootingstar($this->Open, $this->High, $this->Low, $this->Close), Trader::candleShootingStar($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlshortline() { - $this->assertEquals(trader_cdlshortline($this->Open, $this->High, $this->Low, $this->Close), Trader::candleShortLine($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlshortline($this->Open, $this->High, $this->Low, $this->Close), Trader::candleShortLine($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlspinningtop() { - $this->assertEquals(trader_cdlspinningtop($this->Open, $this->High, $this->Low, $this->Close), Trader::candleSpinningTop($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlspinningtop($this->Open, $this->High, $this->Low, $this->Close), Trader::candleSpinningTop($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlstalledpattern() { - $this->assertEquals(trader_cdlstalledpattern($this->Open, $this->High, $this->Low, $this->Close), Trader::candleStalled($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlstalledpattern($this->Open, $this->High, $this->Low, $this->Close), Trader::candleStalled($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlsticksandwich() { - $this->assertEquals(trader_cdlsticksandwich($this->Open, $this->High, $this->Low, $this->Close), Trader::candleStickSandwich($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlsticksandwich($this->Open, $this->High, $this->Low, $this->Close), Trader::candleStickSandwich($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdltakuri() { - $this->assertEquals(trader_cdltakuri($this->Open, $this->High, $this->Low, $this->Close), Trader::candleTakuri($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdltakuri($this->Open, $this->High, $this->Low, $this->Close), Trader::candleTakuri($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdltasukigap() { - $this->assertEquals(trader_cdltasukigap($this->Open, $this->High, $this->Low, $this->Close), Trader::candleTasukiGap($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdltasukigap($this->Open, $this->High, $this->Low, $this->Close), Trader::candleTasukiGap($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlthrusting() { - $this->assertEquals(trader_cdlthrusting($this->Open, $this->High, $this->Low, $this->Close), Trader::candleThrusting($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlthrusting($this->Open, $this->High, $this->Low, $this->Close), Trader::candleThrusting($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdltristar() { - $this->assertEquals(trader_cdltristar($this->Open, $this->High, $this->Low, $this->Close), Trader::candleTristar($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdltristar($this->Open, $this->High, $this->Low, $this->Close), Trader::candleTristar($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlunique3river() { - $this->assertEquals(trader_cdlunique3river($this->Open, $this->High, $this->Low, $this->Close), Trader::candleUniqueThreeRiver($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlunique3river($this->Open, $this->High, $this->Low, $this->Close), Trader::candleUniqueThreeRiver($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlupsidegap2crows() { - $this->assertEquals(trader_cdlupsidegap2crows($this->Open, $this->High, $this->Low, $this->Close), Trader::candleUpsideGapTwoCrows($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlupsidegap2crows($this->Open, $this->High, $this->Low, $this->Close), Trader::candleUpsideGapTwoCrows($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_cdlxsidegap3methods() { - $this->assertEquals(trader_cdlxsidegap3methods($this->Open, $this->High, $this->Low, $this->Close), Trader::candleUpsideDownsideGapThreeMethods($this->Open, $this->High, $this->Low, $this->Close)); + self::assertEquals(trader_cdlxsidegap3methods($this->Open, $this->High, $this->Low, $this->Close), Trader::candleUpsideDownsideGapThreeMethods($this->Open, $this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_ceil() { - $this->assertEquals(trader_ceil($this->Close), Trader::mathCeiling($this->Close)); + self::assertEquals(trader_ceil($this->Close), Trader::mathCeiling($this->Close)); } public function testFriendlyFunctions_cmo() { - $this->assertEquals(trader_cmo($this->Close, 14), Trader::chandeMomentumOscillator($this->Close, 14)); + self::assertEquals(trader_cmo($this->Close, 14), Trader::chandeMomentumOscillator($this->Close, 14)); } public function testFriendlyFunctions_correl() { - $this->assertEquals(trader_correl($this->Open, $this->Close, 30), Trader::pearsonCorrelationCoefficient($this->Open, $this->Close, 30)); + self::assertEquals(trader_correl($this->Open, $this->Close, 30), Trader::pearsonCorrelationCoefficient($this->Open, $this->Close, 30)); } public function testFriendlyFunctions_cos() { - $this->assertEquals(trader_cos($this->Close), Trader::mathCosine($this->Close)); + self::assertEquals(trader_cos($this->Close), Trader::mathCosine($this->Close)); } public function testFriendlyFunctions_cosh() { - $this->assertEquals(trader_cosh($this->Close), Trader::mathHyperbolicCosine($this->Close)); + self::assertEquals(trader_cosh($this->Close), Trader::mathHyperbolicCosine($this->Close)); } public function testFriendlyFunctions_dema() { - $this->assertEquals(trader_dema($this->Close, 30), Trader::doubleExponentialMovingAverage($this->Close, 30)); + self::assertEquals(trader_dema($this->Close, 30), Trader::doubleExponentialMovingAverage($this->Close, 30)); } public function testFriendlyFunctions_div() { - $this->assertEquals(trader_div($this->Open, $this->Close), Trader::mathDivision($this->Open, $this->Close)); + self::assertEquals(trader_div($this->Open, $this->Close), Trader::mathDivision($this->Open, $this->Close)); } public function testFriendlyFunctions_dx() { - $this->assertEquals(trader_dx($this->High, $this->Low, $this->Close, 14), Trader::directionalMovementIndex($this->High, $this->Low, $this->Close, 14)); + self::assertEquals(trader_dx($this->High, $this->Low, $this->Close, 14), Trader::directionalMovementIndex($this->High, $this->Low, $this->Close, 14)); } public function testFriendlyFunctions_ema() { - $this->assertEquals(trader_ema($this->Close, 30), Trader::exponentialMovingAverage($this->Close, 30)); + self::assertEquals(trader_ema($this->Close, 30), Trader::exponentialMovingAverage($this->Close, 30)); } public function testFriendlyFunctions_exp() { - $this->assertEquals(trader_exp($this->Close), Trader::mathExponent($this->Close)); + self::assertEquals(trader_exp($this->Close), Trader::mathExponent($this->Close)); } public function testFriendlyFunctions_floor() { - $this->assertEquals(trader_floor($this->Close), Trader::mathFloor($this->Close)); + self::assertEquals(trader_floor($this->Close), Trader::mathFloor($this->Close)); } public function testFriendlyFunctions_ht_dcperiod() { - $this->assertEquals(trader_ht_dcperiod($this->Close), Trader::hilbertTransformDominantCyclePeriod($this->Close)); + self::assertEquals(trader_ht_dcperiod($this->Close), Trader::hilbertTransformDominantCyclePeriod($this->Close)); } public function testFriendlyFunctions_ht_dcphase() { - $this->assertEquals(trader_ht_dcphase($this->Close), Trader::hilbertTransformDominantCyclePhase($this->Close)); + self::assertEquals(trader_ht_dcphase($this->Close), Trader::hilbertTransformDominantCyclePhase($this->Close)); } public function testFriendlyFunctions_ht_phasor() { - $this->assertEquals(trader_ht_phasor($this->Close), Trader::hilbertTransformPhasorComponents($this->Close)); + self::assertEquals(trader_ht_phasor($this->Close), Trader::hilbertTransformPhasorComponents($this->Close)); } public function testFriendlyFunctions_ht_sine() { - $this->assertEquals(trader_ht_sine($this->Close), Trader::hilbertTransformSineWave($this->Close)); + self::assertEquals(trader_ht_sine($this->Close), Trader::hilbertTransformSineWave($this->Close)); } public function testFriendlyFunctions_ht_trendline() { - $this->assertEquals(trader_ht_trendline($this->Close), Trader::hilbertTransformInstantaneousTrendLine($this->Close)); + self::assertEquals(trader_ht_trendline($this->Close), Trader::hilbertTransformInstantaneousTrendLine($this->Close)); } public function testFriendlyFunctions_ht_trendmode() { - $this->assertEquals(trader_ht_trendmode($this->Close), Trader::hilbertTransformTrendVsCycleMode($this->Close)); + self::assertEquals(trader_ht_trendmode($this->Close), Trader::hilbertTransformTrendVsCycleMode($this->Close)); } public function testFriendlyFunctions_kama() { - $this->assertEquals(trader_kama($this->Close, 30), Trader::kaufmanAdaptiveMovingAverage($this->Close, 30)); + self::assertEquals(trader_kama($this->Close, 30), Trader::kaufmanAdaptiveMovingAverage($this->Close, 30)); } public function testFriendlyFunctions_linearreg_angle() { - $this->assertEquals(trader_linearreg_angle($this->Close, 14), Trader::linearRegressionAngle($this->Close, 14)); + self::assertEquals(trader_linearreg_angle($this->Close, 14), Trader::linearRegressionAngle($this->Close, 14)); } public function testFriendlyFunctions_linearreg_intercept() { - $this->assertEquals(trader_linearreg_intercept($this->Close, 14), Trader::linearRegressionIntercept($this->Close, 14)); + self::assertEquals(trader_linearreg_intercept($this->Close, 14), Trader::linearRegressionIntercept($this->Close, 14)); } public function testFriendlyFunctions_linearreg_slope() { - $this->assertEquals(trader_linearreg_slope($this->Close, 14), Trader::linearRegressionSlope($this->Close, 14)); + self::assertEquals(trader_linearreg_slope($this->Close, 14), Trader::linearRegressionSlope($this->Close, 14)); } public function testFriendlyFunctions_linearreg() { - $this->assertEquals(trader_linearreg($this->Close, 14), Trader::linearRegression($this->Close, 14)); + self::assertEquals(trader_linearreg($this->Close, 14), Trader::linearRegression($this->Close, 14)); } public function testFriendlyFunctions_ln() { - $this->assertEquals(trader_ln($this->Close), Trader::mathLogarithmNatural($this->Close)); + self::assertEquals(trader_ln($this->Close), Trader::mathLogarithmNatural($this->Close)); } public function testFriendlyFunctions_log10() { - $this->assertEquals(trader_log10($this->Close), Trader::mathLogarithmBase10($this->Close)); + self::assertEquals(trader_log10($this->Close), Trader::mathLogarithmBase10($this->Close)); } public function testFriendlyFunctions_ma() { - $this->assertEquals(trader_ma($this->Close, 30, TRADER_MA_TYPE_SMA), Trader::movingAverage($this->Close, 30, TRADER_MA_TYPE_SMA)); + self::assertEquals(trader_ma($this->Close, 30, TRADER_MA_TYPE_SMA), Trader::movingAverage($this->Close, 30, TRADER_MA_TYPE_SMA)); } public function testFriendlyFunctions_macd() { - $this->assertEquals(trader_macd($this->Close, 12, 26, 9), Trader::movingAverageConvergenceDivergence($this->Close, 12, 26, 9)); + self::assertEquals(trader_macd($this->Close, 12, 26, 9), Trader::movingAverageConvergenceDivergence($this->Close, 12, 26, 9)); } public function testFriendlyFunctions_macdext() { - $this->assertEquals(trader_macdext($this->Close, 12, TRADER_MA_TYPE_SMA, 26, TRADER_MA_TYPE_SMA, 9), Trader::movingAverageConvergenceDivergenceExtended($this->Close, 12, TRADER_MA_TYPE_SMA, 26, TRADER_MA_TYPE_SMA, 9)); + self::assertEquals(trader_macdext($this->Close, 12, TRADER_MA_TYPE_SMA, 26, TRADER_MA_TYPE_SMA, 9), Trader::movingAverageConvergenceDivergenceExtended($this->Close, 12, TRADER_MA_TYPE_SMA, 26, TRADER_MA_TYPE_SMA, 9)); } public function testFriendlyFunctions_macdfix() { - $this->assertEquals(trader_macdfix($this->Close, 9), Trader::movingAverageConvergenceDivergenceFixed($this->Close, 9)); + self::assertEquals(trader_macdfix($this->Close, 9), Trader::movingAverageConvergenceDivergenceFixed($this->Close, 9)); } public function testFriendlyFunctions_mama() { - $this->assertEquals(trader_mama($this->Close, 0.5, 0.05), Trader::mesaAdaptiveMovingAverage($this->Close, 0.5, 0.05)); + self::assertEquals(trader_mama($this->Close, 0.5, 0.05), Trader::mesaAdaptiveMovingAverage($this->Close, 0.5, 0.05)); } public function testFriendlyFunctions_mavp() { - $this->assertEquals(trader_mavp($this->Close, $this->Open, 2, 30, TRADER_MA_TYPE_SMA), Trader::movingAverageVariablePeriod($this->Close, $this->Open, 2, 30, TRADER_MA_TYPE_SMA)); + self::assertEquals(trader_mavp($this->Close, $this->Open, 2, 30, TRADER_MA_TYPE_SMA), Trader::movingAverageVariablePeriod($this->Close, $this->Open, 2, 30, TRADER_MA_TYPE_SMA)); } public function testFriendlyFunctions_max() { - $this->assertEquals(trader_max($this->Close, 30), Trader::mathMax($this->Close, 30)); + self::assertEquals(trader_max($this->Close, 30), Trader::mathMax($this->Close, 30)); } public function testFriendlyFunctions_maxindex() { - $this->assertEquals(trader_maxindex($this->Close, 30), Trader::mathMaxIndex($this->Close, 30)); + self::assertEquals(trader_maxindex($this->Close, 30), Trader::mathMaxIndex($this->Close, 30)); } public function testFriendlyFunctions_medprice() { - $this->assertEquals(trader_medprice($this->High, $this->Low), Trader::mathMedianPrice($this->High, $this->Low)); + self::assertEquals(trader_medprice($this->High, $this->Low), Trader::mathMedianPrice($this->High, $this->Low)); } public function testFriendlyFunctions_mfi() { - $this->assertEquals(trader_mfi($this->High, $this->Low, $this->Close, $this->Volume, 14), Trader::moneyFlowIndex($this->High, $this->Low, $this->Close, $this->Volume, 14)); + self::assertEquals(trader_mfi($this->High, $this->Low, $this->Close, $this->Volume, 14), Trader::moneyFlowIndex($this->High, $this->Low, $this->Close, $this->Volume, 14)); } public function testFriendlyFunctions_midpoint() { - $this->assertEquals(trader_midpoint($this->Close, 14), Trader::middlePoint($this->Close, 14)); + self::assertEquals(trader_midpoint($this->Close, 14), Trader::middlePoint($this->Close, 14)); } public function testFriendlyFunctions_midprice() { - $this->assertEquals(trader_midprice($this->High, $this->Low, 14), Trader::middlePointPrice($this->High, $this->Low, 14)); + self::assertEquals(trader_midprice($this->High, $this->Low, 14), Trader::middlePointPrice($this->High, $this->Low, 14)); } public function testFriendlyFunctions_min() { - $this->assertEquals(trader_min($this->High, 30), Trader::mathMin($this->High, 30)); + self::assertEquals(trader_min($this->High, 30), Trader::mathMin($this->High, 30)); } public function testFriendlyFunctions_minindex() { - $this->assertEquals(trader_minindex($this->High, 30), Trader::mathMinIndex($this->High, 30)); + self::assertEquals(trader_minindex($this->High, 30), Trader::mathMinIndex($this->High, 30)); } public function testFriendlyFunctions_minmax() { - $this->assertEquals(trader_minmax($this->High, 30), Trader::mathMinMax($this->High, 30)); + self::assertEquals(trader_minmax($this->High, 30), Trader::mathMinMax($this->High, 30)); } public function testFriendlyFunctions_minmaxindex() { - $this->assertEquals(trader_minmaxindex($this->High, 30), Trader::mathMinMaxIndex($this->High, 30)); + self::assertEquals(trader_minmaxindex($this->High, 30), Trader::mathMinMaxIndex($this->High, 30)); } public function testFriendlyFunctions_minus_di() { - $this->assertEquals(trader_minus_di($this->High, $this->Low, $this->Close, 14), Trader::minusDirectionalIndicator($this->High, $this->Low, $this->Close, 14)); + self::assertEquals(trader_minus_di($this->High, $this->Low, $this->Close, 14), Trader::minusDirectionalIndicator($this->High, $this->Low, $this->Close, 14)); } public function testFriendlyFunctions_minus_dmi() { - $this->assertEquals(trader_minus_dm($this->High, $this->Low, 14), Trader::minusDirectionalMovement($this->High, $this->Low, 14)); + self::assertEquals(trader_minus_dm($this->High, $this->Low, 14), Trader::minusDirectionalMovement($this->High, $this->Low, 14)); } public function testFriendlyFunctions_mom() { - $this->assertEquals(trader_mom($this->High, 10), Trader::momentum($this->High, 10)); + self::assertEquals(trader_mom($this->High, 10), Trader::momentum($this->High, 10)); } public function testFriendlyFunctions_mult() { - $this->assertEquals(trader_mult($this->Open, $this->Close), Trader::mathMultiply($this->Open, $this->Close)); + self::assertEquals(trader_mult($this->Open, $this->Close), Trader::mathMultiply($this->Open, $this->Close)); } public function testFriendlyFunctions_natr() { - $this->assertEquals(trader_natr($this->High, $this->Low, $this->Close, 14), Trader::normalizedAverageTrueRange($this->High, $this->Low, $this->Close, 14)); + self::assertEquals(trader_natr($this->High, $this->Low, $this->Close, 14), Trader::normalizedAverageTrueRange($this->High, $this->Low, $this->Close, 14)); } public function testFriendlyFunctions_obv() { - $this->assertEquals(trader_obv($this->Close, $this->Volume), Trader::onBalanceVolume($this->Close, $this->Volume)); + self::assertEquals(trader_obv($this->Close, $this->Volume), Trader::onBalanceVolume($this->Close, $this->Volume)); } public function testFriendlyFunctions_plus_di() { - $this->assertEquals(trader_plus_di($this->High, $this->Low, $this->Close, 14), Trader::plusDirectionalIndicator($this->High, $this->Low, $this->Close, 14)); + self::assertEquals(trader_plus_di($this->High, $this->Low, $this->Close, 14), Trader::plusDirectionalIndicator($this->High, $this->Low, $this->Close, 14)); } public function testFriendlyFunctions_plus_dm() { - $this->assertEquals(trader_plus_dm($this->High, $this->Low, 14), Trader::plusDirectionalMovement($this->High, $this->Low, 14)); + self::assertEquals(trader_plus_dm($this->High, $this->Low, 14), Trader::plusDirectionalMovement($this->High, $this->Low, 14)); } public function testFriendlyFunctions_ppo() { - $this->assertEquals(trader_ppo($this->Close, 12, 26, TRADER_MA_TYPE_SMA), Trader::percentagePriceOscillator($this->Close, 12, 26, TRADER_MA_TYPE_SMA)); + self::assertEquals(trader_ppo($this->Close, 12, 26, TRADER_MA_TYPE_SMA), Trader::percentagePriceOscillator($this->Close, 12, 26, TRADER_MA_TYPE_SMA)); } public function testFriendlyFunctions_roc() { - $this->assertEquals(trader_roc($this->Close, 10), Trader::rateOfChange($this->Close, 10)); + self::assertEquals(trader_roc($this->Close, 10), Trader::rateOfChange($this->Close, 10)); } public function testFriendlyFunctions_rocp() { - $this->assertEquals(trader_rocp($this->Close, 10), Trader::rateOfChangePercentage($this->Close, 10)); + self::assertEquals(trader_rocp($this->Close, 10), Trader::rateOfChangePercentage($this->Close, 10)); } public function testFriendlyFunctions_rocr100() { - $this->assertEquals(trader_rocr100($this->Close, 10), Trader::rateOfChangeRatio100($this->Close, 10)); + self::assertEquals(trader_rocr100($this->Close, 10), Trader::rateOfChangeRatio100($this->Close, 10)); } public function testFriendlyFunctions_rocr() { - $this->assertEquals(trader_rocr($this->Close, 10), Trader::rateOfChangeRatio($this->Close, 10)); + self::assertEquals(trader_rocr($this->Close, 10), Trader::rateOfChangeRatio($this->Close, 10)); } public function testFriendlyFunctions_rsi() { - $this->assertEquals(trader_rsi($this->Close, 14), Trader::relativeStrengthIndex($this->Close, 14)); + self::assertEquals(trader_rsi($this->Close, 14), Trader::relativeStrengthIndex($this->Close, 14)); } public function testFriendlyFunctions_sar() { - $this->assertEquals(trader_sar($this->Close, $this->Low, 0.02, 0.2), Trader::parabolicSAR($this->Close, $this->Low, 0.02, 0.2)); + self::assertEquals(trader_sar($this->Close, $this->Low, 0.02, 0.2), Trader::parabolicSAR($this->Close, $this->Low, 0.02, 0.2)); } public function testFriendlyFunctions_sarext() { - $this->assertEquals(trader_sarext($this->Close, $this->Low, 0.0, 0.0, 0.02, 0.02, 0.2, 0.02, 0.02, 0.2), Trader::parabolicSARExtended($this->Close, $this->Low, 0.0, 0.0, 0.02, 0.02, 0.2, 0.02, 0.02, 0.2)); + self::assertEquals(trader_sarext($this->Close, $this->Low, 0.0, 0.0, 0.02, 0.02, 0.2, 0.02, 0.02, 0.2), Trader::parabolicSARExtended($this->Close, $this->Low, 0.0, 0.0, 0.02, 0.02, 0.2, 0.02, 0.02, 0.2)); } public function testFriendlyFunctions_sin() { - $this->assertEquals(trader_sin($this->Close), Trader::mathSine($this->Close)); + self::assertEquals(trader_sin($this->Close), Trader::mathSine($this->Close)); } public function testFriendlyFunctions_sinh() { - $this->assertEquals(trader_sinh($this->Close), Trader::mathHyperbolicSine($this->Close)); + self::assertEquals(trader_sinh($this->Close), Trader::mathHyperbolicSine($this->Close)); } public function testFriendlyFunctions_sma() { - $this->assertEquals(trader_sma($this->Close, 30), Trader::simpleMovingAverage($this->Close, 30)); + self::assertEquals(trader_sma($this->Close, 30), Trader::simpleMovingAverage($this->Close, 30)); } public function testFriendlyFunctions_sqrt() { - $this->assertEquals(trader_sqrt($this->Close), Trader::mathSquareRoot($this->Close)); + self::assertEquals(trader_sqrt($this->Close), Trader::mathSquareRoot($this->Close)); } public function testFriendlyFunctions_stddev() { - $this->assertEquals(trader_stddev($this->Close, 5, 1.0), Trader::standardDeviation($this->Close, 5, 1.0)); + self::assertEquals(trader_stddev($this->Close, 5, 1.0), Trader::standardDeviation($this->Close, 5, 1.0)); } public function testFriendlyFunctions_stoch() { - $this->assertEquals(trader_stoch($this->High, $this->Low, $this->Close, 5, 3, TRADER_MA_TYPE_SMA, 3, TRADER_MA_TYPE_SMA), Trader::stochastic($this->High, $this->Low, $this->Close, 5, 3, TRADER_MA_TYPE_SMA, 3, TRADER_MA_TYPE_SMA)); + self::assertEquals(trader_stoch($this->High, $this->Low, $this->Close, 5, 3, TRADER_MA_TYPE_SMA, 3, TRADER_MA_TYPE_SMA), Trader::stochastic($this->High, $this->Low, $this->Close, 5, 3, TRADER_MA_TYPE_SMA, 3, TRADER_MA_TYPE_SMA)); } public function testFriendlyFunctions_stochf() { - $this->assertEquals(trader_stochf($this->High, $this->Low, $this->Close, 5, 3, TRADER_MA_TYPE_SMA), Trader::stochasticFast($this->High, $this->Low, $this->Close, 5, 3, TRADER_MA_TYPE_SMA)); + self::assertEquals(trader_stochf($this->High, $this->Low, $this->Close, 5, 3, TRADER_MA_TYPE_SMA), Trader::stochasticFast($this->High, $this->Low, $this->Close, 5, 3, TRADER_MA_TYPE_SMA)); } public function testFriendlyFunctions_stochrsi() { - $this->assertEquals(trader_stochrsi($this->Close, 14, 5, 3, TRADER_MA_TYPE_SMA), Trader::stochasticRelativeStrengthIndex($this->Close, 14, 5, 3, TRADER_MA_TYPE_SMA)); + self::assertEquals(trader_stochrsi($this->Close, 14, 5, 3, TRADER_MA_TYPE_SMA), Trader::stochasticRelativeStrengthIndex($this->Close, 14, 5, 3, TRADER_MA_TYPE_SMA)); } public function testFriendlyFunctions_sub() { - $this->assertEquals(trader_sub($this->High, $this->Low), Trader::mathSubtraction($this->High, $this->Low)); + self::assertEquals(trader_sub($this->High, $this->Low), Trader::mathSubtraction($this->High, $this->Low)); } public function testFriendlyFunctions_sum() { - $this->assertEquals(trader_sum($this->High, 30), Trader::mathSummation($this->High, 30)); + self::assertEquals(trader_sum($this->High, 30), Trader::mathSummation($this->High, 30)); } public function testFriendlyFunctions_t3() { - $this->assertEquals(trader_t3($this->High, 5, 0.7), Trader::tripleExponentialMovingAverageT3($this->High, 5, 0.7)); + self::assertEquals(trader_t3($this->High, 5, 0.7), Trader::tripleExponentialMovingAverageT3($this->High, 5, 0.7)); } public function testFriendlyFunctions_tan() { - $this->assertEquals(trader_tan($this->Close), Trader::mathTangent($this->Close)); + self::assertEquals(trader_tan($this->Close), Trader::mathTangent($this->Close)); } public function testFriendlyFunctions_tanh() { - $this->assertEquals(trader_tanh($this->Close), Trader::mathHyperbolicTangent($this->Close)); + self::assertEquals(trader_tanh($this->Close), Trader::mathHyperbolicTangent($this->Close)); } public function testFriendlyFunctions_tema() { - $this->assertEquals(trader_tema($this->Close, 30), Trader::tripleExponentialMovingAverage($this->Close, 30)); + self::assertEquals(trader_tema($this->Close, 30), Trader::tripleExponentialMovingAverage($this->Close, 30)); } public function testFriendlyFunctions_trange() { - $this->assertEquals(trader_trange($this->High, $this->Low, $this->Close), Trader::trueRange($this->High, $this->Low, $this->Close)); + self::assertEquals(trader_trange($this->High, $this->Low, $this->Close), Trader::trueRange($this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_trima() { - $this->assertEquals(trader_trima($this->Close, 30), Trader::triangularMovingAverage($this->Close, 30)); + self::assertEquals(trader_trima($this->Close, 30), Trader::triangularMovingAverage($this->Close, 30)); } public function testFriendlyFunctions_trix() { - $this->assertEquals(trader_trix($this->Close, 30), Trader::tripleExponentialAverage($this->Close, 30)); + self::assertEquals(trader_trix($this->Close, 30), Trader::tripleExponentialAverage($this->Close, 30)); } public function testFriendlyFunctions_tsf() { - $this->assertEquals(trader_tsf($this->Close, 14), Trader::timeSeriesForecast($this->Close, 14)); + self::assertEquals(trader_tsf($this->Close, 14), Trader::timeSeriesForecast($this->Close, 14)); } public function testFriendlyFunctions_typprice() { - $this->assertEquals(trader_typprice($this->High, $this->Low, $this->Close), Trader::typicalPrice($this->High, $this->Low, $this->Close)); + self::assertEquals(trader_typprice($this->High, $this->Low, $this->Close), Trader::typicalPrice($this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_ultosc() { - $this->assertEquals(trader_ultosc($this->High, $this->Low, $this->Close, 7, 14, 28), Trader::ultimateOscillator($this->High, $this->Low, $this->Close, 7, 14, 28)); + self::assertEquals(trader_ultosc($this->High, $this->Low, $this->Close, 7, 14, 28), Trader::ultimateOscillator($this->High, $this->Low, $this->Close, 7, 14, 28)); } public function testFriendlyFunctions_var() { - $this->assertEquals(trader_var($this->Close, 5, 1.0), Trader::variance($this->Close, 5, 1.0)); + self::assertEquals(trader_var($this->Close, 5, 1.0), Trader::variance($this->Close, 5, 1.0)); } public function testFriendlyFunctions_wclprice() { - $this->assertEquals(trader_wclprice($this->High, $this->Low, $this->Close), Trader::weightedClosePrice($this->High, $this->Low, $this->Close)); + self::assertEquals(trader_wclprice($this->High, $this->Low, $this->Close), Trader::weightedClosePrice($this->High, $this->Low, $this->Close)); } public function testFriendlyFunctions_willr() { - $this->assertEquals(trader_willr($this->High, $this->Low, $this->Close, 14), Trader::williamsR($this->High, $this->Low, $this->Close, 14)); + self::assertEquals(trader_willr($this->High, $this->Low, $this->Close, 14), Trader::williamsR($this->High, $this->Low, $this->Close, 14)); } public function testFriendlyFunctions_wma() { - $this->assertEquals(trader_wma($this->Close, 30), Trader::weightedMovingAverage($this->Close, 30)); + self::assertEquals(trader_wma($this->Close, 30), Trader::weightedMovingAverage($this->Close, 30)); } // From c873b95d4bf8059aa51e979718c6f483f042501b Mon Sep 17 00:00:00 2001 From: Joshua Date: Sat, 10 Apr 2021 17:27:47 -0700 Subject: [PATCH 29/31] Version 1.0.5 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0e3a264..ad95cb9 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "lupecode/php-trader-interface", "description": "An interface to the PHP Trader extension.", - "version": "1.0.4", + "version": "1.0.5", "type": "library", "license": "GPL-3.0-or-later", "authors": [ From 25bf9219ce0d598a0e9dd395fe2e123542530187 Mon Sep 17 00:00:00 2001 From: DeepSource Bot Date: Thu, 24 Jun 2021 23:27:30 +0000 Subject: [PATCH 30/31] Add .deepsource.toml --- .deepsource.toml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .deepsource.toml diff --git a/.deepsource.toml b/.deepsource.toml new file mode 100644 index 0000000..bd4a967 --- /dev/null +++ b/.deepsource.toml @@ -0,0 +1,5 @@ +version = 1 + +[[analyzers]] +name = "php" +enabled = true \ No newline at end of file From d46560724abfe8ef678883f553e09904888a925a Mon Sep 17 00:00:00 2001 From: DeepSource Bot Date: Thu, 24 Jun 2021 23:31:36 +0000 Subject: [PATCH 31/31] Update .deepsource.toml --- .deepsource.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.deepsource.toml b/.deepsource.toml index bd4a967..8f389ad 100644 --- a/.deepsource.toml +++ b/.deepsource.toml @@ -1,5 +1,7 @@ version = 1 +test_patterns = ["Tests/*Test.php"] + [[analyzers]] name = "php" enabled = true \ No newline at end of file