Files
clinicpro/graphify-out/cache/ast/v0.8.44/6eca57bd6f1e720d0c8649acded03d3a6f5434544bfb6f6cafaab3e462d542ea.json
T
hamed 87f4d1695f Add CorsRegexEnvProcessor and corresponding tests
- Implemented CorsRegexEnvProcessor to build CORS origin regex from a comma-separated host list (ALLOWED_FRONTEND_HOSTS).
- Added tests for CorsRegexEnvProcessor to validate regex generation and matching behavior.
- Created JSON files for AST representation of the new classes and tests.
2026-07-07 14:58:41 +03:30

1 line
14 KiB
JSON

{"nodes": [{"id": "users_hamed_pj_my_pj_clinic_pro_clinicpro_tests_shared_corsregexenvprocessortest_php", "label": "CorsRegexEnvProcessorTest.php", "file_type": "code", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L1"}, {"id": "shared_corsregexenvprocessortest_corsregexenvprocessortest", "label": "CorsRegexEnvProcessorTest", "file_type": "code", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L8"}, {"id": "testcase", "label": "TestCase", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "shared_corsregexenvprocessortest_corsregexenvprocessortest_regexfor", "label": ".regexFor()", "file_type": "code", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L10"}, {"id": "shared_corsregexenvprocessortest_corsregexenvprocessortest_originmatches", "label": ".originMatches()", "file_type": "code", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L17"}, {"id": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testallowslistedhostshttpsandsubdomains", "label": ".testAllowsListedHostsHttpsAndSubdomains()", "file_type": "code", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L22"}, {"id": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testallowshttpandportforlocaldev", "label": ".testAllowsHttpAndPortForLocalDev()", "file_type": "code", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L30"}, {"id": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testrejectsunlistedandlookalikehosts", "label": ".testRejectsUnlistedAndLookalikeHosts()", "file_type": "code", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L38"}, {"id": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testdotisescapednotwildcard", "label": ".testDotIsEscapedNotWildcard()", "file_type": "code", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L48"}, {"id": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testemptylistmatchesnothing", "label": ".testEmptyListMatchesNothing()", "file_type": "code", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L56"}, {"id": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testprovidedtype", "label": ".testProvidedType()", "file_type": "code", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L64"}], "edges": [{"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_tests_shared_corsregexenvprocessortest_php", "target": "corsregexenvprocessor", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L5", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_tests_shared_corsregexenvprocessortest_php", "target": "testcase", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L6", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_tests_shared_corsregexenvprocessortest_php", "target": "shared_corsregexenvprocessortest_corsregexenvprocessortest", "relation": "contains", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L8", "weight": 1.0}, {"source": "shared_corsregexenvprocessortest_corsregexenvprocessortest", "target": "testcase", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L8", "weight": 1.0}, {"source": "shared_corsregexenvprocessortest_corsregexenvprocessortest", "target": "shared_corsregexenvprocessortest_corsregexenvprocessortest_regexfor", "relation": "method", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L10", "weight": 1.0}, {"source": "shared_corsregexenvprocessortest_corsregexenvprocessortest", "target": "shared_corsregexenvprocessortest_corsregexenvprocessortest_originmatches", "relation": "method", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L17", "weight": 1.0}, {"source": "shared_corsregexenvprocessortest_corsregexenvprocessortest", "target": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testallowslistedhostshttpsandsubdomains", "relation": "method", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L22", "weight": 1.0}, {"source": "shared_corsregexenvprocessortest_corsregexenvprocessortest", "target": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testallowshttpandportforlocaldev", "relation": "method", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L30", "weight": 1.0}, {"source": "shared_corsregexenvprocessortest_corsregexenvprocessortest", "target": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testrejectsunlistedandlookalikehosts", "relation": "method", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L38", "weight": 1.0}, {"source": "shared_corsregexenvprocessortest_corsregexenvprocessortest", "target": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testdotisescapednotwildcard", "relation": "method", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L48", "weight": 1.0}, {"source": "shared_corsregexenvprocessortest_corsregexenvprocessortest", "target": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testemptylistmatchesnothing", "relation": "method", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L56", "weight": 1.0}, {"source": "shared_corsregexenvprocessortest_corsregexenvprocessortest", "target": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testprovidedtype", "relation": "method", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L64", "weight": 1.0}, {"source": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testallowslistedhostshttpsandsubdomains", "target": "shared_corsregexenvprocessortest_corsregexenvprocessortest_regexfor", "relation": "calls", "context": "call", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L24", "weight": 1.0}, {"source": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testallowslistedhostshttpsandsubdomains", "target": "shared_corsregexenvprocessortest_corsregexenvprocessortest_originmatches", "relation": "calls", "context": "call", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L26", "weight": 1.0}, {"source": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testallowshttpandportforlocaldev", "target": "shared_corsregexenvprocessortest_corsregexenvprocessortest_regexfor", "relation": "calls", "context": "call", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L32", "weight": 1.0}, {"source": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testallowshttpandportforlocaldev", "target": "shared_corsregexenvprocessortest_corsregexenvprocessortest_originmatches", "relation": "calls", "context": "call", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L34", "weight": 1.0}, {"source": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testrejectsunlistedandlookalikehosts", "target": "shared_corsregexenvprocessortest_corsregexenvprocessortest_regexfor", "relation": "calls", "context": "call", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L40", "weight": 1.0}, {"source": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testrejectsunlistedandlookalikehosts", "target": "shared_corsregexenvprocessortest_corsregexenvprocessortest_originmatches", "relation": "calls", "context": "call", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L42", "weight": 1.0}, {"source": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testdotisescapednotwildcard", "target": "shared_corsregexenvprocessortest_corsregexenvprocessortest_regexfor", "relation": "calls", "context": "call", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L50", "weight": 1.0}, {"source": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testdotisescapednotwildcard", "target": "shared_corsregexenvprocessortest_corsregexenvprocessortest_originmatches", "relation": "calls", "context": "call", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L53", "weight": 1.0}, {"source": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testemptylistmatchesnothing", "target": "shared_corsregexenvprocessortest_corsregexenvprocessortest_regexfor", "relation": "calls", "context": "call", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L58", "weight": 1.0}, {"source": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testemptylistmatchesnothing", "target": "shared_corsregexenvprocessortest_corsregexenvprocessortest_originmatches", "relation": "calls", "context": "call", "confidence": "EXTRACTED", "source_file": "tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L60", "weight": 1.0}], "raw_calls": [{"caller_nid": "shared_corsregexenvprocessortest_corsregexenvprocessortest_regexfor", "callee": "getEnv", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L13", "receiver": null}, {"caller_nid": "shared_corsregexenvprocessortest_corsregexenvprocessortest_originmatches", "callee": "preg_match", "is_member_call": false, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L19", "receiver": null}, {"caller_nid": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testallowslistedhostshttpsandsubdomains", "callee": "assertTrue", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L26", "receiver": null}, {"caller_nid": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testallowslistedhostshttpsandsubdomains", "callee": "assertTrue", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L27", "receiver": null}, {"caller_nid": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testallowshttpandportforlocaldev", "callee": "assertTrue", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L34", "receiver": null}, {"caller_nid": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testallowshttpandportforlocaldev", "callee": "assertTrue", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L35", "receiver": null}, {"caller_nid": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testrejectsunlistedandlookalikehosts", "callee": "assertFalse", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L42", "receiver": null}, {"caller_nid": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testrejectsunlistedandlookalikehosts", "callee": "assertFalse", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L44", "receiver": null}, {"caller_nid": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testrejectsunlistedandlookalikehosts", "callee": "assertFalse", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L45", "receiver": null}, {"caller_nid": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testdotisescapednotwildcard", "callee": "assertFalse", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L53", "receiver": null}, {"caller_nid": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testemptylistmatchesnothing", "callee": "assertFalse", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L60", "receiver": null}, {"caller_nid": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testemptylistmatchesnothing", "callee": "assertFalse", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L61", "receiver": null}, {"caller_nid": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testprovidedtype", "callee": "assertSame", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L66", "receiver": null}, {"caller_nid": "shared_corsregexenvprocessortest_corsregexenvprocessortest_testprovidedtype", "callee": "CorsRegexEnvProcessor", "is_member_call": false, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/tests/Shared/CorsRegexEnvProcessorTest.php", "source_location": "L66", "receiver": null}]}