Skip to content

Commit

Permalink
Varius bugfix and add scrutinizer
Browse files Browse the repository at this point in the history
  • Loading branch information
JellyBellyDev committed Feb 27, 2018
1 parent 5a0d359 commit a2352ff
Show file tree
Hide file tree
Showing 10 changed files with 113 additions and 1,522 deletions.
23 changes: 23 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 4
tab_width = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120

[{*.yml}]
indent_size = 2
tab_width = 2

[composer.json]
indent_size = 4
tab_width = 4

[*.md]
trim_trailing_whitespace = false
13 changes: 3 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/web/bundles/
/app/bootstrap.php.cache
/app/cache/*
/app/config/parameters.yml
/app/logs/*
!app/cache/.gitkeep
!app/logs/.gitkeep
/build/
.php-version
composer.lock
coverage.clover
/vendor/
/bin/
/composer.phar
19 changes: 19 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
checks:
php:
code_rating: true
remove_extra_empty_lines: true
remove_php_closing_tag: true
remove_trailing_whitespace: true
fix_use_statements:
remove_unused: true
preserve_multiple: false
preserve_blanklines: true
order_alphabetically: true
fix_php_opening_tag: true
fix_linefeed: true
fix_line_ending: true
fix_identation_4spaces: true
fix_doc_comments: true
tools:
external_code_coverage:
timeout: 600
16 changes: 13 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: php
sudo: false

php:
- 5.4
Expand All @@ -11,6 +12,15 @@ matrix:
- php: 5.3
dist: precise

before_script:
- curl -s http://getcomposer.org/installer | php
- php composer.phar install --dev
cache:
directories:
- $HOME/.composer/cache/files

before_install:
- composer self-update
- composer install

after_script:
- vendor/bin/phpunit --coverage-clover=coverage.clover
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,22 @@ This repository contains a php class that fix image orientation by exif data wit
[![Build Status](https://travis-ci.org/JellyBellyDev/ImageOrientationFix.svg?branch=master)](https://travis-ci.org/JellyBellyDev/ImageOrientationFix)
[![Latest Stable Version](https://poser.pugx.org/jellybellydev/image-orientation-fix/v/stable)](https://packagist.org/packages/jellybellydev/image-orientation-fix)
[![Total Downloads](https://poser.pugx.org/jellybellydev/image-orientation-fix/downloads)](https://packagist.org/packages/jellybellydev/image-orientation-fix)
[![License](https://poser.pugx.org/jellybellydev/image-orientation-fix/license)](https://packagist.org/packages/jellybellydev/image-orientation-fix)
[![composer.lock](https://poser.pugx.org/jellybellydev/image-orientation-fix/composerlock)](https://packagist.org/packages/jellybellydev/image-orientation-fix)
[![License](https://poser.pugx.org/jellybellydev/image-orientation-fix/license)](https://packagist.org/packages/jellybellydev/image-orientation-fix)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/JellyBellyDev/ImageOrientationFix/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/JellyBellyDev/ImageOrientationFix/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/JellyBellyDev/ImageOrientationFix/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/JellyBellyDev/ImageOrientationFix/?branch=master)

## How to use

```bash
composer require jellybellydev/image-orientation-fix
```

```php
$iof = new ImageOrientationFix('foo.jpg');
$iof->fix();
```


## Credits

Thanks to [recurser](https://github.com/recurser) for the [image example](https://github.com/recurser/exif-orientation-examples)
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
}
},
"require": {
"php": ">=5.0.1",
"php": ">=5.2.4",
"ext-gd": "*"
},
"require-dev": {
"phpunit/phpunit": "@stable"
"phpunit/phpunit": "^4.8"
}
}
Loading

0 comments on commit a2352ff

Please sign in to comment.