Your project uses non-strict array lookups 4

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

  1. // Note: For production, this should use ModeSelector's STOPWORDS constant
  2. // or be externalized to database (v2 improvement)
  3. $stopWords = ['the', 'a', 'an', 'and', 'or', 'but', 'in', 'on', 'at', 'to', 'for', 'new', 'official', 'original'];
  4. $words = explode(' ', $normalized);
  5. $words = array_filter($words, function($word) use ($stopWords) {
  6. return !in_array($word, $stopWords) && strlen($word) > 1;
    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. return implode(' ', $words);
  9. }
  • gyakutsuki

    no included
  1. $productsProcessed = $this->processLanguage($currentLanguage);
  2. $processedCount += $productsProcessed;
  3. // Move to next language if current is complete
  4. if ($productsProcessed < $this->batchSize) {
  5. $currentLanguageIndex = array_search($currentLanguage, array_column($languages, 'languages_id'));
    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 ($currentLanguageIndex !== false && isset($languages[$currentLanguageIndex + 1])) {
  7. $currentLanguage = $languages[$currentLanguageIndex + 1]['languages_id'];
  8. error_log("[ProcessSeoFaqBatch] Moving to next language: {$currentLanguage}");
  9. } else {
  • gyakutsuki

    no included
  1. }
  2. $method = strtoupper($_SERVER["REQUEST_METHOD"]);
  3. $allowedMethods = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'];
  4. if (!in_array($method, $allowedMethods)) {
    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. throw new Exception("Invalid HTTP method: " . $method);
  6. }
  7. return $method;
  8. }
  • gyakutsuki

    not implemented
  • gyakutsuki

    not included
  • gyakutsuki

    no included
  1. $flags['session_id'] = false;
  2. }
  3. // Security: Validate method against whitelist
  4. $allowed_methods = ['post', 'get'];
  5. $safe_method = in_array(strtolower($method ?? 'post'), $allowed_methods) ? strtolower($method) : 'post';
    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. // Security: Sanitize form action URL
  7. $safe_action = static::sanitizeUrl($action);
  8. $form = '<form name="' . static::outputProtected($name) . '" action="' . $safe_action . '" method="' . $safe_method . '"';
  • gyakutsuki

    no included

Your project should not contain PHP files defining multiple classes 2

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

This file contains 4 classes. Keeping only one class per file is a standard in the PHP community, since it promotes interoperability and maintainability.
Time to fix: about 1 day
Read doc Permalink Copy Prompt
Last edited by ClicShopping
  • McpException (defined at line 19)
  • McpConnectionException (defined at line 28)
  • McpProtocolException (defined at line 37)
  • McpConfigurationException (defined at line 46)
  • gyakutsuki

    Ignored on Mon, 29 Sep 2025 19:19:44 GMT
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 16)
  • explodeCategoryTree (defined at line 237)
  • gyakutsuki

    not updated