Your project uses non-strict array lookups 2

More information: https://insight.symfony.com/what-we-analyse/php.strict_array_lookup

  1. public function uninstall()
  2. {
  3. parent::uninstall();
  4. $installed = explode(';', MODULE_MODULES_CHATGPT_INSTALLED);
  5. $installed_pos = array_search($this->app->vendor . '\\' . $this->app->code . '\\' . $this->code, $installed);
    array_search() should be called with the third parameter set to true to enable strict comparison and avoid type juggling bugs.
    Time to fix: about 15 minutes
    Read doc Permalink Copy Prompt
    Last edited by clicshopping
  6. if ($installed_pos !== false) {
  7. unset($installed[$installed_pos]);
  8. $this->app->saveCfgParam('MODULE_MODULES_CHATGPT_INSTALLED', implode(';', $installed));
  • gyakutsuki

    not implemented
  • gyakutsuki

    not included
  • gyakutsuki

    no included
  • gyakutsuki

    no implemented
  1. public function uninstall()
  2. {
  3. parent::uninstall();
  4. $installed = explode(';', MODULE_MODULES_CHATGPT_INSTALLED);
  5. $installed_pos = array_search($this->app->vendor . '\\' . $this->app->code . '\\' . $this->code, $installed);
    array_search() should be called with the third parameter set to true to enable strict comparison and avoid type juggling bugs.
    Time to fix: about 15 minutes
    Read doc Permalink Copy Prompt
    Last edited by clicshopping
  6. if ($installed_pos !== false) {
  7. unset($installed[$installed_pos]);
  8. $this->app->saveCfgParam('MODULE_MODULES_CHATGPT_INSTALLED', implode(';', $installed));
  • gyakutsuki

    not implemented
  • gyakutsuki

    not included
  • gyakutsuki

    no included
  • gyakutsuki

    no implemented

Your project uses legacy callable syntax instead of first-class callable syntax 2

More information: https://insight.symfony.com/what-we-analyse/php.use_first_class_callable_syntax

  1. }
  2. $prefix = CLICSHOPPING::getConfig('db_table_prefix');
  3. // Remove prefix and '_embedding' suffix to get entity type
  4. $entityType = str_replace([$prefix, '_embedding'], '', $tableName);
    Use the first-class callable syntax ($this->method(...))
    Time to fix: about 15 minutes
    Read doc Permalink Copy Prompt
    Last edited by clicshopping
  5. // Get ID column for this entity type
  6. $idColumn = $this->getIdColumnForEntityType($entityType);
  7. // Cache the result
  • gyakutsuki

    change but there are false posittive
  • gyakutsuki

    false positive
  1. public function getEntityTypeForTable(string $tableName): string
  2. {
  3. $prefix = CLICSHOPPING::getConfig('db_table_prefix');
  4. // Remove prefix and '_embedding' suffix
  5. $entityType = str_replace([$prefix, '_embedding'], '', $tableName);
    Use the first-class callable syntax ($this->method(...))
    Time to fix: about 15 minutes
    Read doc Permalink Copy Prompt
    Last edited by clicshopping
  6. return $entityType;
  7. }
  8. /**
  • gyakutsuki

    change but there are false posittive
  • gyakutsuki

    false positive