src/Bridge/Symfony/Container/Proxy/UnmanagedFactoryInstantiator.php
Method newInstance
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function newInstance(
object $instance,
array $factoryConfigs,
int $globalInstancesLimit
): object {
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private AccessInterceptorValueHolderFactory $proxyFactory,
private Instantiator $instantiator,
private ServicePoolContainer $servicePoolContainer,
private MutexFactory $limitLocking,
private MutexFactory $newInstanceLocking
Missing class import via use statement (line '59', column '23'). Open
Open
throw new \RuntimeException(sprintf('Factory methods missing for class %s', $instance::class));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '66', column '27'). Open
Open
throw new \RuntimeException(sprintf('Missing method %s in class %s', $factoryMethod, $instance::class));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Avoid unused parameters such as '$proxy'. Open
Open
object $proxy,
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Multi-line use declarations must define one parameter per line Open
Open
) use ($servicePoolContainer, $instantiator, $factoryConfig, $mutex, $globalInstancesLimit) {
- Exclude checks
Multi-line use declarations must define one parameter per line Open
Open
) use ($servicePoolContainer, $instantiator, $factoryConfig, $mutex, $globalInstancesLimit) {
- Exclude checks
Multi-line use declarations must define one parameter per line Open
Open
) use ($servicePoolContainer, $instantiator, $factoryConfig, $mutex, $globalInstancesLimit) {
- Exclude checks
Multi-line use declarations must define one parameter per line Open
Open
) use ($servicePoolContainer, $instantiator, $factoryConfig, $mutex, $globalInstancesLimit) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
private MutexFactory $newInstanceLocking
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
private AccessInterceptorValueHolderFactory $proxyFactory,
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
private Instantiator $instantiator,
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
private ServicePoolContainer $servicePoolContainer,
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
private MutexFactory $limitLocking,
- Exclude checks