Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.

Commit c6ac2fb

Browse files
committed
Initial commit
1 parent 681efa8 commit c6ac2fb

Some content is hidden

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

44 files changed

+5805
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.idea
2+
vendor
3+
tests.xml
4+
coverage.xml
5+
.scannerwork

.travis.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
language: php
2+
git:
3+
depth: false # "Shallow clone detected during the analysis"
4+
matrix:
5+
fast_finish: true
6+
include:
7+
# X.Y versions are aliases for recent X.Y.Z releases pre-installed on the build images
8+
- php: '5.6.0'
9+
- php: '5.6'
10+
- php: '7.0'
11+
- php: '7.1'
12+
- php: '7.2'
13+
- php: '7.3'
14+
env:
15+
# Do not run analysis on PR (secure env variables like SONAR_TOKEN are not always available)
16+
- WITH_SONAR_ANALYSIS=$([ "$TRAVIS_PULL_REQUEST" = "false" ] && echo true || echo false)
17+
- SONAR_SCANNER_VERSION=3.3.0.1492
18+
before_install:
19+
- "composer --no-plugins --no-scripts install"
20+
- "composer --no-plugins --no-scripts dump-autoload -o"
21+
install:
22+
- |
23+
test "$WITH_SONAR_ANALYSIS" = "true" \
24+
&& wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION.zip \
25+
&& unzip sonar-scanner-cli-$SONAR_SCANNER_VERSION.zip || echo 'Skipping Sonar Scanner installation'
26+
script:
27+
- "vendor/bin/phpunit --configuration ./phpunit.xml --teamcity"
28+
after_success:
29+
- |
30+
test "$WITH_SONAR_ANALYSIS" = "true" && sonar-scanner-$SONAR_SCANNER_VERSION/bin/sonar-scanner \
31+
-Dsonar.projectName=$SONAR_PROJECT_NAME \
32+
-Dsonar.projectKey=$SONAR_PROJECT_KEY \
33+
-Dsonar.organization=$SONAR_ORGANIZATION_KEY \
34+
-Dsonar.sources=./src \
35+
-Dsonar.tests=./tests \
36+
-Dsonar.exclusions=**/vendor/**,**/tests/**,**/*.xml,**/JsonPath.php \
37+
-Dsonar.php.tests.reportPath=tests.xml \
38+
-Dsonar.php.coverage.reportPaths=coverage.xml \
39+
-Dsonar.host.url=$SONAR_URL \
40+
-Dsonar.login=$SONAR_TOKEN || echo 'Skipping Sonar Scanner execution'

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Mastercard
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)