Skip to content

Commit

Permalink
Clean up build and dependencies (#12)
Browse files Browse the repository at this point in the history
* Fix style warning

* Clean up build and dependencies
  • Loading branch information
texdc authored Feb 27, 2018
1 parent e3ca00a commit 30d34dc
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 27 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
/.travis.coverage.sh export-ignore
/.travis.yml export-ignore
/phpunit.xml.dist export-ignore
/README.md export-ignore
8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# Ignore Eclipse files
.buildpath
.project
.settings/

# build files
vendor/
composer.lock
/phpunit.xml
/build

# bad
*.DS_Store
6 changes: 0 additions & 6 deletions .travis.coverage.sh

This file was deleted.

6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ cache:
- $HOME/.composer/cache

before_script:
- composer update --prefer-stable
- composer install --prefer-dist

script:
- mkdir -p build/logs
- composer test
- composer style

after_script:
- sh .travis.coverage.sh
- composer check
- composer metrics
- composer coverage
11 changes: 4 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
"require-dev": {
"phpunit/phpunit": "@stable",
"satooshi/php-coveralls": "@stable",
"squizlabs/php_codesniffer": "@stable",
"phpmd/phpmd": "@stable",
"phpmetrics/phpmetrics": "@stable"
"squizlabs/php_codesniffer": "@stable"
},
"autoload": {
"psr-4": { "texdc\\range\\": "src/" }
Expand All @@ -23,9 +21,8 @@
"psr-4": { "texdc\\range\\test\\": "test/" }
},
"scripts": {
"test": "vendor/bin/phpunit",
"style": "vendor/bin/phpcs --standard=PSR2 src/ test/",
"check": "vendor/bin/phpmd src/,test/ text cleancode,codesize,design,naming,unusedcode",
"metrics": "vendor/bin/phpmetrics --report-cli src/"
"test": "vendor/bin/phpunit",
"style": "vendor/bin/phpcs --standard=PSR2 src/ test/",
"coverage": "vendor/bin/php-coveralls"
}
}
5 changes: 4 additions & 1 deletion src/AbstractRange.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ public function abuts(self $another) : bool
*/
public function findGapTo(self $another) : self
{
if ($this->abuts($another) || $this->contains($another) || $another->contains($this) || $this->overlaps($another)) {
if ($this->abuts($another)
|| $this->contains($another)
|| $another->contains($this)
|| $this->overlaps($another)) {
return static::void();
} elseif ($this->isContraryTo($another)) {
return $this->findContraryGap($another);
Expand Down

0 comments on commit 30d34dc

Please sign in to comment.