Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstauffer committed Sep 11, 2021
0 parents commit 32d530a
Show file tree
Hide file tree
Showing 13 changed files with 321 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
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
5 changes: 5 additions & 0 deletions .gitattributes
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
composer.lock
vendor
.php_cs.cache
.phpunit.result.cache
94 changes: 94 additions & 0 deletions .phpcs.xml.dist
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>

37 changes: 37 additions & 0 deletions CONTRIBUTING.md
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.
21 changes: 21 additions & 0 deletions LICENSE.md
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.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Solana PHP SDK

[![Latest Version on Packagist](https://img.shields.io/packagist/v/tightenco/solana-php-sdk.svg?style=flat-square)](https://packagist.org/packages/tightenco/solana-php-sdk)
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/tighten/solana-php-sdk/run-tests?label=tests)](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.
49 changes: 49 additions & 0 deletions composer.json
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 added config/.gitkeep
Empty file.
25 changes: 25 additions & 0 deletions phpunit.xml.dist
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>

10 changes: 10 additions & 0 deletions src/Solana.php
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 added tests/.gitkeep
Empty file.
14 changes: 14 additions & 0 deletions tests/ExampleTest.php
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);
}
}

0 comments on commit 32d530a

Please sign in to comment.