Skip to content

Commit

Permalink
Fixes a comparison issue and also updated the build config to ensure …
Browse files Browse the repository at this point in the history
…testing is ran on the support PHP versions only (7.x) as the nightly is now failing due to composer dependency issues for PHP 8 (will instead look to push a new major version closer the time).
  • Loading branch information
allebb committed Jun 13, 2019
1 parent 4598020 commit 7075f79
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ php:
- 7.1
- 7.2
- 7.3
- nightly

sudo: false

Expand All @@ -15,5 +14,5 @@ install: travis_retry composer install --no-interaction --prefer-source
script: vendor/bin/phpunit --coverage-clover=coverage.clover

after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GPIO

[![Build Status](https://scrutinizer-ci.com/g/allebb/gpio/badges/build.png?b=master)](https://scrutinizer-ci.com/g/allebb/gpio/build-status/master)
[![Build Status](https://scrutinizer-ci.com/g/allebb/gpio/badges/build.png?b=master)](https://scrutinizer-ci.com/g/allebb/gpio/badges/build.png?b=master)
[![Code Coverage](https://scrutinizer-ci.com/g/allebb/gpio/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/allebb/gpio/?branch=master)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/allebb/gpio/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/allebb/gpio/?branch=master)
[![Code Climate](https://codeclimate.com/github/allebb/gpio/badges/gpa.svg)](https://codeclimate.com/github/allebb/metar)
Expand Down
2 changes: 1 addition & 1 deletion src/Adapters/RPiAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function setDirection(int $pin, string $direction, bool $invert = false):
{
$this->export($pin);

if (file_exists("/sys/class/gpio/gpio{$pin}/direction") && trim(file_get_contents("/sys/class/gpio/gpio{$pin}/direction")) !== $direction) {
if (file_exists("/sys/class/gpio/gpio{$pin}/direction") && trim(file_get_contents("/sys/class/gpio/gpio{$pin}/direction")) != $direction) {
system("echo {$direction} > /sys/class/gpio/gpio{$pin}/direction");
}

Expand Down

0 comments on commit 7075f79

Please sign in to comment.