Skip to content

Commit 5034ef8

Browse files
authored
Merge pull request #8 from ArkEcosystem/develop
Initial Implementation
2 parents 0b09b89 + a583926 commit 5034ef8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+3645
-5
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ charset = utf-8
55
end_of_line = lf
66
insert_final_newline = true
77
indent_style = space
8-
indent_size = 2
8+
indent_size = 4
99
trim_trailing_whitespace = true

.github/CODE_OF_CONDUCT.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
education, socio-economic status, nationality, personal appearance, race,
10+
religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][https://www.contributor-covenant.org], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

.github/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Please see [CONTRIBUTING](https://docs.ark.io/docs/contributing) for details before opening your pull request.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## Proposed changes
2+
3+
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
4+
5+
## Types of changes
6+
7+
What types of changes does your code introduce?
8+
_Put an `x` in the boxes that apply_
9+
10+
- [ ] Bugfix (non-breaking change which fixes an issue)
11+
- [ ] New feature (non-breaking change which adds functionality)
12+
- [ ] Refactoring (improve a current implementation without adding a new feature or fixing a bug)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] Build (changes that affect the build system)
15+
- [ ] Docs (documentation only changes)
16+
- [ ] Test (adding missing tests or fixing existing tests)
17+
- [ ] Other... Please describe:
18+
19+
## Checklist
20+
21+
_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
22+
23+
- [ ] I have read the [CONTRIBUTING](https://docs.ark.io/docs/contributing) documentation
24+
- [ ] Lint and unit tests pass locally with my changes
25+
- [ ] I have added tests that prove my fix is effective or that my feature works
26+
- [ ] I have added necessary documentation (if appropriate)
27+
28+
## Further comments
29+
30+
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
composer.lock
2+
phpunit.xml
3+
vendor

.php_cs

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
<?php
2+
3+
return PhpCsFixer\Config::create()
4+
->setRiskyAllowed(true)
5+
->setRules([
6+
'@PHP56Migration' => true,
7+
'@Symfony' => true,
8+
'@Symfony:risky' => true,
9+
'array_syntax' => ['syntax' => 'short'],
10+
'binary_operator_spaces' => [
11+
'align_double_arrow' => true,
12+
'align_equals' => true,
13+
],
14+
'blank_line_after_namespace' => true,
15+
'blank_line_after_opening_tag' => true,
16+
'blank_line_before_return' => true,
17+
'braces' => true,
18+
'cast_spaces' => true,
19+
'class_definition' => true,
20+
'combine_consecutive_unsets' => true,
21+
'declare_equal_normalize' => true,
22+
'elseif' => true,
23+
'encoding' => true,
24+
'full_opening_tag' => true,
25+
'function_declaration' => true,
26+
'function_typehint_space' => true,
27+
'general_phpdoc_annotation_remove' => ['expectedException', 'expectedExceptionMessage', 'expectedExceptionMessageRegExp'],
28+
'hash_to_slash_comment' => true,
29+
'heredoc_to_nowdoc' => true,
30+
'include' => true,
31+
'list_syntax' => ['syntax' => 'long'],
32+
'lowercase_cast' => true,
33+
'lowercase_constants' => true,
34+
'lowercase_keywords' => true,
35+
'method_argument_space' => true,
36+
'method_separation' => true,
37+
'native_function_casing' => true,
38+
'new_with_braces' => true,
39+
'no_alias_functions' => true,
40+
'no_blank_lines_after_class_opening' => true,
41+
'no_blank_lines_after_phpdoc' => true,
42+
'no_closing_tag' => true,
43+
'no_empty_phpdoc' => true,
44+
'no_empty_statement' => true,
45+
'no_extra_consecutive_blank_lines' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'],
46+
'no_extra_consecutive_blank_lines' => true,
47+
'no_leading_import_slash' => true,
48+
'no_leading_namespace_whitespace' => true,
49+
'no_multiline_whitespace_around_double_arrow' => true,
50+
'no_multiline_whitespace_before_semicolons' => true,
51+
'no_short_bool_cast' => true,
52+
'no_short_echo_tag' => true,
53+
'no_singleline_whitespace_before_semicolons' => true,
54+
'no_spaces_after_function_name' => true,
55+
'no_spaces_inside_parenthesis' => true,
56+
'no_trailing_comma_in_list_call' => true,
57+
'no_trailing_comma_in_singleline_array' => true,
58+
'no_trailing_whitespace' => true,
59+
'no_trailing_whitespace_in_comment' => true,
60+
'no_unneeded_control_parentheses' => true,
61+
'no_unreachable_default_argument_value' => true,
62+
'no_unused_imports' => true,
63+
'no_useless_else' => true,
64+
'no_useless_return' => true,
65+
'no_whitespace_before_comma_in_array' => true,
66+
'no_whitespace_in_blank_line' => true,
67+
'normalize_index_brace' => true,
68+
'object_operator_without_whitespace' => true,
69+
'ordered_class_elements' => true,
70+
'ordered_imports' => true,
71+
'php_unit_strict' => true,
72+
'php_unit_test_class_requires_covers' => true,
73+
'phpdoc_add_missing_param_annotation' => true,
74+
'phpdoc_align' => true,
75+
'phpdoc_indent' => true,
76+
'phpdoc_inline_tag' => true,
77+
'phpdoc_no_access' => true,
78+
'phpdoc_no_package' => true,
79+
'phpdoc_order' => true,
80+
'phpdoc_scalar' => true,
81+
'phpdoc_separation' => true,
82+
'phpdoc_single_line_var_spacing' => true,
83+
'phpdoc_summary' => true,
84+
'phpdoc_to_comment' => true,
85+
'phpdoc_trim' => true,
86+
'phpdoc_types' => true,
87+
'phpdoc_var_without_name' => true,
88+
'psr4' => true,
89+
'self_accessor' => true,
90+
'semicolon_after_instruction' => true,
91+
'short_scalar_cast' => true,
92+
'simplified_null_return' => true,
93+
'single_blank_line_at_eof' => true,
94+
'single_blank_line_before_namespace' => true,
95+
'single_class_element_per_statement' => true,
96+
'single_import_per_statement' => true,
97+
'single_line_after_imports' => true,
98+
'single_quote' => true,
99+
'space_after_semicolon' => true,
100+
'standardize_not_equals' => true,
101+
'strict_comparison' => true,
102+
'strict_param' => true,
103+
'switch_case_semicolon_to_colon' => true,
104+
'switch_case_space' => true,
105+
'ternary_operator_spaces' => true,
106+
'trailing_comma_in_multiline_array' => true,
107+
'trim_array_spaces' => true,
108+
'unary_operator_spaces' => true,
109+
'whitespace_after_comma_in_array' => true,
110+
]);

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
language: php
2+
sudo: false
3+
4+
php:
5+
- 7.2
6+
7+
install:
8+
- travis_retry composer install --no-interaction
9+
10+
script:
11+
- vendor/bin/phpunit --coverage-clover clover.xml
12+
13+
after_script:
14+
- bash <(curl -s https://codecov.io/bash)

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

88
## Unreleased
9+
10+
## 0.1.0 - 2018-06-28
11+
- Initial Release

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
11
# ARK PHP - Client
22

33
<p align="center">
4-
<img src="https://github.com/ArkEcosystem/ARK-PHP-Client/blob/master/banner.png" />
4+
<img src="https://github.com/ArkEcosystem/php-client/blob/master/banner.png" />
55
</p>
66

77
> A simple PHP API client for the ARK Blockchain.
88
9-
[![Build Status](https://img.shields.io/travis/ArkEcosystem/ARK-PHP-Client/master.svg?style=flat-square)](https://travis-ci.org/ArkEcosystem/ARK-PHP-Client)
10-
[![Latest Version](https://img.shields.io/github/release/ArkEcosystem/ARK-PHP-Client.svg?style=flat-square)](https://github.com/ArkEcosystem/ARK-PHP-Client/releases)
9+
[![Build Status](https://travis-ci.org/ArkEcosystem/php-client.svg?branch=develop)](https://travis-ci.org/ArkEcosystem/php-client)
10+
[![Latest Version](https://img.shields.io/github/release/ArkEcosystem/php-client.svg?style=flat-square)](https://github.com/ArkEcosystem/php-client/releases)
1111
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
1212

1313
## Installation
1414

15+
Require this package, with [Composer](https://getcomposer.org/), in the root directory of your project.
16+
1517
```bash
16-
...
18+
$ composer require arkecosystem/client
19+
```
20+
21+
## Testing
22+
23+
``` bash
24+
$ phpunit
1725
```
1826

1927
## Security

composer.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"name": "arkecosystem/client",
3+
"description": "A simple PHP API client for the ARK Blockchain.",
4+
"keywords": ["api", "ark", "blockchain", "crypto", "currency"],
5+
"license": "MIT",
6+
"authors": [{
7+
"name": "Brian Faust",
8+
"email": "[email protected]",
9+
"homepage": "https://github.com/faustbrian"
10+
}],
11+
"require": {
12+
"php": "^7.1",
13+
"illuminate/support": "^5.6",
14+
"php-http/cache-plugin": "^1.5",
15+
"php-http/client-common": "^1.7",
16+
"php-http/discovery": "^1.4",
17+
"php-http/httplug": "^1.1",
18+
"psr/cache": "^1.0",
19+
"psr/http-message": "^1.0"
20+
},
21+
"require-dev": {
22+
"cache/array-adapter": "^1.0",
23+
"guzzlehttp/psr7": "^1.4",
24+
"mockery/mockery": "^1.0",
25+
"php-http/guzzle6-adapter": "^1.1",
26+
"php-http/mock-client": "^1.1",
27+
"phpunit/phpunit": "^7.0",
28+
"symfony/var-dumper": "^4.1"
29+
},
30+
"autoload": {
31+
"psr-4": {
32+
"ArkEcosystem\\Client\\": "src"
33+
}
34+
},
35+
"autoload-dev": {
36+
"psr-4": {
37+
"ArkEcosystem\\Tests\\Client\\": "tests"
38+
}
39+
},
40+
"config": {
41+
"preferred-install": "dist",
42+
"sort-packages": true
43+
},
44+
"extra": {
45+
"branch-alias": {
46+
"dev-master": "1.0-dev"
47+
}
48+
}
49+
}

phpunit.xml.dist

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit backupGlobals="false"
3+
backupStaticAttributes="false"
4+
beStrictAboutTestsThatDoNotTestAnything="true"
5+
beStrictAboutOutputDuringTests="true"
6+
bootstrap="vendor/autoload.php"
7+
colors="true"
8+
convertErrorsToExceptions="true"
9+
convertNoticesToExceptions="true"
10+
convertWarningsToExceptions="true"
11+
failOnRisky="true"
12+
failOnWarning="true"
13+
processIsolation="false"
14+
stopOnError="true"
15+
stopOnFailure="true"
16+
verbose="true"
17+
>
18+
<testsuites>
19+
<testsuite name="ARK PHP Test Suite">
20+
<directory suffix="Test.php">./tests</directory>
21+
</testsuite>
22+
</testsuites>
23+
<filter>
24+
<whitelist processUncoveredFilesFromWhitelist="true">
25+
<directory suffix=".php">src/</directory>
26+
</whitelist>
27+
</filter>
28+
<php>
29+
<env name="ARK_TESTING_SECRET" value=""/>
30+
<env name="ARK_TESTING_SECOND_SECRET" value="" />
31+
</php>
32+
</phpunit>

0 commit comments

Comments
 (0)