Your project must not contain invalid PHP files
- Read doc
- Reliability
- Critical
More information: https://insight.symfony.com/what-we-analyse/php.php_syntax_error
- DomainConfig::loadLanguageFile('rag_result_interpreter');
- $array = [
- 'question' => $question,
- 'results' => json_encode($cleanResults, JSON_PRETTY_PRINT)
- 'currentDate' => date('Y-m-d')
- ];
- $prompt = $this->language->getDef('text_interpret_results', $array);
- if ($this->debug) {
Your project uses non-strict array lookups 18
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.strict_array_lookup
- }
- // ============================================================================
- // 3. Reset Database Query Cache
- // ============================================================================
- if (in_array('database', $cacheTypes)) {
- try {
- $db = Registry::get('Db');
- $prefix = CLICSHOPPING::getConfig('db_table_prefix');
- // Count entries before
- }
- // ============================================================================
- // 9. Reset Embedding Cache
- // ============================================================================
- if (in_array('embedding', $cacheTypes)) {
- try {
- // Count embedding cache files before (new location)
- $embeddingCacheDir = CLICSHOPPING::getConfig('dir_root', 'Shop') . 'Work/Cache/Rag/Embedding/';
- $filesBefore = 0;
- }
- // ============================================================================
- // 13. Reset Embeddings Cache (PHASE 2 - NewVector cache)
- // ============================================================================
- if (in_array('embeddings', $cacheTypes)) {
- try {
- $embeddingsCacheDir = CLICSHOPPING::getConfig('dir_root', 'Shop') . 'Work/Cache/Rag/Embeddings/';
- $filesBefore = 0;
- if (is_dir($embeddingsCacheDir)) {
- }
- // ============================================================================
- // 17. Reset Config Cache
- // ============================================================================
- if (in_array('config', $cacheTypes)) {
- try {
- $configCacheDir = CLICSHOPPING::getConfig('dir_root', 'Shop') . 'Work/Cache/Rag/Config/';
- $filesBefore = 0;
- if (is_dir($configCacheDir)) {
- }
- // ============================================================================
- // 7. Reset Translation Ambiguity Cache
- // ============================================================================
- if (in_array('translation_ambiguity', $cacheTypes)) {
- try {
- // Count translation ambiguity cache files before (new location)
- $translationAmbiguityCacheDir = CLICSHOPPING::getConfig('dir_root', 'Shop') . 'Work/Cache/Rag/Translation/';
- $filesBefore = 0;
- }
- // ============================================================================
- // 15. Reset Security Cache
- // ============================================================================
- if (in_array('security', $cacheTypes)) {
- try {
- $securityCacheDir = CLICSHOPPING::getConfig('dir_root', 'Shop') . 'Work/Cache/Rag/Security/';
- $filesBefore = 0;
- if (is_dir($securityCacheDir)) {
- }
- // ============================================================================
- // 8.5. Reset Memory Cache (file-based)
- // ============================================================================
- if (in_array('memory', $cacheTypes)) {
- try {
- $memoryCacheDir = CLICSHOPPING::getConfig('dir_root', 'Shop') . 'Work/Cache/Rag/Memory/';
- $filesBefore = 0;
- if (is_dir($memoryCacheDir)) {
- }
- // ============================================================================
- // 12. Reset Semantic Query Cache (TASK 8: Multi-temporal query caching)
- // ============================================================================
- if (in_array('semantic', $cacheTypes)) {
- try {
- // Count hybrid cache files before
- $semanticCacheDir = CLICSHOPPING::getConfig('dir_root', 'Shop') . 'Work/Cache/Rag/Semantic/';
- $filesBefore = 0;
- }
- // ============================================================================
- // 8. Reset Context Cache
- // ============================================================================
- if (in_array('context', $cacheTypes)) {
- try {
- // Count context cache files before (new location)
- $contextCacheDir = CLICSHOPPING::getConfig('dir_root', 'Shop') . 'Work/Cache/Rag/Context/';
- $filesBefore = 0;
- }
- // ============================================================================
- // 5. Reset Intent Classification Cache (TASK 5.1.7.6)
- // ============================================================================
- if (in_array('intent', $cacheTypes)) {
- try {
- // Count intent cache files before (new location - all files)
- $intentCacheDir = CLICSHOPPING::getConfig('dir_root', 'Shop') . 'Work/Cache/Rag/Intent/';
- $filesBefore = 0;
- }
- // ============================================================================
- // 16. Reset Reputation Cache
- // ============================================================================
- if (in_array('reputation', $cacheTypes)) {
- try {
- $reputationCacheDir = CLICSHOPPING::getConfig('dir_root', 'Shop') . 'Work/Cache/Rag/Reputation/';
- $filesBefore = 0;
- if (is_dir($reputationCacheDir)) {
- }
- // ============================================================================
- // 10. Reset EmbeddingSearch Cache
- // ============================================================================
- if (in_array('embedding_search', $cacheTypes)) {
- try {
- // Count embedding search cache files before (new location)
- $embeddingSearchCacheDir = CLICSHOPPING::getConfig('dir_root', 'Shop') . 'Work/Cache/Rag/EmbeddingSearch/';
- $filesBefore = 0;
- }
- // ============================================================================
- // 4. Reset Schema Query Cache (TASK 5 - ITEM 1)
- // ============================================================================
- if (in_array('schema', $cacheTypes)) {
- try {
- // Count schema cache files before (new location)
- $schemaCacheDir = CLICSHOPPING::getConfig('dir_root', 'Shop') . 'Work/Cache/Rag/SchemaQuery/';
- $filesBefore = 0;
- }
- // ============================================================================
- // 3. Reset Classification Cache
- // ============================================================================
- if (in_array('classification', $cacheTypes)) {
- try {
- $classificationCache = new ClassificationCache();
- // Get stats before
- $statsBefore = $classificationCache->getStatistics();
- }
- // ============================================================================
- // 14. Reset SQL Query Cache (PHASE 4)
- // ============================================================================
- if (in_array('sql', $cacheTypes)) {
- try {
- $sqlCacheDir = CLICSHOPPING::getConfig('dir_root', 'Shop') . 'Work/Cache/Rag/SQL/';
- $filesBefore = 0;
- if (is_dir($sqlCacheDir)) {
- }
- // ============================================================================
- // 6. Reset Ambiguity Cache (TASK 4 - Cache Migration)
- // ============================================================================
- if (in_array('ambiguity', $cacheTypes)) {
- try {
- // Count ambiguity cache files before (new location - all files)
- $ambiguityCacheDir = CLICSHOPPING::getConfig('dir_root', 'Shop') . 'Work/Cache/Rag/Ambiguity/';
- $filesBefore = 0;
- $errors = [];
- // ============================================================================
- // 1. Reset Translation Cache
- // ============================================================================
- if (in_array('translations', $cacheTypes)) {
- try {
- $translationCache = new TranslationCache();
- // Count files before
- $cacheDir = CLICSHOPPING::getConfig('dir_root', 'Shop') . 'Work/Cache/Rag/Translation/';
- }
- // ============================================================================
- // 11. Reset Hybrid Query Cache (TASK 8: Multi-temporal query caching)
- // ============================================================================
- if (in_array('hybrid', $cacheTypes)) {
- try {
- // Count hybrid cache files before
- $hybridCacheDir = CLICSHOPPING::getConfig('dir_root', 'Shop') . 'Work/Cache/Rag/Hybrid/';
- $filesBefore = 0;