forked from verze-app/solana-php-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 32d530a
Showing
13 changed files
with
321 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
; This file is for unifying the coding style for different editors and IDEs. | ||
; More information at https://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_size = 4 | ||
indent_style = space | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.yml] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/.editorconfig export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/tests export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
composer.lock | ||
vendor | ||
.php_cs.cache | ||
.phpunit.result.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="Tighten"> | ||
<!-- | ||
The name attribute of the ruleset tag is displayed | ||
when running PHP_CodeSniffer with the -v command line | ||
argument. The description tag below is not displayed anywhere | ||
except in this file, so it can contain information for | ||
developers who may change this file in the future. | ||
--> | ||
<description>Tighten's Laravel Coding Standards</description> | ||
|
||
<!-- | ||
If no files or directories are specified on the command line | ||
your custom standard can specify what files should be checked | ||
instead. | ||
Note that specifying any file or directory path | ||
on the command line will ignore all file tags. | ||
--> | ||
<file>config</file> | ||
<file>src</file> | ||
<file>tests</file> | ||
|
||
<!-- | ||
You can hard-code ignore patterns directly into your | ||
custom standard so you don't have to specify the | ||
patterns on the command line. | ||
--> | ||
<exclude-pattern>*/cache/*</exclude-pattern> | ||
<exclude-pattern>*/*.js</exclude-pattern> | ||
<exclude-pattern>*/*.css</exclude-pattern> | ||
<exclude-pattern>*/*.xml</exclude-pattern> | ||
<exclude-pattern>*/*.blade.php</exclude-pattern> | ||
<exclude-pattern>*/autoload.php</exclude-pattern> | ||
<exclude-pattern>*/vendor/*</exclude-pattern> | ||
|
||
<!-- | ||
You can hard-code command line values into your custom standard. | ||
Note that this does not work for the command line values: | ||
-v[v][v], -l, -d, -sniffs and -standard | ||
--> | ||
<arg name="colors"/> | ||
<arg value="p"/> | ||
|
||
<!-- | ||
You can hard-code custom php.ini settings into your custom standard. | ||
The following tag sets the memory limit to 64M. | ||
--> | ||
<ini name="memory_limit" value="128M"/> | ||
|
||
<!-- | ||
Include all sniffs in the PSR12 standard. Note that the | ||
path to the standard does not have to be specified as the | ||
PSR12 standard exists inside the PHP_CodeSniffer install | ||
directory. | ||
--> | ||
<rule ref="PSR12"/> | ||
|
||
<!-- Disable missing namespace rule for tests and database files --> | ||
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace"> | ||
<exclude-pattern>*/tests/*</exclude-pattern> | ||
</rule> | ||
<!-- Disable camel caps rule for tests --> | ||
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps"> | ||
<exclude-pattern>*/tests/*</exclude-pattern> | ||
</rule> | ||
<!-- Make the soft line length warning silent --> | ||
<rule ref="Generic.Files.LineLength.TooLong"> | ||
<severity>0</severity> | ||
</rule> | ||
|
||
<!-- Enable some extra rules --> | ||
<!-- Force [] short array syntax --> | ||
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found"/> | ||
<!-- Enforce 1 space around concatenation operators --> | ||
<rule ref="Squiz.Strings.ConcatenationSpacing"> | ||
<properties> | ||
<property name="spacing" value="1" /> | ||
</properties> | ||
</rule> | ||
<!-- Warn when double quotes are used over single quotes --> | ||
<rule ref="Squiz.Strings.DoubleQuoteUsage"/> | ||
<!-- Except when the double quotes contain a variable --> | ||
<rule ref="Squiz.Strings.DoubleQuoteUsage.ContainsVar"> | ||
<severity>0</severity> | ||
</rule> | ||
|
||
<!-- Class name should match the file name --> | ||
<rule ref="Squiz.Classes.ClassFileName"/> | ||
|
||
<!-- Expect one space after NOT (!) operator --> | ||
<rule ref="Generic.Formatting.SpaceAfterNot"/> | ||
</ruleset> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Contributing | ||
|
||
Contributions are **welcome** and will be fully **credited**. | ||
|
||
Please read and understand the contribution guide before creating an issue or pull request. | ||
|
||
## Etiquette | ||
|
||
Be kind. | ||
|
||
## Viability | ||
|
||
When requesting or submitting new features, first consider whether it might be useful to others. Open source projects are used by many developers, who may have entirely different needs to your own. Think about whether or not your feature is likely to be used by other users of the project. | ||
|
||
## Procedure | ||
|
||
Before filing an issue: | ||
|
||
- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident. | ||
- Check to make sure your feature suggestion isn't already present within the project. | ||
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress. | ||
- Check the pull requests tab to ensure that the feature isn't already in progress. | ||
|
||
Before submitting a pull request: | ||
|
||
- Check the codebase to ensure that your feature doesn't already exist. | ||
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix. | ||
|
||
## Requirements | ||
|
||
If the project maintainer has any additional requirements, you will find them listed here. | ||
|
||
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer). | ||
|
||
- **Tlint styles** - Tighten-specific styles. Tlint is built for apps, so there are some settings that might not make sense in a package, but [download Tlint](https://github.com/tighten/tlint) and run it on your pull requests to see if it suggests any reasonable changes. | ||
|
||
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) Tighten Co. <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Solana PHP SDK | ||
|
||
[](https://packagist.org/packages/tightenco/solana-php-sdk) | ||
[](https://github.com/tighten/solana-php-sdk/actions?query=workflow%3Arun-tests+branch%3Amaster) | ||
|
||
|
||
Short description here, and maybe small justification of why it's valuable. | ||
|
||
## Installation | ||
|
||
You can install the package via composer: | ||
|
||
```bash | ||
composer require tightenco/solana-php-sdk | ||
``` | ||
|
||
## Usage | ||
|
||
``` | ||
// Usage code and examples here | ||
``` | ||
|
||
## Testing | ||
|
||
```bash | ||
composer test | ||
``` | ||
|
||
## Contributing | ||
|
||
Please see [CONTRIBUTING](CONTRIBUTING.md) for details. | ||
|
||
## Security | ||
|
||
If you discover any security related issues, please email [email protected] instead of using the issue tracker. | ||
|
||
## Credits | ||
|
||
- [Matt Stauffer](https://github.com/mattstauffer) | ||
- [All Contributors](../../contributors) | ||
|
||
## License | ||
|
||
The MIT License (MIT). Please see [License File](LICENSE.md) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "tightenco/solana-php-sdk", | ||
"description": "Solana PHP SDK", | ||
"keywords": [ | ||
"tightenco", | ||
"solana-php-sdk", | ||
"blockchain", | ||
"solana", | ||
"sol", | ||
"sdk", | ||
"php" | ||
], | ||
"homepage": "https://github.com/tighten/solana-php-sdk", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Matt Stauffer", | ||
"email": "[email protected]", | ||
"homepage": "https://tighten.co", | ||
"role": "Developer" | ||
} | ||
], | ||
"require": { | ||
"php": "^7.4 || ~8.0" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^9.0", | ||
"squizlabs/php_codesniffer": "^3.5", | ||
"tightenco/tlint": "^5.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Tighten\\SolanaPhpSdk\\": "src" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Tighten\\SolanaPhpSdk\\Tests\\": "tests" | ||
} | ||
}, | ||
"scripts": { | ||
"test": "vendor/bin/phpunit" | ||
}, | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
bootstrap="vendor/autoload.php" | ||
backupGlobals="false" | ||
backupStaticAttributes="false" | ||
colors="true" | ||
verbose="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
<coverage> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
</include> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="Tighten Test Suite"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace Tighten\SolanaPhpSdk; | ||
|
||
class Solana | ||
{ | ||
public function __construct() | ||
{ | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace Tighten\SolanaPhpSdk\Tests; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
class ExampleTest extends TestCase | ||
{ | ||
/** @test */ | ||
public function it_exists() | ||
{ | ||
$this->assertTrue(true); | ||
} | ||
} |