Skip to content

Commit

Permalink
Updated Travis configuration & code-style fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalloc committed Sep 30, 2014
1 parent 081e2d2 commit 84b790d
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 22 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
language: php

php: ["5.3", "5.4", "5.5"]
php: ["5.3", "5.4", "5.5", "5.6", "hhvm", "hhvm-nightly"]

matrix:
allow_failures: [{"php": "hhvm"}, {"php": "hhvm-nightly"}]
fast_finish: true

env:
global:
- ARCHER_PUBLISH_VERSION=5.5
- ARCHER_PUBLISH_VERSION=5.6
- secure: "HZsPafLD/Tw8QB3wxiqUGpmawKoIoZuFanW8Tzve29IAnvjj4ulIxWnYMULQbe4wvukcUg9dkjZ5ltXMJVKeFh3jlrC5ejKWrTD0cCnpfxgkmACInh93+Jt0XhpT+5dbReblOKMFslkEJwJxPily4rocyXUVLiUIz4tQgWnxQtQ="

install:
Expand Down
2 changes: 1 addition & 1 deletion src/Clock/TestClock.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function utcTime()
*/
public function utcDateTime()
{
return $this->localDateTime()->toTimeZone(new TimeZone);
return $this->localDateTime()->toTimeZone(new TimeZone());
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function __construct(
Normalizer::normalizeDate($year, $month, $day);

if ($timeZone === null) {
$timeZone = new TimeZone;
$timeZone = new TimeZone();
}

$this->year = $year;
Expand Down Expand Up @@ -192,7 +192,7 @@ public function toTimeZone(TimeZone $timeZone)
*/
public function toUtc()
{
return $this->toTimeZone(new TimeZone);
return $this->toTimeZone(new TimeZone());
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/DateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(
Normalizer::normalizeDate($year, $month, $day);

if ($timeZone === null) {
$timeZone = new TimeZone;
$timeZone = new TimeZone();
}

$this->year = $year;
Expand Down Expand Up @@ -203,7 +203,7 @@ public function toTimeZone(TimeZone $timeZone)
*/
public function toUtc()
{
return $this->toTimeZone(new TimeZone);
return $this->toTimeZone(new TimeZone());
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Format/DefaultFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function ($character) use ($timeZone) {
public static function instance()
{
if (null === self::$instance) {
self::$instance = new self;
self::$instance = new self();
}

return self::$instance;
Expand Down
4 changes: 2 additions & 2 deletions src/TimeOfDay.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __construct(
Normalizer::normalizeTime($hour, $minute, $second);

if ($timeZone === null) {
$timeZone = new TimeZone;
$timeZone = new TimeZone();
}

$this->hour = $hour;
Expand Down Expand Up @@ -160,7 +160,7 @@ public function toTimeZone(TimeZone $timeZone)
*/
public function toUtc()
{
return $this->toTimeZone(new TimeZone);
return $this->toTimeZone(new TimeZone());
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Timer/Timer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Timer implements TimerInterface
public function __construct(ClockInterface $clock = null)
{
if (null === $clock) {
$clock = new SystemClock;
$clock = new SystemClock();
}

$this->clock = $clock;
Expand Down
2 changes: 1 addition & 1 deletion test/suite/Clock/TestClockTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function testConstructor()

public function testConstructorDefaults()
{
$this->clock = new TestClock;
$this->clock = new TestClock();

$this->assertEquals(DateTime::fromUnixTime(0), $this->clock->localDateTime());
$this->assertFalse($this->clock->isSuspended());
Expand Down
2 changes: 1 addition & 1 deletion test/suite/DateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function testToTimeZone()

public function testToTimeZoneSame()
{
$result = $this->date->toTimeZone(new TimeZone);
$result = $this->date->toTimeZone(new TimeZone());
$this->assertSame($this->date, $result);
}

Expand Down
2 changes: 1 addition & 1 deletion test/suite/DateTimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function testToTimeZone()

public function testToTimeZoneSame()
{
$result = $this->dateTime->toTimeZone(new TimeZone);
$result = $this->dateTime->toTimeZone(new TimeZone());
$this->assertSame($this->dateTime, $result);
}

Expand Down
2 changes: 1 addition & 1 deletion test/suite/Format/DefaultFormatterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function setUp()
{
Liberator::liberateClass(__NAMESPACE__ . '\DefaultFormatter')->instance = null;

$this->formatter = new DefaultFormatter;
$this->formatter = new DefaultFormatter();
$this->specialChars = 'dDjlNSwzWFmMntLoYyaABgGhHisueIOPTZcrU';
$this->escapedChars = '\\d\\D\\j\\l\\N\\S\\w\\z\\W\\F\\m\\M\\n\\t\\L\\o\\Y\\y\\a\\A\\B\\g\\G\\h\\H\\i\\s\\u\\e\\I\\O\\P\\T\\Z\\c\\r\\U';

Expand Down
2 changes: 1 addition & 1 deletion test/suite/TimeOfDayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function testToTimeZone()

public function testToTimeZoneSame()
{
$result = $this->time->toTimeZone(new TimeZone);
$result = $this->time->toTimeZone(new TimeZone());
$this->assertSame($this->time, $result);
}

Expand Down
2 changes: 1 addition & 1 deletion test/suite/TimeSpan/DurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function testIsEmpty()
{
$this->assertFalse($this->duration->isEmpty());

$duration = new Duration;
$duration = new Duration();

$this->assertTrue($duration->isEmpty());
}
Expand Down
2 changes: 1 addition & 1 deletion test/suite/TimeSpan/PeriodTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function testIsEmpty()
{
$this->assertFalse($this->period->isEmpty());

$period = new Period;
$period = new Period();

$this->assertTrue($period->isEmpty());
}
Expand Down
6 changes: 3 additions & 3 deletions test/suite/TimeZoneTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function setUp()

public function testConstructorDefaults()
{
$timeZone = new TimeZone;
$timeZone = new TimeZone();
$this->assertSame(0, $timeZone->offset());
$this->assertFalse($timeZone->isDst());
}
Expand All @@ -45,7 +45,7 @@ public function testIsUtc()
$timeZone = new TimeZone(36000, false);
$this->assertFalse($timeZone->isUtc());

$timeZone = new TimeZone;
$timeZone = new TimeZone();
$this->assertTrue($timeZone->isUtc());

$timeZone = new TimeZone(0, false);
Expand Down Expand Up @@ -234,7 +234,7 @@ public function testIsoString()
$this->assertEquals('+10:00', $this->timeZone->__toString());

// UTC must be "positive zero" ...
$timeZone = new TimeZone;
$timeZone = new TimeZone();
$this->assertEquals('+00:00', $timeZone->isoString());
$this->assertEquals('+00:00', $timeZone->__toString());

Expand Down
2 changes: 1 addition & 1 deletion test/suite/Timer/TimerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function setUp()

public function testConstructorDefaults()
{
$timer = new Timer;
$timer = new Timer();

$this->assertInstanceOf('Icecave\Chrono\Clock\SystemClock', $timer->clock());
}
Expand Down

0 comments on commit 84b790d

Please sign in to comment.