protected function getCleanedTransfomerCode(string $transformerCode)
    {
        $match = preg_match('/([^#]+)(#[\d]+)?/', $transformerCode, $parts);

        if (1 === $match && $this->transformerRegistry->hasTransformer($parts[1])) {
            return $parts[1];
        }

        return $transformerCode;
    }
protected function getCleanedTransfomerCode(string $transformerCode)
    {
        $match = preg_match('/([^#]+)(#[\d]+)?/', $transformerCode, $parts);

        if (1 === $match && $this->transformerRegistry->hasTransformer($parts[1])) {
            return $parts[1];
        }

        return $transformerCode;
    }
protected function getCleanedTransfomerCode ( string $ transformerCode ) { $ match = preg_match ( '/([^#]+)(#[\d]+)?/' , $ transformerCode , $ parts ) ; if ( 1 === $ match && $ this -> transformerRegistry -> hasTransformer ( $ parts [ 1 ] ) ) { return $ parts [ 1 ] ; } return $ transformerCode ; }
This allows to use transformer codes suffixes to avoid limitations to the "transformers" option using codes as
keys This way you can chain multiple times the same transformer. Without this, it would silently call only the
1st one.

@example
transformers:
callback#1:
callback: array_filter
callback#2:
callback: array_reverse


@param string $transformerCode

@throws \CleverAge\ProcessBundle\Exception\MissingTransformerException

@return string
This allows to use transformer codes suffixes to avoid limitations to the transformers option using codes as keys This way you can chain multiple times the same transformer . Without this it would silently call only the 1st one .