Skip to content

Commit e4d85a0

Browse files
authored
Add CI, basic unit tests and PSR-12 (#3)
* Add CI and enforce PSR-12 code style * Add basic unit tests
1 parent c262f02 commit e4d85a0

File tree

10 files changed

+280
-198
lines changed

10 files changed

+280
-198
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ composer.phar
33

44
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
55
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
6-
# composer.lock
6+
composer.lock

.phpcs.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="Webflow PHP SDK">
3+
<arg name="extensions" value="php"/>
4+
<file>.</file>
5+
<exclude-pattern>*/vendor/*</exclude-pattern>
6+
<rule ref="PSR12">
7+
</rule>
8+
</ruleset>

.travis.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
sudo: false
2+
language: php
3+
dist: trusty
4+
5+
cache:
6+
directories:
7+
- $HOME/.composer/cache/files
8+
9+
matrix:
10+
include:
11+
- php: 7.0
12+
- php: 7.1
13+
- php: 7.2
14+
- php: 7.3
15+
- php: nightly
16+
17+
allow_failures:
18+
- php: nightly
19+
20+
install:
21+
- composer install
22+
23+
script:
24+
- ./vendor/bin/phpcs -v
25+
- ./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# PHP SDK for the Webflow CMS API
2+
3+
[![Build Status](https://travis-ci.com/wivern-co-uk/webflow-php-sdk.svg?branch=master)](https://travis-ci.com/wivern-co-uk/webflow-php-sdk)
4+
25
Implementation based on [Webflow CMS API Reference](https://developers.webflow.com/#cms-api-reference)
36

47
## Features implemented
@@ -73,4 +76,3 @@ $webflow->removeItem($collectionId, $itemId);
7376
composer require expertlead/webflow-php-sdk
7477
```
7578
No extra dependencies! You are welcome ;)
76-

composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
"require": {
66
"ext-curl": "*"
77
},
8+
"require-dev": {
9+
"squizlabs/php_codesniffer": "^3.4",
10+
"phpunit/phpunit": "^5"
11+
},
812
"license": "MIT",
913
"authors": [
1014
{

composer.lock

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)