From b9b56c13a421fdef51fea9e6b05d831698c1cb8e Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Mon, 2 Mar 2020 16:05:26 -0600 Subject: [PATCH] Rename toIntegerValue() to toInteger() --- src/Converter/Time/GenericTimeConverter.php | 2 +- src/Converter/Time/PhpTimeConverter.php | 2 +- src/Math/BrickMathCalculator.php | 2 +- src/Math/CalculatorInterface.php | 2 +- tests/Type/IntegerTest.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Converter/Time/GenericTimeConverter.php b/src/Converter/Time/GenericTimeConverter.php index e490090..8b37dfa 100644 --- a/src/Converter/Time/GenericTimeConverter.php +++ b/src/Converter/Time/GenericTimeConverter.php @@ -111,7 +111,7 @@ class GenericTimeConverter implements TimeConverterInterface // number of 100-nanosecond intervals from the Unix epoch, which also // includes the microtime. $epochNanoseconds = $this->calculator->subtract( - $this->calculator->toIntegerValue($uuidTimestamp), + $this->calculator->toInteger($uuidTimestamp), new IntegerObject(self::GREGORIAN_TO_UNIX_INTERVALS) ); diff --git a/src/Converter/Time/PhpTimeConverter.php b/src/Converter/Time/PhpTimeConverter.php index 5c70f27..353fe77 100644 --- a/src/Converter/Time/PhpTimeConverter.php +++ b/src/Converter/Time/PhpTimeConverter.php @@ -121,7 +121,7 @@ class PhpTimeConverter implements TimeConverterInterface */ public function convertTime(Hexadecimal $uuidTimestamp): Time { - $timestamp = $this->calculator->toIntegerValue($uuidTimestamp); + $timestamp = $this->calculator->toInteger($uuidTimestamp); // Convert the 100-nanosecond intervals into seconds and microseconds. $splitTime = $this->splitTime( diff --git a/src/Math/BrickMathCalculator.php b/src/Math/BrickMathCalculator.php index 3e0e90b..f2d8678 100644 --- a/src/Math/BrickMathCalculator.php +++ b/src/Math/BrickMathCalculator.php @@ -129,7 +129,7 @@ final class BrickMathCalculator implements CalculatorInterface return new Hexadecimal($this->toBase($value, 16)); } - public function toIntegerValue(Hexadecimal $value): IntegerObject + public function toInteger(Hexadecimal $value): IntegerObject { return $this->fromBase($value->toString(), 16); } diff --git a/src/Math/CalculatorInterface.php b/src/Math/CalculatorInterface.php index 5271dd6..f2dbd13 100644 --- a/src/Math/CalculatorInterface.php +++ b/src/Math/CalculatorInterface.php @@ -102,5 +102,5 @@ interface CalculatorInterface /** * Converts a Hexadecimal instance to an Integer instance */ - public function toIntegerValue(Hexadecimal $value): IntegerObject; + public function toInteger(Hexadecimal $value): IntegerObject; } diff --git a/tests/Type/IntegerTest.php b/tests/Type/IntegerTest.php index 83ded79..3c4dac7 100644 --- a/tests/Type/IntegerTest.php +++ b/tests/Type/IntegerTest.php @@ -15,7 +15,7 @@ class IntegerTest extends TestCase * * @dataProvider provideInteger */ - public function testIntegerValueType($value, string $expected): void + public function testIntegerType($value, string $expected): void { $integer = new IntegerObject($value);