Your project uses non-strict array lookups 5
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.strict_array_lookup
- exit;
- }
- // Validate feedback_type
- $validTypes = ['positive', 'negative', 'correction'];
- if (!in_array($input['feedback_type'], $validTypes)) {
- echo json_encode([
- 'success' => false,
- 'error' => 'feedback_type must be one of: ' . implode(', ', $validTypes)
- ]);
- exit;
- public function uninstall()
- {
- parent::uninstall();
- $installed = explode(';', MODULE_MODULES_COMPLIANCE_POLICY_RULES_INSTALLED);
- $installed_pos = array_search($this->app->vendor . '\\' . $this->app->code . '\\' . $this->code, $installed);
- if ($installed_pos !== false) {
- unset($installed[$installed_pos]);
- $this->app->saveCfgParam('MODULE_MODULES_COMPLIANCE_POLICY_RULES_INSTALLED', implode(';', $installed));
- public function uninstall()
- {
- parent::uninstall();
- $installed = explode(';', MODULE_MODULES_COMPLIANCE_POLICY_RULES_INSTALLED);
- $installed_pos = array_search($this->app->vendor . '\\' . $this->app->code . '\\' . $this->code, $installed);
- if ($installed_pos !== false) {
- unset($installed[$installed_pos]);
- $this->app->saveCfgParam('MODULE_MODULES_COMPLIANCE_POLICY_RULES_INSTALLED', implode(';', $installed));
- public function uninstall()
- {
- parent::uninstall();
- $installed = explode(';', MODULE_MODULES_COMPLIANCE_POLICY_RULES_INSTALLED);
- $installed_pos = array_search($this->app->vendor . '\\' . $this->app->code . '\\' . $this->code, $installed);
- if ($installed_pos !== false) {
- unset($installed[$installed_pos]);
- $this->app->saveCfgParam('MODULE_MODULES_COMPLIANCE_POLICY_RULES_INSTALLED', implode(';', $installed));
- $Qcheck = $CLICSHOPPING_Db->get('configuration', 'configuration_value', ['configuration_key' => 'TEMPLATE_BLOCK_GROUPS']);
- if ($Qcheck->fetch() !== false) {
- $tbgroups_array = explode(';', $Qcheck->value('configuration_value'));
- if (!\in_array($module_type, $tbgroups_array)) {
- $tbgroups_array[] = $module_type;
- sort($tbgroups_array);
- $CLICSHOPPING_Db->save('configuration', [
- 'configuration_value' => implode(';', $tbgroups_array),
Your project should not contain PHP files defining multiple classes
- Read doc
- Productivity
- Info
More information: https://insight.symfony.com/what-we-analyse/php.file_contains_more_than_one_class
Your project uses legacy callable syntax instead of first-class callable syntax 2
- Read doc
- Productivity
- Info
More information: https://insight.symfony.com/what-we-analyse/php.use_first_class_callable_syntax
- */
- private function deriveNameFromTable(string $tableName): string
- {
- $prefix = CLICSHOPPING::getConfig('db_table_prefix');
- return str_replace([$prefix, '_embedding'], '', $tableName);
- }
- /**
- * Classify every known table as entity / satellite / system
- *
- substr($result, 0, 100)
- ));
- }
- // Extract usage metrics.
- $lastResponse = is_callable([$chat, 'getLastResponse']) ? $chat->getLastResponse() : null;
- if (!is_null($lastResponse) && isset($lastResponse['usage'])) {
- self::$lastTokenUsage = [
- 'prompt_tokens' => $lastResponse['usage']['prompt_tokens'] ?? 0,
- 'completion_tokens' => $lastResponse['usage']['completion_tokens'] ?? 0,