Skip to content

Commit 1eb0202

Browse files
committed
Initial Commit
0 parents  commit 1eb0202

26 files changed

+1058
-0
lines changed

.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 https://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

.gitattributes

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Path-based git attributes
2+
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
4+
# Ignore all test and documentation with "export-ignore".
5+
/.editorconfig export-ignore
6+
/.gitattributes export-ignore
7+
/.gitignore export-ignore
8+
/.scrutinizer.yml export-ignore
9+
/.styleci.yml export-ignore
10+
/.travis.yml export-ignore
11+
/PULL_REQUEST_TEMPLATE.md export-ignore
12+
/ISSUE_TEMPLATE.md export-ignore
13+
/phpcs.xml.dist export-ignore
14+
/phpunit.xml.dist export-ignore
15+
/tests export-ignore
16+
/docs export-ignore

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
build
2+
composer.lock
3+
vendor
4+
phpcs.xml
5+
phpunit.xml
6+
.phpunit.result.cache

.scrutinizer.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
build:
2+
nodes:
3+
analysis:
4+
project_setup:
5+
override: true
6+
tests:
7+
override: [php-scrutinizer-run]
8+
9+
filter:
10+
excluded_paths: [tests/*]
11+
12+
checks:
13+
php:
14+
remove_extra_empty_lines: true
15+
remove_php_closing_tag: true
16+
remove_trailing_whitespace: true
17+
fix_use_statements:
18+
remove_unused: true
19+
preserve_multiple: false
20+
preserve_blanklines: true
21+
order_alphabetically: true
22+
fix_php_opening_tag: true
23+
fix_linefeed: true
24+
fix_line_ending: true
25+
fix_identation_4spaces: true
26+
fix_doc_comments: true
27+
28+
tools:
29+
external_code_coverage:
30+
timeout: 600
31+
runs: 3

.styleci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
preset: psr2

.travis.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
dist: trusty
2+
language: php
3+
4+
php:
5+
- 7.2
6+
- 7.3
7+
- 7.4
8+
- hhvm
9+
10+
## Cache composer
11+
cache:
12+
directories:
13+
- $HOME/.composer/cache
14+
15+
matrix:
16+
include:
17+
- php: 7.2
18+
env: 'COMPOSER_FLAGS="--prefer-stable --prefer-lowest"'
19+
20+
before_script:
21+
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-dist
22+
23+
script:
24+
- vendor/bin/phpcs --standard=psr2 src/
25+
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
26+
27+
after_script:
28+
- |
29+
if [[ "$TRAVIS_PHP_VERSION" != 'hhvm' ]]; then
30+
wget https://scrutinizer-ci.com/ocular.phar
31+
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
32+
fi

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# The MIT License (MIT)
2+
3+
Copyright (c) 2019 Vincent Gabriel <[email protected]>
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.

PULL_REQUEST_TEMPLATE.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
3+
## Description
4+
5+
Describe your changes in detail.
6+
7+
## Motivation and context
8+
9+
Why is this change required? What problem does it solve?
10+
11+
If it fixes an open issue, please link to the issue here (if you write `fixes #num`
12+
or `closes #num`, the issue will be automatically closed when the pull is accepted.)
13+
14+
## How has this been tested?
15+
16+
Please describe in detail how you tested your changes.
17+
18+
Include details of your testing environment, and the tests you ran to
19+
see how your change affects other areas of the code, etc.
20+
21+
## Screenshots (if appropriate)
22+
23+
## Types of changes
24+
25+
What types of changes does your code introduce? Put an `x` in all the boxes that apply:
26+
- [ ] Bug fix (non-breaking change which fixes an issue)
27+
- [ ] New feature (non-breaking change which adds functionality)
28+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
29+
30+
## Checklist:
31+
32+
Go over all the following points, and put an `x` in all the boxes that apply.
33+
34+
Please, please, please, don't send your pull request until all of the boxes are ticked. Once your pull request is created, it will trigger a build on our [continuous integration](http://www.phptherightway.com/#continuous-integration) server to make sure your [tests and code style pass](https://help.github.com/articles/about-required-status-checks/).
35+
36+
- [ ] I have read the **[CONTRIBUTING](CONTRIBUTING.md)** document.
37+
- [ ] My pull request addresses exactly one patch/feature.
38+
- [ ] I have created a branch for this patch/feature.
39+
- [ ] Each individual commit in the pull request is meaningful.
40+
- [ ] I have added tests to cover my changes.
41+
- [ ] If my change requires a change to the documentation, I have updated it accordingly.
42+
43+
If you're unsure about any of these, don't hesitate to ask. We're here to help!

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# PHP Wrapper Around Apple CUPS

composer.json

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"name": "vinceg/php-cups-print",
3+
"type": "library",
4+
"description": "PHP Wrapper around Mac CUPS printing system",
5+
"keywords": [
6+
"php",
7+
"cups",
8+
"printing"
9+
],
10+
"homepage": "https://github.com/vinceg/php-cups-print",
11+
"license": "MIT",
12+
"authors": [
13+
{
14+
"name": "Vincent Gabriel",
15+
"email": "[email protected]",
16+
"homepage": "https://github.com/vinceg",
17+
"role": "Developer"
18+
}
19+
],
20+
"require": {
21+
"php": "^7.4",
22+
"tightenco/collect": "^6.9"
23+
},
24+
"require-dev": {
25+
"phpunit/phpunit" : ">=8.0",
26+
"squizlabs/php_codesniffer": "^3.0"
27+
},
28+
"autoload": {
29+
"psr-4": {
30+
"Printing\\": "src"
31+
}
32+
},
33+
"autoload-dev": {
34+
"psr-4": {
35+
"Printing\\": "tests"
36+
}
37+
},
38+
"scripts": {
39+
"test": "phpunit",
40+
"check-style": "phpcs src tests",
41+
"fix-style": "phpcbf src tests"
42+
},
43+
"extra": {
44+
"branch-alias": {
45+
"dev-master": "1.0-dev"
46+
}
47+
},
48+
"config": {
49+
"sort-packages": true
50+
}
51+
}

phpcs.xml.dist

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="php-cups-print">
3+
<description>The coding standard of php-cups-print package</description>
4+
<arg value="p" />
5+
6+
<config name="ignore_warnings_on_exit" value="1" />
7+
<config name="ignore_errors_on_exit" value="1" />
8+
9+
<arg name="colors" />
10+
<arg value="s" />
11+
12+
<!-- Use the PSR2 Standard-->
13+
<rule ref="PSR2" />
14+
</ruleset>

phpunit.xml.dist

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit bootstrap="vendor/autoload.php"
3+
backupGlobals="false"
4+
backupStaticAttributes="false"
5+
colors="true"
6+
verbose="true"
7+
convertErrorsToExceptions="true"
8+
convertNoticesToExceptions="true"
9+
convertWarningsToExceptions="true"
10+
processIsolation="false"
11+
stopOnFailure="false">
12+
<testsuites>
13+
<testsuite name="vinceg Test Suite">
14+
<directory>tests</directory>
15+
</testsuite>
16+
</testsuites>
17+
<filter>
18+
<whitelist>
19+
<directory suffix=".php">src/</directory>
20+
</whitelist>
21+
</filter>
22+
<logging>
23+
<log type="junit" target="build/report.junit.xml"/>
24+
<log type="coverage-html" target="build/coverage"/>
25+
<log type="coverage-text" target="build/coverage.txt"/>
26+
<log type="coverage-clover" target="build/logs/clover.xml"/>
27+
</logging>
28+
</phpunit>

0 commit comments

Comments
 (0)