The class RendererAbstract has an overall complexity of 69 which is very high. The configured complexity threshold is 50.
abstract class RendererAbstract
{
use TranslatableTrait;
public \Throwable $exception;
Avoid excessively long variable names like $instanceWithoutConstructorCache. Keep variable name length under 20.
$instanceWithoutConstructorCache = new class {
Avoid excessively long variable names like $traceReflectionProperty. Keep variable name length under 20.
$traceReflectionProperty = new \ReflectionProperty(parent::class, 'trace');
Avoid excessively long variable names like $collectionTraitHelper. Keep variable name length under 20.
$collectionTraitHelper = new class {
Avoid excessively long variable names like $dataProviderAnnotation. Keep variable name length under 20.
foreach ($annotations['method']['dataProvider'] ?? [] as $dataProviderAnnotation) {
Avoid excessively long variable names like $traceReflectionProperty. Keep variable name length under 20.
$traceReflectionProperty = new \ReflectionProperty($e instanceof \Exception ? \Exception::class : \Error::class, 'trace');
Avoid excessively long variable names like $paramsReflectionProperty. Keep variable name length under 20.
$paramsReflectionProperty = new \ReflectionProperty(CoreException::class, 'params');
Avoid excessively long variable names like $metadataDataProviders. Keep variable name length under 20.
$metadataDataProviders = [];
Avoid using short method names like RendererAbstract::_(). The configured minimum method name length is 3.
public function _(string $message, array $parameters = [], ?string $domain = null, ?string $locale = null): string
{
return $this->adapter
? $this->adapter->_($message, $parameters, $domain, $locale)
: Translator::instance()->_($message, $parameters, $domain, $locale);
Avoid using short method names like Translator::_(). The configured minimum method name length is 3.
public function _(string $message, array $parameters = [], ?string $domain = null, ?string $locale = null): string
{
return $this->getAdapter()->_($message, $parameters, $domain ?? $this->defaultDomain, $locale ?? $this->defaultLocale);
}
Avoid using short method names like TranslatableTrait::_(). The configured minimum method name length is 3.
public function _(string $message, array $parameters = [], ?string $domain = null, ?string $locale = null): string
{
if (TraitUtil::hasAppScopeTrait($this) && $this->issetApp() && method_exists($this->getApp(), '_')) {
return $this->getApp()->_($message, $parameters, $domain, $locale);
}
Avoid using short method names like ITranslatorAdapter::_(). The configured minimum method name length is 3.
public function _(string $message, array $parameters = [], ?string $domain = null, ?string $locale = null): string;
Avoid using short method names like Generic::_(). The configured minimum method name length is 3.
public function _(string $message, array $parameters = [], ?string $domain = null, ?string $locale = null): string
{
$definition = $this->getDefinition($message, $domain ?? 'atk', $locale ?? 'en');
if ($definition === null) {
Avoid using undefined variables such as '$processedMethods' which will lead to PHP notices.
if (!isset($staticClass::$processedMethods[$key])) {
Avoid using undefined variables such as '$processedMethods' which will lead to PHP notices.
$staticClass::$processedMethods[$key] = true;
Avoid variables with short names like $d2. Configured minimum length is 3.
$d2 = array_diff($bt, $this->_previousTrace[$trace]);
Avoid variables with short names like $fx. Configured minimum length is 3.
private function _makeHookDynamicFx(?\Closure $getFxThisFx, \Closure $fx, bool $isShort): \Closure
Avoid variables with short names like $e. Configured minimum length is 3.
private function releaseObjectsFromExceptionTrace(\Throwable $e): void
Avoid variables with short names like $s. Configured minimum length is 3.
public function readableCaption(string $s): string
Avoid variables with short names like $bt. Configured minimum length is 3.
$bt = [];