Skip to content

Commit f72e931

Browse files
committed
Initial commit
1 parent 90b6bca commit f72e931

22 files changed

Lines changed: 4248 additions & 6 deletions

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: PHP Code Quality Check
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
php:
10+
name: PHP 8.0, 8.1, and 8.2
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
php-version: [8.0, 8.1, 8.2]
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
21+
- name: Set up PHP
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: ${{ matrix.php-version }}
25+
extensions: curl
26+
27+
- name: Install dependencies
28+
run: composer install
29+
30+
- name: Run PHPStan
31+
run: vendor/bin/phpstan analyse
32+
33+
- name: Run PHP CS Fixer
34+
run: vendor/bin/php-cs-fixer fix --dry-run --stop-on-violation
35+
36+
- name: Run PHPUnit tests
37+
run: vendor/bin/phpunit

.gitignore

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
composer.phar
2-
/vendor/
3-
4-
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
5-
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
6-
# composer.lock
1+
vendor/
2+
.phpunit.result.cache
3+
.php-cs-fixer.cache
4+
.idea

.php-cs-fixer.dist.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()->in(['src', 'examples', 'tests']);
4+
5+
$config = new PhpCsFixer\Config();
6+
7+
return $config->setRules(['@Symfony' => true])->setFinder($finder);

composer.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "messagecloud/send-php",
3+
"description": "The MessageCloud Send API client for PHP",
4+
"type": "library",
5+
"require-dev": {
6+
"phpunit/phpunit": "^10.3",
7+
"friendsofphp/php-cs-fixer": "^3.23",
8+
"phpstan/phpstan": "^1.10"
9+
},
10+
"license": "BSD-2-Clause",
11+
"autoload": {
12+
"psr-4": {
13+
"MessageCloud\\Send\\": "src/"
14+
}
15+
},
16+
"require": {
17+
"php": "^8.0",
18+
"ext-curl": "*"
19+
}
20+
}

0 commit comments

Comments
 (0)