File tree 8 files changed +423
-112
lines changed
8 files changed +423
-112
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ $ finder = PhpCsFixer \Finder::create ()
4
+ ->exclude ('migrations ' )
5
+ ->in (__DIR__ );
6
+
7
+ $ config = PhpCsFixer \Config::create ()
8
+ ->setUsingCache (true )
9
+ ->setRules ([
10
+ '@PSR2 ' => true ,
11
+ 'array_syntax ' => [
12
+ 'syntax ' => 'short '
13
+ ],
14
+ 'no_unused_imports ' => true ,
15
+ 'ordered_imports ' => true ,
16
+ 'psr0 ' => false ,
17
+ 'trailing_comma_in_multiline_array ' => true ,
18
+ ])
19
+ ->setFinder ($ finder );
20
+
21
+ return $ config ;
Original file line number Diff line number Diff line change @@ -33,12 +33,6 @@ matrix:
33
33
- php : 5.6
34
34
env :
35
35
- DEPS=lowest
36
- - php : 5.6
37
- env :
38
- - DEPS=locked
39
- - TEST_COVERAGE=true
40
- - DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
41
- - PATH="$HOME/.local/bin:$PATH"
42
36
- php : 5.6
43
37
env :
44
38
- DEPS=latest
@@ -48,12 +42,35 @@ matrix:
48
42
- php : 7
49
43
env :
50
44
- DEPS=latest
51
- - php : hhvm
45
+ - php : 7.1
46
+ env :
47
+ - DEPS=lowest
48
+ - php : 7.1
49
+ env :
50
+ - DEPS=locked
51
+ - TEST_COVERAGE=true
52
+ - WITH_CS=true
53
+ - DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
54
+ - PATH="$HOME/.local/bin:$PATH"
55
+ - php : 7.1
56
+ env :
57
+ - DEPS=latest
58
+ - php : nightly
59
+ env :
60
+ - DEPS=lowest
61
+ - php : nightly
62
+ env :
63
+ - DEPS=latest
64
+ - php : hhvm
52
65
env :
53
66
- DEPS=lowest
54
67
- php : hhvm
55
68
env :
56
69
- DEPS=latest
70
+ allow_failures :
71
+ - php : hhvm
72
+ - php : nightly
73
+ - php : 5.5
57
74
58
75
notifications :
59
76
@@ -75,6 +92,8 @@ script:
75
92
- if [[ $TEST_COVERAGE != 'true' ]]; then composer test ; fi
76
93
- if [[ $CHECK_CS == 'true' ]]; then composer cs-check ; fi
77
94
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then ./docsinstall.sh; composer api; fi
95
+ - if [[ "$WITH_CS" == "true" ]]; then vendor/bin/php-cs-fixer fix --verbose --diff --dry-run; fi
96
+
78
97
79
98
after_success :
80
99
- if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./.builddocs.sh ; echo "Completed deploying documentation" ; fi
Original file line number Diff line number Diff line change 2
2
3
3
[ ![ Build Status] ( https://travis-ci.org/heiglandreas/Org_Heigl_Ghostscript.svg?branch=master )] ( https://travis-ci.org/heiglandreas/Org_Heigl_Ghostscript )
4
4
[ ![ Coverage Status] ( https://coveralls.io/repos/github/heiglandreas/Org_Heigl_Ghostscript/badge.svg?branch=master )] ( https://coveralls.io/github/heiglandreas/Org_Heigl_Ghostscript?branch=master )
5
+ [ ![ Codacy Badge] ( https://api.codacy.com/project/badge/Grade/6be2e49960764a688d269c043d30216c )] ( https://www.codacy.com/app/github_70/Org_Heigl_Ghostscript?utm_source=github.com& ; utm_medium=referral& ; utm_content=heiglandreas/Org_Heigl_Ghostscript& ; utm_campaign=Badge_Grade )
5
6
6
7
A PHP-wrapper to the Ghostscript-CLI
7
8
Original file line number Diff line number Diff line change 20
20
}
21
21
},
22
22
"require-dev" : {
23
- "phpunit/phpunit" : " ^4.8||^ 5.3" ,
23
+ "phpunit/phpunit" : " ^5.3" ,
24
24
"phpdocumentor/phpdocumentor" : " ^2.9" ,
25
- "fabpot /php-cs-fixer" : " ^1.11 "
25
+ "friendsofphp /php-cs-fixer" : " ^2.1 "
26
26
},
27
27
"scripts" : {
28
28
"cs-check" : " php-cs-fixer --version && php-cs-fixer fix . --level=psr2 -v --diff --dry-run" ,
Original file line number Diff line number Diff line change 2
2
3
3
## Convert a PDF- or Postscript-File to a JPEG
4
4
5
+ This is the basic way of creating a JPEG from a PDF-File
6
+
5
7
```
6
8
<?php
7
9
use Org_Heigl\Ghostscript\Ghostscript;
Original file line number Diff line number Diff line change @@ -79,17 +79,16 @@ public function getDevice()
79
79
public function setDevice ($ device )
80
80
{
81
81
$ device = strtolower ($ device );
82
- $ devices = array (
82
+ $ devices = [
83
83
'pngalpha ' ,
84
84
'png16m ' ,
85
85
'png256 ' ,
86
86
'png16 ' ,
87
87
'pnggray ' ,
88
- 'pngmono '
89
- );
90
- if (! in_array ($ device , $ devices )) {
91
- $ this -> _device = 'pngalpha ' ;
92
- } else {
88
+ 'pngmono ' ,
89
+ ];
90
+ $ this ->_device = 'pngalpha ' ;
91
+ if (in_array ($ device , $ devices )) {
93
92
$ this -> _device = $ device ;
94
93
}
95
94
You can’t perform that action at this time.
0 commit comments