Skip to content

Commit 5d39eb4

Browse files
committed
Fix
1 parent 85f4fa8 commit 5d39eb4

5 files changed

Lines changed: 6 additions & 8 deletions

File tree

src/Kernel/Mnemonics/_fdiv.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
namespace PHPJava\Kernel\Mnemonics;
33

4-
use PHPJava\Kernel\Types\_Double;
54
use PHPJava\Utilities\BinaryTool;
65
use PHPJava\Utilities\Extractor;
76

src/Kernel/Mnemonics/_idiv.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
namespace PHPJava\Kernel\Mnemonics;
33

4-
use PHPJava\Kernel\Types\_Double;
54
use PHPJava\Kernel\Types\_Int;
65
use PHPJava\Utilities\BinaryTool;
76
use PHPJava\Utilities\Extractor;

src/Kernel/Types/Type.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public function __construct($value)
2929

3030
/**
3131
* @param $value
32-
* @return Type
3332
* @throws TypeException
33+
* @return Type
3434
*/
3535
public static function get($value)
3636
{

src/Utilities/TypeResolver.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,14 +311,14 @@ public static function convertPHPTypeToJavaType($value)
311311
return new _String($value);
312312
case 'int':
313313
case 'integer':
314-
return new _Int($value);
314+
return _Int::get($value);
315315
case 'bool':
316316
case 'boolean':
317-
return new _Boolean($value);
317+
return _Boolean::get($value);
318318
case 'float':
319-
return new _Float($value);
319+
return _Float::get($value);
320320
case 'double':
321-
return new _Double($value);
321+
return _Double::get($value);
322322
case 'object':
323323
return $value;
324324
case 'array':

tests/CastTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function testIntToChar()
9393

9494
// check type
9595
$this->assertInstanceOf(_Char::class, $result);
96-
$this->assertEquals("{", (string) $result);
96+
$this->assertEquals('{', (string) $result);
9797
}
9898

9999
public function testLongToDouble()

0 commit comments

Comments
 (0)