DoctrineRepositoryFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A createDefinition() 0 10 1
1
<?php
2
3
namespace Knp\RadBundle\DependencyInjection\Definition;
4
5
use Symfony\Component\DependencyInjection\Definition;
6
7
class DoctrineRepositoryFactory
8
{
9
    public function createDefinition($className)
10
    {
11
        $definition = new Definition();
12
        $definition->setClass('Doctrine\Common\Persistence\ObjectRepository');
13
        $definition->setFactoryService('doctrine');
0 ignored issues
show
Deprecated Code introduced by
The method Symfony\Component\Depend...on::setFactoryService() has been deprecated with message: since version 2.6, to be removed in 3.0.

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
14
        $definition->setFactoryMethod('getRepository');
0 ignored issues
show
Deprecated Code introduced by
The method Symfony\Component\Depend...ion::setFactoryMethod() has been deprecated with message: since version 2.6, to be removed in 3.0.

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
15
        $definition->setArguments(array($className));
16
17
        return $definition;
18
    }
19
}
20