Skip to content

Commit 39378b6

Browse files
committed
Merge branch 'taion809-travis-ci-builds' into dev
2 parents a94e5df + 9894828 commit 39378b6

File tree

6 files changed

+42
-71
lines changed

6 files changed

+42
-71
lines changed

.travis.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
language: php
2+
3+
sudo: true
4+
5+
php:
6+
- 5.3
7+
- 5.4
8+
- 5.5
9+
- 5.6
10+
- 7.0
11+
- hhvm
12+
13+
matrix:
14+
allow_failures:
15+
- php: hhvm
16+
17+
cache:
18+
directories:
19+
- $HOME/.composer/cache
20+
21+
before_install:
22+
- source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
23+
- wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
24+
- sudo apt-get update
25+
- sudo apt-get install -y rethinkdb
26+
- nohup rethinkdb &
27+
- travis_retry composer self-update
28+
29+
install:
30+
- travis_retry composer update --no-interaction --prefer-source
31+
32+
script:
33+
- php vendor/bin/parallel-lint --exclude vendor .
34+
- php vendor/bin/phpcs -n --standard=PSR2 rdb/
35+
- composer test

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
},
1919
"require-dev": {
2020
"phpunit/phpunit": "~4.8",
21-
"jakub-onderka/php-parallel-lint": "dev-master"
21+
"jakub-onderka/php-parallel-lint": "dev-master",
22+
"squizlabs/php_codesniffer": "~2.5"
2223
},
2324
"autoload": {
2425
"files": ["rdb/rdb.php"],

rdb/DatumConverter.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,7 @@ public function nativeToDatum($v)
3434
if (!is_numeric($key) && !is_string($key)) {
3535
throw new RqlDriverError("Key must be a string.");
3636
}
37-
if (
38-
(is_object($val)
39-
&& is_subclass_of($val, "\\r\\Query"))
40-
&& !(is_object($val)
41-
&& is_subclass_of($val, '\r\Datum\Datum'))
42-
) {
37+
if (is_subclass_of($val, "\\r\\Query") && !is_subclass_of($val, '\r\Datum\Datum')) {
4338
$subDatum = $val;
4439
$mustUseMakeTerm = true;
4540
} else {

tests/Functional/JoinTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,19 +152,19 @@ public function testEqJoinId()
152152
$excpected = array(
153153
array(
154154
'left' => array('id' => 1, 'other' => 'a'),
155-
'right' => array('id' => 'a', 'other' => 1 )
155+
'right' => array('id' => 'b', 'other' => 1 )
156156
),
157157
array(
158158
'left' => array('id' => 1, 'other' => 'a'),
159-
'right' => array('id' => 'b', 'other' => 1 )
160-
)
159+
'right' => array('id' => 'a', 'other' => 1 )
160+
),
161161
);
162162

163163
$res = $this->db()->table('t1')
164164
->eqJoin('id', $this->db()->table('t2'), array('index' => 'other'))
165165
->run($this->conn);
166166

167-
$this->assertEquals($excpected, $this->orderArrayByLeftId($res));
167+
$this->assertEquals($excpected, $this->toArray($res->toArray()));
168168
}
169169

170170
public function testEqJoinFunc()

wercker-php53.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

wercker.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)