Skip to content

Commit 139c233

Browse files
committed
Apply code fix rules
1 parent a858b51 commit 139c233

File tree

651 files changed

+7143
-11340
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

651 files changed

+7143
-11340
lines changed

src/Core/JVM/AccessorInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
interface AccessorInterface
88
{
99
public function getFields(): FieldInterface;
10+
1011
public function getMethods(): InvokerInterface;
1112
}

src/Core/JVM/ConstantPool.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ class ConstantPool implements \ArrayAccess, \Countable, \IteratorAggregate
2727
private $reader;
2828

2929
/**
30-
* @param ReaderInterface $reader
31-
* @param int $entries
3230
* @throws ReadEntryException
3331
*/
3432
public function __construct(ReaderInterface $reader, int $entries)
@@ -98,7 +96,7 @@ private function read($entryTag): ?StructureInterface
9896
}
9997

10098
/**
101-
* @return boolean
99+
* @return bool
102100
*/
103101
public function offsetExists($offset)
104102
{

src/Core/JVM/Field/FieldGettable.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
<?php
22
namespace PHPJava\Core\JVM\Field;
33

4-
use PHPJava\Core\JavaClassInvoker;
54
use PHPJava\Packages\java\lang\_String;
65
use PHPJava\Packages\java\lang\NoSuchFieldException;
76

87
trait FieldGettable
98
{
109
/**
1110
* @param $name
12-
* @return mixed
1311
* @throws NoSuchFieldException
1412
*/
1513
public function get(string $name)

src/Core/JVM/Field/FieldInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
interface FieldInterface
77
{
88
public function __construct(JavaClassInvoker $javaClassInvoker, array $fields);
9+
910
public function get(string $name);
11+
1012
public function set(string $name, $value);
1113
}

src/Core/JVM/Field/FieldSettable.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<?php
22
namespace PHPJava\Core\JVM\Field;
33

4-
use PHPJava\Core\JavaClassInvoker;
5-
64
trait FieldSettable
75
{
86
public function set(string $name, $value)

src/Core/JVM/Field/StaticField.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
namespace PHPJava\Core\JVM\Field;
33

44
use PHPJava\Core\JavaClassInvoker;
5-
use PHPJava\Packages\java\lang\_String;
65

76
class StaticField implements FieldInterface
87
{

src/Core/JVM/FieldPool.php

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

4-
use PHPJava\Core\JavaClass;
54
use PHPJava\Core\Stream\Reader\ReaderInterface;
65
use PHPJava\Exceptions\ReadOnlyException;
76
use PHPJava\Kernel\Structures\_FieldInfo;

src/Core/JVM/InterfacePool.php

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

4-
use PHPJava\Core\JavaClass;
54
use PHPJava\Core\Stream\Reader\ReaderInterface;
65
use PHPJava\Exceptions\ReadOnlyException;
76
use PHPJava\Utilities\DebugTool;

src/Core/JVM/Invoker/Invokable.php

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,30 @@
22
namespace PHPJava\Core\JVM\Invoker;
33

44
use ByteUnits\Metric;
5-
use Monolog\Handler\StreamHandler;
6-
use Monolog\Logger;
7-
use PHPJava\Core\JavaClass;
85
use PHPJava\Core\JavaClassInvoker;
96
use PHPJava\Core\JVM\Cache\OperationCache;
107
use PHPJava\Core\JVM\FlexibleMethod;
118
use PHPJava\Core\JVM\Parameters\GlobalOptions;
9+
use PHPJava\Core\JVM\Parameters\Runtime;
1210
use PHPJava\Core\JVM\Stream\BinaryReader;
1311
use PHPJava\Exceptions\IllegalJavaClassException;
1412
use PHPJava\Exceptions\RuntimeException;
1513
use PHPJava\Exceptions\UndefinedMethodException;
1614
use PHPJava\Exceptions\UndefinedOpCodeException;
17-
use PHPJava\Kernel\Provider\DependencyInjectionProvider;
18-
use PHPJava\Packages\java\lang\NoSuchMethodException;
19-
use PHPJava\Kernel\Attributes\AttributeInfo;
20-
use PHPJava\Kernel\Attributes\AttributeInterface;
2115
use PHPJava\Kernel\Attributes\CodeAttribute;
2216
use PHPJava\Kernel\Core\Accumulator;
2317
use PHPJava\Kernel\Core\ConstantPool;
2418
use PHPJava\Kernel\Maps\OpCode;
2519
use PHPJava\Kernel\Mnemonics\OperationInterface;
20+
use PHPJava\Kernel\Provider\DependencyInjectionProvider;
2621
use PHPJava\Kernel\Structures\_MethodInfo;
2722
use PHPJava\Kernel\Types\_Char;
23+
use PHPJava\Packages\java\lang\NoSuchMethodException;
2824
use PHPJava\Utilities\AttributionResolver;
2925
use PHPJava\Utilities\DebugTool;
3026
use PHPJava\Utilities\Formatter;
3127
use PHPJava\Utilities\SuperClassResolver;
3228
use PHPJava\Utilities\TypeResolver;
33-
use PHPJava\Core\JVM\Parameters\Runtime;
3429

3530
trait Invokable
3631
{
@@ -39,7 +34,6 @@ trait Invokable
3934
private $options = [];
4035
private $debugTool;
4136

42-
4337
public function __construct(JavaClassInvoker $javaClassInvoker, array $methods, array $options = [])
4438
{
4539
$this->javaClassInvoker = $javaClassInvoker;
@@ -51,11 +45,8 @@ public function __construct(JavaClassInvoker $javaClassInvoker, array $methods,
5145
);
5246
}
5347

54-
5548
/**
56-
* @param string $name
5749
* @param mixed ...$arguments
58-
* @return null
5950
* @throws IllegalJavaClassException
6051
* @throws RuntimeException
6152
* @throws UndefinedOpCodeException
@@ -238,7 +229,7 @@ function ($item) {
238229
}
239230

240231
/**
241-
* @var OperationInterface|Accumulator|ConstantPool $executor
232+
* @var Accumulator|ConstantPool|OperationInterface $executor
242233
*/
243234
$executor = $operationCache->fetchOrPush(
244235
$fullName,
@@ -299,7 +290,6 @@ public function has(string $name): bool
299290
/**
300291
* @param $name
301292
* @param mixed ...$arguments
302-
* @return _MethodInfo
303293
* @throws NoSuchMethodException
304294
* @throws UndefinedMethodException
305295
* @throws \PHPJava\Exceptions\TypeException
@@ -371,7 +361,6 @@ private function findMethod($name, ...$arguments): _MethodInfo
371361

372362
/**
373363
* @param mixed ...$arguments
374-
* @return string
375364
*/
376365
private function stringifyArguments(...$arguments): string
377366
{

src/Core/JVM/Invoker/InvokerInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
interface InvokerInterface
77
{
88
public function __construct(JavaClassInvoker $javaClassInvoker, array $methods);
9+
910
public function call(string $name, ...$arguments);
11+
1012
public function isDynamic(): bool;
13+
1114
public function getList(): array;
15+
1216
public function has(string $name): bool;
1317
}

0 commit comments

Comments
 (0)