@@ -33,7 +33,7 @@ |
||
| 33 | 33 | { |
| 34 | 34 | parent::__construct($initial_value, $strict); |
| 35 | 35 | if (!$strict) { |
| 36 | - $initial_value = (string) $initial_value; |
|
| 36 | + $initial_value = (string)$initial_value; |
|
| 37 | 37 | } |
| 38 | 38 | if (!is_string($initial_value)) { |
| 39 | 39 | throw new \UnexpectedValueException('Value not a string'); |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | { |
| 34 | 34 | parent::__construct($initial_value, $strict); |
| 35 | 35 | if (!$strict) { |
| 36 | - $initial_value = (int) $initial_value; |
|
| 36 | + $initial_value = (int)$initial_value; |
|
| 37 | 37 | } |
| 38 | 38 | if (!is_int($initial_value)) { |
| 39 | 39 | throw new \UnexpectedValueException('Value not an integer'); |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | */ |
| 59 | 59 | final public function __toString() |
| 60 | 60 | { |
| 61 | - return (string) $this->__default; |
|
| 61 | + return (string)$this->__default; |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | /** |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | { |
| 34 | 34 | parent::__construct($initial_value, $strict); |
| 35 | 35 | if (!$strict) { |
| 36 | - $initial_value = (float) $initial_value; |
|
| 36 | + $initial_value = (float)$initial_value; |
|
| 37 | 37 | } |
| 38 | 38 | if (!is_float($initial_value) && !is_int($initial_value)) { |
| 39 | 39 | throw new \UnexpectedValueException('Value not a float'); |
@@ -45,6 +45,6 @@ |
||
| 45 | 45 | */ |
| 46 | 46 | public function benchCreateNumeric() |
| 47 | 47 | { |
| 48 | - new SplString((string) mt_rand()); |
|
| 48 | + new SplString((string)mt_rand()); |
|
| 49 | 49 | } |
| 50 | 50 | } |
@@ -24,15 +24,15 @@ |
||
| 24 | 24 | public function test() |
| 25 | 25 | { |
| 26 | 26 | $test = new DuckFloat(); |
| 27 | - $this->assertSame(0.0, (float) (string) $test); |
|
| 27 | + $this->assertSame(0.0, (float)(string)$test); |
|
| 28 | 28 | unset($test); |
| 29 | 29 | |
| 30 | 30 | $test = new DuckFloat(10.1); |
| 31 | - $this->assertSame(10.1, (float) (string) $test); |
|
| 31 | + $this->assertSame(10.1, (float)(string)$test); |
|
| 32 | 32 | unset($test); |
| 33 | 33 | |
| 34 | 34 | $test = new DuckFloat('10.1', false); |
| 35 | - $this->assertSame(10.1, (float) (string) $test); |
|
| 35 | + $this->assertSame(10.1, (float)(string)$test); |
|
| 36 | 36 | unset($test); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -24,15 +24,15 @@ |
||
| 24 | 24 | public function test() |
| 25 | 25 | { |
| 26 | 26 | $test = new DuckString(); |
| 27 | - $this->assertSame('', (string) $test); |
|
| 27 | + $this->assertSame('', (string)$test); |
|
| 28 | 28 | unset($test); |
| 29 | 29 | |
| 30 | 30 | $test = new DuckString('test'); |
| 31 | - $this->assertSame('test', (string) $test); |
|
| 31 | + $this->assertSame('test', (string)$test); |
|
| 32 | 32 | unset($test); |
| 33 | 33 | |
| 34 | 34 | $test = new DuckString(0, false); |
| 35 | - $this->assertSame('0', (string) $test); |
|
| 35 | + $this->assertSame('0', (string)$test); |
|
| 36 | 36 | unset($test); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -24,15 +24,15 @@ |
||
| 24 | 24 | public function test() |
| 25 | 25 | { |
| 26 | 26 | $test = new Month(); |
| 27 | - $this->assertEquals(Month::__default, (string) $test); |
|
| 27 | + $this->assertEquals(Month::__default, (string)$test); |
|
| 28 | 28 | unset($test); |
| 29 | 29 | |
| 30 | 30 | $test = new Month(Month::SEPTEMBER); |
| 31 | - $this->assertEquals(Month::SEPTEMBER, (string) $test); |
|
| 31 | + $this->assertEquals(Month::SEPTEMBER, (string)$test); |
|
| 32 | 32 | unset($test); |
| 33 | 33 | |
| 34 | 34 | $test = new Month('1', false); |
| 35 | - $this->assertEquals(Month::JANUARY, (string) $test); |
|
| 35 | + $this->assertEquals(Month::JANUARY, (string)$test); |
|
| 36 | 36 | unset($test); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -24,15 +24,15 @@ |
||
| 24 | 24 | public function test() |
| 25 | 25 | { |
| 26 | 26 | $test = new DuckBool(); |
| 27 | - $this->assertFalse((bool) (string) $test); |
|
| 27 | + $this->assertFalse((bool)(string)$test); |
|
| 28 | 28 | unset($test); |
| 29 | 29 | |
| 30 | 30 | $test = new DuckBool(true); |
| 31 | - $this->assertTrue((bool) (string) $test); |
|
| 31 | + $this->assertTrue((bool)(string)$test); |
|
| 32 | 32 | unset($test); |
| 33 | 33 | |
| 34 | 34 | $test = new DuckBool(1, false); |
| 35 | - $this->assertTrue((bool) (string) $test); |
|
| 35 | + $this->assertTrue((bool)(string)$test); |
|
| 36 | 36 | unset($test); |
| 37 | 37 | } |
| 38 | 38 | |