@@ -32,7 +32,7 @@ |
||
32 | 32 | public function __construct($initial_value = self::__default, $strict = true) { |
33 | 33 | parent::__construct($initial_value, $strict); |
34 | 34 | if (!$strict) { |
35 | - $initial_value = (float) $initial_value; |
|
35 | + $initial_value = (float)$initial_value; |
|
36 | 36 | } |
37 | 37 | if (!is_float($initial_value) && !is_int($initial_value)) { |
38 | 38 | throw new \UnexpectedValueException('Value not a float'); |
@@ -32,7 +32,7 @@ |
||
32 | 32 | public function __construct($initial_value = self::__default, $strict = true) { |
33 | 33 | parent::__construct($initial_value, $strict); |
34 | 34 | if (!$strict) { |
35 | - $initial_value = (string) $initial_value; |
|
35 | + $initial_value = (string)$initial_value; |
|
36 | 36 | } |
37 | 37 | if (!is_string($initial_value)) { |
38 | 38 | throw new \UnexpectedValueException('Value not a string'); |
@@ -32,7 +32,7 @@ |
||
32 | 32 | public function __construct($initial_value = self::__default, $strict = true) { |
33 | 33 | parent::__construct($initial_value, $strict); |
34 | 34 | if (!$strict) { |
35 | - $initial_value = (int) $initial_value; |
|
35 | + $initial_value = (int)$initial_value; |
|
36 | 36 | } |
37 | 37 | if (!is_int($initial_value)) { |
38 | 38 | throw new \UnexpectedValueException('Value not an integer'); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | } |
28 | 28 | $class = new \ReflectionClass($this); |
29 | 29 | if (!in_array($initial_value, $class->getConstants(), $strict)) { |
30 | - throw new \UnexpectedValueException('Value not a const in enum '.$class->getShortName()); |
|
30 | + throw new \UnexpectedValueException('Value not a const in enum ' . $class->getShortName()); |
|
31 | 31 | } |
32 | 32 | $this->__default = $initial_value; |
33 | 33 | } |
@@ -28,15 +28,15 @@ |
||
28 | 28 | public function test() |
29 | 29 | { |
30 | 30 | $test = new \Month; |
31 | - $this->assertEquals(\Month::__default, (string) $test); |
|
31 | + $this->assertEquals(\Month::__default, (string)$test); |
|
32 | 32 | unset($test); |
33 | 33 | |
34 | 34 | $test = new \Month(\Month::SEPTEMBER); |
35 | - $this->assertEquals(\Month::SEPTEMBER, (string) $test); |
|
35 | + $this->assertEquals(\Month::SEPTEMBER, (string)$test); |
|
36 | 36 | unset($test); |
37 | 37 | |
38 | 38 | $test = new \Month('1', false); |
39 | - $this->assertEquals(\Month::JANUARY, (string) $test); |
|
39 | + $this->assertEquals(\Month::JANUARY, (string)$test); |
|
40 | 40 | unset($test); |
41 | 41 | } |
42 | 42 |
@@ -20,13 +20,13 @@ |
||
20 | 20 | public function test() |
21 | 21 | { |
22 | 22 | $test = new SplInt(); |
23 | - $this->assertSame(0, (int) (string) $test); |
|
23 | + $this->assertSame(0, (int)(string)$test); |
|
24 | 24 | |
25 | 25 | $test = new SplInt(10); |
26 | - $this->assertSame(10, (int) (string) $test); |
|
26 | + $this->assertSame(10, (int)(string)$test); |
|
27 | 27 | |
28 | 28 | $test = new SplInt(10, false); |
29 | - $this->assertSame(10, (int) (string) $test); |
|
29 | + $this->assertSame(10, (int)(string)$test); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | public function test_unexpected_value_exception_float() |
@@ -20,15 +20,15 @@ |
||
20 | 20 | public function test() |
21 | 21 | { |
22 | 22 | $test = new SplBool; |
23 | - $this->assertFalse((bool) (string) $test); |
|
23 | + $this->assertFalse((bool)(string)$test); |
|
24 | 24 | unset($test); |
25 | 25 | |
26 | 26 | $test = new SplBool(true); |
27 | - $this->assertTrue((bool) (string) $test); |
|
27 | + $this->assertTrue((bool)(string)$test); |
|
28 | 28 | unset($test); |
29 | 29 | |
30 | 30 | $test = new SplBool(1, false); |
31 | - $this->assertTrue((bool) (string) $test); |
|
31 | + $this->assertTrue((bool)(string)$test); |
|
32 | 32 | unset($test); |
33 | 33 | } |
34 | 34 |
@@ -20,15 +20,15 @@ |
||
20 | 20 | public function test() |
21 | 21 | { |
22 | 22 | $test = new SplString; |
23 | - $this->assertSame('', (string) $test); |
|
23 | + $this->assertSame('', (string)$test); |
|
24 | 24 | unset($test); |
25 | 25 | |
26 | 26 | $test = new SplString('test'); |
27 | - $this->assertSame('test', (string) $test); |
|
27 | + $this->assertSame('test', (string)$test); |
|
28 | 28 | unset($test); |
29 | 29 | |
30 | 30 | $test = new SplString(0, false); |
31 | - $this->assertSame('0', (string) $test); |
|
31 | + $this->assertSame('0', (string)$test); |
|
32 | 32 | unset($test); |
33 | 33 | } |
34 | 34 |
@@ -20,15 +20,15 @@ |
||
20 | 20 | public function test() |
21 | 21 | { |
22 | 22 | $test = new SplFloat(); |
23 | - $this->assertSame(0.0, (float) (string) $test); |
|
23 | + $this->assertSame(0.0, (float)(string)$test); |
|
24 | 24 | unset($test); |
25 | 25 | |
26 | 26 | $test = new SplFloat(10.1); |
27 | - $this->assertSame(10.1, (float) (string) $test); |
|
27 | + $this->assertSame(10.1, (float)(string)$test); |
|
28 | 28 | unset($test); |
29 | 29 | |
30 | 30 | $test = new SplFloat(10.1, false); |
31 | - $this->assertSame(10.1, (float) (string) $test); |
|
31 | + $this->assertSame(10.1, (float)(string)$test); |
|
32 | 32 | unset($test); |
33 | 33 | } |
34 | 34 |