Skip to content

Commit

Permalink
Review comment changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioannis committed Sep 19, 2025
1 parent babc1a0 commit a44d8fb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion app/src/Controller/Component/RegistryAuthComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@

namespace App\Controller\Component;

use App\Model\Entity;
use \App\Lib\Enum\AuthenticationEventEnum;
use \App\Lib\Enum\SuspendableStatusEnum;
use \App\Lib\Enum\TemplateableStatusEnum;
Expand Down
6 changes: 3 additions & 3 deletions app/src/Lib/Util/StringUtilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public static function columnKey(

// Otherwise look for the general key
$cfield = __d('field', $c);
return ($cfield !== $c) ? $cfield : \Cake\Utility\Inflector::humanize($c);
return ($cfield !== $c) ? $cfield : Inflector::humanize($c);
}

/**
Expand Down Expand Up @@ -188,7 +188,7 @@ public static function pluginToTextDomain(?string $plugin): string
if (empty($plugin)) {
return 'operation';
}
return \Cake\Utility\Inflector::singularize(\Cake\Utility\Inflector::tableize($plugin));
return Inflector::underscore($plugin);
}

/**
Expand Down Expand Up @@ -407,7 +407,7 @@ public static function localizeController(string $controllerName, ?string $plugi

if ($pluginName) {
// Localize via plugin
return __d(\Cake\Utility\Inflector::underscore($pluginName), 'controller.' . $controllerName, [$plural ? 99 : 1]);
return __d(Inflector::underscore($pluginName), 'controller.' . $controllerName, [$plural ? 99 : 1]);
}
// Standard Localization
return __d('controller', $controllerName, [$plural ? 99 : 1]);
Expand Down
4 changes: 1 addition & 3 deletions app/src/View/Helper/FieldHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ public function calculateLabelAndDescription(string $fieldName): array
$label = null;

// First, try to autogenerate the field label (if we weren't given one).
$pluginDomain = (!empty($this->getPluginName())
? Inflector::underscore($this->getPluginName())
: null);
$pluginDomain = StringUtilities::pluginToTextDomain($this->getPluginName());

$modelName = $this->getModelName();
// We try to automagically determine if a description for the field exists by
Expand Down

0 comments on commit a44d8fb

Please sign in to comment.