Skip to content

Commit

Permalink
Merge 0d2f2f1 into 1380db6
Browse files Browse the repository at this point in the history
  • Loading branch information
SignpostMarv committed Jan 28, 2018
2 parents 1380db6 + 0d2f2f1 commit e1fb61d
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 18 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"mockery/mockery": "^1.0",
"moontoast/math": "^1.1",
"php-mock/php-mock-phpunit": "^2.0",
"phpstan/phpstan": "^0.9.1",
"phpstan/phpstan-phpunit": "0.9.2",
"phpstan/phpstan-shim": "0.9.1",
"phpunit/phpunit": "^6.4",
"squizlabs/php_codesniffer": "^3.0"
},
Expand Down Expand Up @@ -60,8 +60,8 @@
"phpunit": "phpunit --verbose --colors=always",
"phpcs": "phpcs src tests --standard=psr2 -sp --colors",
"phpstan": [
"phpstan analyse -c phpstan.neon src --level 2 --no-progress",
"phpstan analyse -c phpstan-tests.neon tests --level 2 --no-progress"
"php vendor/phpstan/phpstan/bin/phpstan analyse -c phpstan.neon src --no-progress",
"php vendor/phpstan/phpstan/bin/phpstan analyse -c phpstan-tests.neon tests --no-progress"
],
"test": [
"@lint",
Expand Down
4 changes: 4 additions & 0 deletions phpstan-tests.neon
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
includes:
- vendor/phpstan/phpstan/conf/config.level4.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
parameters:
ignoreErrors:
- '#Function uuid_create not found#'
Expand Down
2 changes: 2 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
includes:
- vendor/phpstan/phpstan/conf/config.level5.neon
parameters:
ignoreErrors:
- '#Function uuid_create not found#'
Expand Down
4 changes: 2 additions & 2 deletions src/Generator/DefaultTimeGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function generate($node = null, $clockSeq = null)
// Create a 60-bit time value as a count of 100-nanosecond intervals
// since 00:00:00.00, 15 October 1582
$timeOfDay = $this->timeProvider->currentTime();
$uuidTime = $this->timeConverter->calculateTime($timeOfDay['sec'], $timeOfDay['usec']);
$uuidTime = $this->timeConverter->calculateTime((string) $timeOfDay['sec'], (string) $timeOfDay['usec']);

$timeHi = BinaryUtils::applyVersion($uuidTime['hi'], 1);
$clockSeqHi = BinaryUtils::applyVariant($clockSeq >> 8);
Expand All @@ -109,7 +109,7 @@ public function generate($node = null, $clockSeq = null)
* Uses the node provider given when constructing this instance to get
* the node ID (usually a MAC address)
*
* @param string|int $node A node value that may be used to override the node provider
* @param string|int|null $node A node value that may be used to override the node provider
* @return string Hexadecimal representation of the node ID
*/
protected function getValidNode($node)
Expand Down
2 changes: 1 addition & 1 deletion src/Provider/Node/FallbackNodeProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(array $providers)
* Returns the system node ID by iterating over an array of node providers
* and returning the first non-empty value found
*
* @return string System node ID as a hexadecimal string
* @return string|null System node ID as a hexadecimal string
*/
public function getNode()
{
Expand Down
4 changes: 1 addition & 3 deletions tests/Codec/GuidStringCodecTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ protected function setUp()
protected function tearDown()
{
parent::tearDown();
$this->builder = null;
$this->fields = null;
$this->uuid = null;
unset($this->builder, $this->fields, $this->uuid);
}

public function testEncodeUsesFieldsArray()
Expand Down
4 changes: 1 addition & 3 deletions tests/Codec/OrderedTimeCodecTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ protected function setUp()
protected function tearDown()
{
parent::tearDown();
$this->builder = null;
$this->uuid = null;
$this->fields = null;
unset($this->builder, $this->uuid, $this->fields);
}

public function testEncodeUsesFieldsArray()
Expand Down
4 changes: 1 addition & 3 deletions tests/Codec/StringCodecTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ protected function setUp()
protected function tearDown()
{
parent::tearDown();
$this->builder = null;
$this->uuid = null;
$this->fields = null;
unset($this->builder, $this->uuid, $this->fields);
}

public function testEncodeUsesFieldsArray()
Expand Down
4 changes: 1 addition & 3 deletions tests/Generator/DefaultTimeGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ protected function setUp()
protected function tearDown()
{
parent::tearDown();
$this->timeProvider = null;
$this->nodeProvider = null;
$this->timeConverter = null;
unset($this->timeProvider, $this->nodeProvider, $this->timeConverter);
Mockery::close();
if (!self::isHhvm()) {
AspectMock::clean();
Expand Down
File renamed without changes.

0 comments on commit e1fb61d

Please sign in to comment.