Skip to content

Commit 54f848a

Browse files
committed
Initial commit
0 parents  commit 54f848a

27 files changed

+1595
-0
lines changed

.circleci/config.yml

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
version: 2.1
2+
3+
jobs:
4+
build:
5+
working_directory: ~/testmonitor/slack-client
6+
7+
docker:
8+
- image: cimg/php:8.0-node
9+
10+
steps:
11+
- run:
12+
name: Update Composer
13+
command: sudo composer self-update
14+
- checkout
15+
- run:
16+
name: Install Composer Dependencies
17+
command: composer install -n --ignore-platform-reqs
18+
- persist_to_workspace:
19+
root: .
20+
paths:
21+
- .
22+
23+
code_analysis:
24+
working_directory: ~/testmonitor/slack-client
25+
26+
docker:
27+
- image: cimg/php:8.0-node
28+
29+
steps:
30+
- attach_workspace:
31+
at: .
32+
- run:
33+
name: PHP CS Fixer
34+
command: |
35+
mkdir -p ./logs/phpcsfixer
36+
vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --diff --dry-run --format=junit > logs/phpcsfixer/junit.xml
37+
- run:
38+
name: PHPCS
39+
command: |
40+
mkdir -p ./logs/phpcs
41+
vendor/bin/phpcs --standard="PSR1,PSR2" -v --report=junit --report-file=logs/phpcs/junit.xml src/
42+
43+
- store_artifacts:
44+
path: ./logs/phpcsfixer
45+
destination: phpcsfixer
46+
- store_artifacts:
47+
path: ./logs/phpcs
48+
destination: phpcs
49+
- store_test_results:
50+
path: ./logs
51+
52+
unit_test:
53+
working_directory: ~/testmonitor/slack-client
54+
55+
docker:
56+
- image: cimg/php:8.0-node
57+
58+
steps:
59+
- attach_workspace:
60+
at: .
61+
- run:
62+
name: Run Unit Tests
63+
command: |
64+
mkdir -p ./logs/phpunit
65+
vendor/bin/phpunit -d memory_limit=1G --printer "\PHPUnit\TextUI\DefaultResultPrinter" --log-junit logs/phpunit/junit.xml --testdox-html logs/phpunit/testdox.html
66+
67+
- store_artifacts:
68+
path: ./logs/phpunit
69+
destination: phpunit
70+
- store_test_results:
71+
path: ./logs
72+
73+
workflows:
74+
version: 2
75+
build_analyze_test:
76+
jobs:
77+
- build
78+
- code_analysis:
79+
requires:
80+
- build
81+
- unit_test:
82+
requires:
83+
- code_analysis

.editorconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
indent_size = 4
9+
indent_style = space
10+
end_of_line = lf
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.md]
15+
trim_trailing_whitespace = false

.gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/vendor
2+
composer.lock
3+
.DS_Store
4+
Thumbs.db
5+
6+
.php_cs.cache
7+
.php-cs-fixer.cache
8+
9+
phpunit.xml
10+
.phpunit.result.cache
11+
/build
12+
13+
/.idea

.php-cs-fixer.php

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
$finder = (new PhpCsFixer\Finder())
4+
->exclude('vendor')
5+
->in(__DIR__);
6+
7+
return (new PhpCsFixer\Config())
8+
->setRiskyAllowed(true)
9+
->setUsingCache(true)
10+
->setRules([
11+
'@PSR2' => true,
12+
'array_syntax' => ['syntax' => 'short'],
13+
'blank_line_before_statement' => true,
14+
'cast_spaces' => true,
15+
'concat_space' => ['spacing' => 'one'],
16+
'no_empty_statement' => true,
17+
'no_extra_blank_lines' => true,
18+
'no_leading_import_slash' => true,
19+
'no_multiline_whitespace_around_double_arrow' => true,
20+
'multiline_whitespace_before_semicolons' => false,
21+
'no_trailing_comma_in_singleline_array' => true,
22+
'no_unused_imports' => true,
23+
'no_whitespace_in_blank_line' => true,
24+
'object_operator_without_whitespace' => true,
25+
'ordered_imports' => ['sort_algorithm' => 'length'],
26+
'phpdoc_order' => true,
27+
'phpdoc_separation' => false,
28+
'phpdoc_summary' => true,
29+
'space_after_semicolon' => true,
30+
'standardize_not_equals' => true,
31+
'ternary_to_null_coalescing' => true,
32+
'trailing_comma_in_multiline' => true,
33+
])
34+
->setFinder($finder);

.scrutinizer.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
filter:
2+
excluded_paths: [tests/*]
3+
4+
checks:
5+
php:
6+
remove_extra_empty_lines: true
7+
remove_php_closing_tag: true
8+
remove_trailing_whitespace: true
9+
fix_use_statements:
10+
remove_unused: true
11+
preserve_multiple: false
12+
preserve_blanklines: true
13+
order_alphabetically: true
14+
fix_php_opening_tag: true
15+
fix_linefeed: true
16+
fix_line_ending: true
17+
fix_identation_4spaces: true
18+
fix_doc_comments: true
19+
20+
tools:
21+
external_code_coverage: true

.styleci.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
preset: laravel
2+
3+
enabled:
4+
- length_ordered_imports
5+
- concat_with_spaces
6+
7+
disabled:
8+
- alpha_ordered_imports
9+
- concat_without_spaces
10+
- laravel_phpdoc_alignment
11+
- laravel_phpdoc_order

.travis.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
language: php
2+
3+
php:
4+
- 8.0
5+
6+
# This triggers builds to run on the new TravisCI infrastructure.
7+
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
8+
sudo: false
9+
10+
## Cache composer
11+
cache:
12+
directories:
13+
- $HOME/.composer/cache
14+
15+
env:
16+
matrix:
17+
- COMPOSER_FLAGS=""
18+
19+
before_script:
20+
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-dist
21+
22+
script:
23+
- vendor/bin/phpcs --standard=psr2 src/
24+
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
25+
26+
after_script:
27+
- wget https://scrutinizer-ci.com/ocular.phar
28+
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Change Log
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
5+
and this project adheres to [Semantic Versioning](http://semver.org/).
6+
7+
## [1.0.0] - 2021-09-30
8+
### Added
9+
- Initial version.
10+

CONTRIBUTING.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Contributing
2+
3+
Contributions are **welcome** and will be fully **credited**.
4+
5+
We accept contributions via Pull Requests on [Github](https://github.com/testmonitor/slack-client).
6+
7+
8+
## Pull Requests
9+
10+
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - Check the code style with ``$ composer check-style`` and fix it with ``$ composer fix-style``.
11+
12+
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
13+
14+
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
15+
16+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
17+
18+
- **Create feature branches** - Don't ask us to pull from your master branch.
19+
20+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
21+
22+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
23+
24+
25+
## Running Tests
26+
27+
``` bash
28+
$ vendor/bin/phpunit
29+
```
30+
31+
32+
**Happy coding**!

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# The MIT License (MIT)
2+
3+
Copyright (c) 2021 Testmanagement BV <info@testmanagement.nl>
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
13+
> all 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
21+
> THE SOFTWARE.

0 commit comments

Comments
 (0)