Showing 22 of 122 total issues
Method buildTcaArray
has 178 lines of code (exceeds 40 allowed). Consider refactoring. Open
protected function buildTcaArray(): array
{
return [
'ctrl' => $this->getCtrl(),
EntityEmailNotification
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
class EntityEmailNotification extends EntityNotification implements
EmailNotification,
CustomSettingsNotification,
Creatable,
Editable,
Method addDefaultTypo3Columns
has 82 lines of code (exceeds 40 allowed). Consider refactoring. Open
private function addDefaultTypo3Columns()
{
$defaultColumns = [
'sys_language_uid' => [
'exclude' => 1,
Method addCommonColumns
has 69 lines of code (exceeds 40 allowed). Consider refactoring. Open
private function addCommonColumns()
{
$commonColumns = [
'title' => [
'exclude' => 1,
Method buildTcaArray
has 60 lines of code (exceeds 40 allowed). Consider refactoring. Open
protected function buildTcaArray(): array
{
return [
'ctrl' => $this->getDefaultCtrl(),
Function buildDefinition
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function buildDefinition(): ConfigurationObjectInstance
{
if (null === $this->definitionObject) {
if ($this->cacheService->has(NotizConstants::CACHE_KEY_DEFINITION_OBJECT)) {
$this->definitionObject = $this->cacheService->get(NotizConstants::CACHE_KEY_DEFINITION_OBJECT);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method registerBackendModule
has 48 lines of code (exceeds 40 allowed). Consider refactoring. Open
protected function registerBackendModule()
{
ExtensionUtility::registerModule(
'CuyZ.Notiz',
'notiz',
Function getDropDownFromDefinition
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function getDropDownFromDefinition(): string
{
$view = $this->getFluidTemplateObject('Backend/ToolBar/NotificationToolBarDropDown');
if (!$this->definitionService->getValidationResult()->hasErrors()) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function doLocalize
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function doLocalize(string $path, array $arguments = []): string
{
if (false === strpos($path, ':')) {
$possiblePaths = $this->getPossiblePaths('locallang', $path);
} elseif (strpos($path, 'LLL:') === 0) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function channelsSupportNotifications
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function channelsSupportNotifications()
{
foreach ($this->definition->getNotifications() as $notification) {
foreach ($notification->getChannels() as $channelDefinition) {
$path = 'notifications.' . $notification->getIdentifier() . '.channels.' . $channelDefinition->getIdentifier();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function process
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function process(...$arguments)
{
$notifications = $this->notificationDispatcher->fetchNotifications($this->eventDefinition);
foreach ($notifications as $notification => $dispatchCallback) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
EventDefinition $eventDefinition,
EventFactory $eventFactory,
NotificationDispatcher $notificationDispatcher,
Dispatcher $signalDispatcher,
ExtensionConfigurationService $extensionConfigurationService
Method compile
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function compile($argumentsName, $closureName, &$initializationPhpCode, ViewHelperNode $node, TemplateCompiler $compiler)
Function fillPropertyDefinition
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function fillPropertyDefinition(PropertyDefinition $definition)
{
if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '9.0.0', '<')) {
$this->fillPropertyDefinitionLegacy($definition);
return;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function doList
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function doList(array &$parameters)
{
foreach ($this->formPersistenceManager->listForms() as $form) {
$persistenceIdentifier = $form['persistenceIdentifier'];
$formDefinition = $this->formPersistenceManager->load($persistenceIdentifier);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function fillPropertyDefinitionLegacy
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function fillPropertyDefinitionLegacy(PropertyDefinition $definition)
{
$identifier = $this->getPropertyTagIdentifier($definition);
/** @var ClassReflection $eventReflection */
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function fetchSettingsClassName
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected static function fetchSettingsClassName(array $data): array
{
$notificationClassName = $data['className'] ?? null;
if (class_exists($notificationClassName)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getSlotValue
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function getSlotValue(array $arguments, RenderingContextInterface $renderingContext): string
{
self::$currentVariableContainer = $renderingContext->getViewHelperVariableContainer();
$result = '';
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function mapRecipients
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function mapRecipients(array $recipientsIdentifiers): array
{
$recipients = [];
foreach ($this->eventRecipients as $recipient) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getDefaultFiles
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function getDefaultFiles(): array
{
$defaultFiles = [
NotizConstants::TYPOSCRIPT_PATH . 'Channel/Channels.Default.typoscript',
NotizConstants::TYPOSCRIPT_PATH . 'Notification/Notifications.typoscript',
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"