DoctrineRepositoryFactory::createDefinition()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 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