Completed
Push — master ( dc8e13...469e0e )
by
unknown
02:22
created

AbstractProcessor::_getBaseName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 7
Ratio 100 %

Importance

Changes 0
Metric Value
dl 7
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Elastica\Processor;
4
5
use Elastica\Param;
6
use Elastica\Util;
7
8
/**
9
 * Elastica Processor object.
10
 *
11
 * @author Federico Panini <[email protected]>
12
 *
13
 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-processors.html
14
 */
15 View Code Duplication
abstract class AbstractProcessor extends Param
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
16
{
17
    protected function _getBaseName()
18
    {
19
        $shortName = (new \ReflectionClass($this))->getShortName();
20
        $shortName = \preg_replace('/Processor$/', '', $shortName);
21
22
        return Util::toSnakeCase($shortName);
23
    }
24
}
25