Your project uses non-strict array lookups 9

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

  1. ];
  2. // Validate mode_hint if present
  3. if ($validatedIntent['mode_hint'] !== null) {
  4. $validModeHints = ['mode_a', 'mode_b', 'mode_c', 'hybrid'];
  5. if (!in_array($validatedIntent['mode_hint'], $validModeHints)) {
    in_array() 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. $validatedIntent['mode_hint'] = null;
  7. }
  8. }
  9. // Normalize target_site to lowercase
  • gyakutsuki

    no included
  • gyakutsuki

    no implemented
  • gyakutsuki

    in_array true not implemented
  1. if ($intent === null || !is_array($intent)) {
  2. return null;
  3. }
  4. // Validate required fields
  5. if (!isset($intent['intent']) || !in_array($intent['intent'], ['comparative_lookup', 'entity_discovery', 'market_research', 'trend_analysis'])) {
    in_array() 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. return null;
  7. }
  8. // Ensure all fields exist with defaults
  9. $validatedIntent = [
  1. exit;
  2. }
  3. // Validate feedback_type
  4. $validTypes = ['positive', 'negative', 'correction'];
  5. if (!in_array($input['feedback_type'], $validTypes)) {
    in_array() 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. echo json_encode([
  7. 'success' => false,
  8. 'error' => 'feedback_type must be one of: ' . implode(', ', $validTypes)
  9. ]);
  10. exit;
  • gyakutsuki

    not implemented
  • gyakutsuki

    not included
  • gyakutsuki

    no included
  • gyakutsuki

    no implemented
  • gyakutsuki

    in_array true not implemented
  1. $Qcheck = $CLICSHOPPING_Db->get('configuration', 'configuration_value', ['configuration_key' => 'TEMPLATE_BLOCK_GROUPS']);
  2. if ($Qcheck->fetch() !== false) {
  3. $tbgroups_array = explode(';', $Qcheck->value('configuration_value'));
  4. if (!\in_array($module_type, $tbgroups_array)) {
    in_array() 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
  5. $tbgroups_array[] = $module_type;
  6. sort($tbgroups_array);
  7. $CLICSHOPPING_Db->save('configuration', [
  8. 'configuration_value' => implode(';', $tbgroups_array),
  • gyakutsuki

    not implemented
  • gyakutsuki

    not included
  • gyakutsuki

    no included
  • gyakutsuki

    no implemented
  • gyakutsuki

    in_array true not implemented
  1. // Extract totals from the order totals array
  2. $ht = $tva = $ttc = 0.0;
  3. foreach ($totals as $t) {
  4. $val = (float)str_replace(',', '.', preg_replace('/[^0-9.,\-]/', '', strip_tags($t['text'] ?? '0')));
  5. $c = $t['class'] ?? '';
  6. if (in_array($c, ['ot_subtotal', 'ST'])) $ht = $val;
    in_array() 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
  7. if (in_array($c, ['ot_tax', 'TX'])) $tva = $val;
  8. if (in_array($c, ['ot_total', 'TO'])) $ttc = $val;
  9. }
  10. // Fallback: compute HT from product lines if ot_subtotal not found
  • gyakutsuki

    not included
  • gyakutsuki

    no included
  • gyakutsuki

    no implemented
  • gyakutsuki

    in_array true not implemented
  1. foreach ($totals as $t) {
  2. $val = (float)str_replace(',', '.', preg_replace('/[^0-9.,\-]/', '', strip_tags($t['text'] ?? '0')));
  3. $c = $t['class'] ?? '';
  4. if (in_array($c, ['ot_subtotal', 'ST'])) $ht = $val;
  5. if (in_array($c, ['ot_tax', 'TX'])) $tva = $val;
  6. if (in_array($c, ['ot_total', 'TO'])) $ttc = $val;
    in_array() 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
  7. }
  8. // Fallback: compute HT from product lines if ot_subtotal not found
  9. if ($ht == 0.0) {
  10. foreach ($products as $p) {
  • gyakutsuki

    not included
  • gyakutsuki

    no included
  • gyakutsuki

    no implemented
  • gyakutsuki

    in_array true not implemented
  1. $ht = $tva = $ttc = 0.0;
  2. foreach ($totals as $t) {
  3. $val = (float)str_replace(',', '.', preg_replace('/[^0-9.,\-]/', '', strip_tags($t['text'] ?? '0')));
  4. $c = $t['class'] ?? '';
  5. if (in_array($c, ['ot_subtotal', 'ST'])) $ht = $val;
  6. if (in_array($c, ['ot_tax', 'TX'])) $tva = $val;
    in_array() 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
  7. if (in_array($c, ['ot_total', 'TO'])) $ttc = $val;
  8. }
  9. // Fallback: compute HT from product lines if ot_subtotal not found
  10. if ($ht == 0.0) {
  • gyakutsuki

    not included
  • gyakutsuki

    no included
  • gyakutsuki

    no implemented
  • gyakutsuki

    in_array true not implemented
  1. * @return void
  2. */
  3. public static function render(string $type, \FPDF $pdf, object $order, array $extra): void
  4. {
  5. // Validate type
  6. if (!in_array($type, ['invoice', 'packingslip'])) {
    in_array() 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
  7. throw new InvalidArgumentException('Invalid PDF type. Must be "invoice" or "packingslip".');
  8. }
  9. // Include the renderer class if not already loaded
  10. if (!class_exists('PDF_Invoice')) {
  • gyakutsuki

    in_array true not implemented
  1. 'open-mistral-nemo',
  2. 'open-codestral-mamba',
  3. 'mistral-moderation-latest'
  4. ];
  5. if (empty($model) || !in_array($model, $valid_models)) {
    in_array() 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. $model = 'mistral-large-latest';
  7. }
  8. $config = new MistralAIConfig();
  9. $config->apiKey = $api_key;

Your project should not contain PHP files defining multiple classes

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

This file contains 2 classes. Keeping only one class per file is a standard in the PHP community, since it promotes interoperability and maintainability.
Time to fix: about 4 hours
Read doc Permalink Copy Prompt
Collective
  • he_header_multi_template (defined at line 14)
  • explodeCategoryTree (defined at line 236)
  • gyakutsuki

    Ignored on Mon, 29 Jun 2026 11:01:47 GMT

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

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

  1. {
  2. self::$queue[] = ['task' => $task, 'label' => $label];
  3. if (!self::$registered) {
  4. self::$registered = true;
  5. register_shutdown_function([self::class, 'flushAndRun']);
    Use the first-class callable syntax ($this->method(...))
    Time to fix: about 15 minutes
    Read doc Permalink Copy Prompt
    Last edited by clicshopping
  6. }
  7. }
  8. /**
  9. * Shutdown handler: flush the response to the client (PHP-FPM), then drain the queue.