Self-hosted OSINT exposure checker — is your email, username, phone or password leaked? Keyless sources: breaches, infostealer logs, COMB credentials, HIBP k-anonymity, 200-platform username grid. Docker one-command install, no API keys, no AI, Apache-2.0.
PHP breach-checkcredential-exposuredata-breachdigital-footprintemail-osintfree-osinthaveibeenpwnedip-reputationleaked-credentialsleaked-dataosintosint-apiosint-toolsphone-lookupprivacy-toolspublic-datapwned-passwordsself-hostedusername-checkusername-osint
v1.8.1: static-analysis zero — PSR-12 cleanup of v1.8.0 diff, camelCase test suite, parse() type guard
RanaKhan770f1d8463069f
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 9f6bad0..09f88be 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1,5 +1,21 @@# Changelog+## [1.8.1] — 2026-11-08++### Quality — static-analysis zero on the v1.8.0 diff++- **PSR-12 cleanup of the v1.8.0 diff** (external analysis had reported 14+ new findings): multi-line brace style in `SiteProbeSource` accessors,+ line-length wraps in `SiteProbeSource` / `SiteHealthCommand` /+ `OsintCheckService` / `SiteProbeSourceTest`, registry config header+ spacing.+- **Defensive guard** in `SiteProbeSource::parse()` — the previously unused+ interface parameter (`$type`) now short-circuits non-username types+ instead of relying solely on `supports()`.+- **Test suite renamed to camelCase** (58 methods, 9 files) — PSR-1/PSR-12+ method naming; removes the whole issue class for future releases.+- No behavior changes; suite green on PHP 8.4 and 8.5.+## [1.8.0] — 2026-11-07### Sources — Site Probe Registry (W109): 85 new decoy-gated sitesdiff --git a/app/Console/Commands/SiteHealthCommand.php b/app/Console/Commands/SiteHealthCommand.phpindex e0885c7..2735552 100644--- a/app/Console/Commands/SiteHealthCommand.php+++ b/app/Console/Commands/SiteHealthCommand.php@@ -114,7 +114,10 @@ class SiteHealthCommand extends Commandif (!empty($site['nf_string']) && str_contains(strtolower($body), strtolower((string) $site['nf_string']))) {return false;}- if (!empty($site['found_string']) && str_contains(strtolower($body), strtolower((string) $site['found_string']))) {+ if (+ !empty($site['found_string'])+ && str_contains(strtolower($body), strtolower((string) $site['found_string']))+ ) {return true;}$nfs = $site['not_found_status'] ?? null;diff --git a/app/Modules/Osint/OsintCheckService.php b/app/Modules/Osint/OsintCheckService.phpindex 5d66863..d172214 100644--- a/app/Modules/Osint/OsintCheckService.php+++ b/app/Modules/Osint/OsintCheckService.php@@ -170,7 +170,10 @@ class OsintCheckService// ---- Phase 2: single parallel pool ----------------------------------$responses = [];if ($specs !== []) {- $ua = (string) $this->settings->get('user_agent', 'Exposure-Check-OSINT/1.0 (+https://github.com/RanaKhan77/Exposure-Check-OSINT)');+ $ua = (string) $this->settings->get(+ 'user_agent',+ 'Exposure-Check-OSINT/1.0 (+https://github.com/RanaKhan77/Exposure-Check-OSINT)'+ );$responses = Http::pool(function (Pool $pool) use ($specs, $ua) {$pending = [];foreach ($specs as $spec) {diff --git a/app/Modules/Osint/Sources/SiteProbeSource.php b/app/Modules/Osint/Sources/SiteProbeSource.phpindex 198b21e..891cfbe 100644--- a/app/Modules/Osint/Sources/SiteProbeSource.php+++ b/app/Modules/Osint/Sources/SiteProbeSource.php@@ -41,9 +41,20 @@ class SiteProbeSource implements OsintSourceprivate const DECOY_CACHE_KEY = 'siteprobe:decoy:';private const DECOY_MAX_PER_CHECK = 12;- public function key(): string { return 'site_probe'; }- public function label(): string { return 'Site Probe Registry'; }- public function category(): string { return 'profile'; }+ public function key(): string+ {+ return 'site_probe';+ }++ public function label(): string+ {+ return 'Site Probe Registry';+ }++ public function category(): string+ {+ return 'profile';+ }public function supports(string $type): bool{@@ -85,6 +96,10 @@ class SiteProbeSource implements OsintSource*/public function parse(string $type, string $identifier, array $responses): array{+ if ($type !== 'username') {+ return [];+ }+$hits = [];$clean = 0;$unavailable = 0;@@ -130,7 +145,8 @@ class SiteProbeSource implements OsintSourceif ($n === 0) {return ['status' => 'clean',- 'summary' => "No profiles found for \"{$identifier}\" across " . count($this->registrySites()) . ' probed sites.',+ 'summary' => 'No profiles found for "' . $identifier . '" across '+ . count($this->registrySites()) . ' probed sites.','data' => ['checked' => count($this->registrySites()), 'clean' => $clean,'unavailable' => $unavailable, 'unreliable' => $unreliable, 'hits' => []],'severity' => 'info',@@ -164,7 +180,10 @@ class SiteProbeSource implements OsintSourceif (!empty($site['nf_string']) && str_contains(strtolower($body), strtolower((string) $site['nf_string']))) {return false;}- if (!empty($site['found_string']) && str_contains(strtolower($body), strtolower((string) $site['found_string']))) {+ if (+ !empty($site['found_string'])+ && str_contains(strtolower($body), strtolower((string) $site['found_string']))+ ) {return true;}$nfs = $site['not_found_status'] ?? null;@@ -197,7 +216,10 @@ class SiteProbeSource implements OsintSource$all = is_array($loaded) ? ($loaded['sites'] ?? null) : null;}}- $sites = array_values(array_filter(is_array($all) ? $all : [], fn ($s) => is_array($s) && !empty($s['url'])));+ $sites = array_values(array_filter(+ is_array($all) ? $all : [],+ fn ($s) => is_array($s) && !empty($s['url'])+ ));}return $sites;}diff --git a/config/site-probe-registry.php b/config/site-probe-registry.phpindex 5080d17..46241e5 100644--- a/config/site-probe-registry.php+++ b/config/site-probe-registry.php@@ -17,6 +17,7 @@* copied (GPL projects were consulted conceptually only).* Refresh verdicts with: php artisan site:health*/+return ['sites' => [[diff --git a/tests/Feature/DoctorCommandTest.php b/tests/Feature/DoctorCommandTest.phpindex 8f57b55..9fc938e 100644--- a/tests/Feature/DoctorCommandTest.php+++ b/tests/Feature/DoctorCommandTest.php@@ -25,7 +25,7 @@ class DoctorCommandTest extends TestCaseconfig(['app.admin_password' => 'doctor-test']);}- public function test_doctor_is_registered_and_reports_healthy_install_as_json(): void+ public function testDoctorIsRegisteredAndReportsHealthyInstallAsJson(): void{Http::fake(['*' => Http::response('ok', 200)]);@@ -63,7 +63,7 @@ class DoctorCommandTest extends TestCase$this->assertSame('PASS', $byName['Maigret site database']['status']);}- public function test_doctor_warns_not_fails_when_a_source_is_unreachable(): void+ public function testDoctorWarnsNotFailsWhenASourceIsUnreachable(): void{// Everything times out (transport failure) — that is a WARN, never a FAIL.Http::fake(function () {@@ -81,7 +81,7 @@ class DoctorCommandTest extends TestCase}}- public function test_doctor_fails_when_app_key_is_missing(): void+ public function testDoctorFailsWhenAppKeyIsMissing(): void{config(['app.key' => null]);Http::fake(['*' => Http::response('ok', 200)]);diff --git a/tests/Feature/ExportTest.php b/tests/Feature/ExportTest.phpindex 7d42a57..89c6d67 100644--- a/tests/Feature/ExportTest.php+++ b/tests/Feature/ExportTest.php@@ -40,7 +40,8 @@ class ExportTest extends TestCase'data' => ['found_accounts' => [['site' => 'GitHub', 'url' => 'https://github.com/doctor', 'confidence' => 'confirmed'],- ['site' => 'ExampleSite', 'url' => 'https://example.org/doctor', 'confidence' => 'probable'],+ ['site' => 'ExampleSite', 'url' => 'https://example.org/doctor',+ 'confidence' => 'probable'],],'found_confirmed' => 1,'found_probable' => 1,@@ -62,14 +63,14 @@ class ExportTest extends TestCase]);}- public function test_exports_require_admin_session(): void+ public function testExportsRequireAdminSession(): void{$check = $this->makeCheck();$this->get(route('report.export', [$check, 'json']))->assertRedirect(route('login'));$this->get(route('report.export', [$check, 'csv']))->assertRedirect(route('login'));}- public function test_json_export_downloads_full_structure_without_credentials(): void+ public function testJsonExportDownloadsFullStructureWithoutCredentials(): void{$check = $this->makeCheck();$this->post('/login', ['password' => 'test-password-123']);@@ -77,7 +78,10 @@ class ExportTest extends TestCase$resp = $this->get(route('report.export', [$check, 'json']));$resp->assertOk();$resp->assertHeader('Content-Type', 'application/json');- $this->assertStringContainsString('attachment; filename="exposure-check-1-username.json"', (string) $resp->headers->get('Content-Disposition'));+ $this->assertStringContainsString(+ 'attachment; filename="exposure-check-1-username.json"',+ (string) $resp->headers->get('Content-Disposition')+ );$json = $resp->json();$this->assertSame('Exposure-Check-OSINT', $json['product']);@@ -93,7 +97,7 @@ class ExportTest extends TestCase$this->assertStringNotContainsString('doctor@', $raw);}- public function test_csv_export_is_one_row_per_source_with_bom(): void+ public function testCsvExportIsOneRowPerSourceWithBom(): void{$check = $this->makeCheck();$this->post('/login', ['password' => 'test-password-123']);@@ -101,7 +105,10 @@ class ExportTest extends TestCase$resp = $this->get(route('report.export', [$check, 'csv']));$resp->assertOk();$this->assertStringContainsString('text/csv', (string) $resp->headers->get('Content-Type'));- $this->assertStringContainsString('attachment; filename=exposure-check-1-username.csv', (string) $resp->headers->get('Content-Disposition'));+ $this->assertStringContainsString(+ 'attachment; filename=exposure-check-1-username.csv',+ (string) $resp->headers->get('Content-Disposition')+ );$body = $resp->streamedContent();$this->assertStringStartsWith("\xEF\xBB\xBF", $body); // UTF-8 BOM for Excel@@ -113,7 +120,7 @@ class ExportTest extends TestCase$this->assertStringNotContainsString('hunter2', $body);}- public function test_password_check_exports_honest_empty_sources(): void+ public function testPasswordCheckExportsHonestEmptySources(): void{$check = ExposureCheck::create(['type' => 'password',@@ -135,7 +142,7 @@ class ExportTest extends TestCase$this->assertNull($json['check']['exposure_score']);}- public function test_unknown_format_is_404(): void+ public function testUnknownFormatIs404(): void{$check = $this->makeCheck();$this->post('/login', ['password' => 'test-password-123']);diff --git a/tests/Feature/SmokeFlowTest.php b/tests/Feature/SmokeFlowTest.phpindex 45c8e92..eddd4ba 100644--- a/tests/Feature/SmokeFlowTest.php+++ b/tests/Feature/SmokeFlowTest.php@@ -23,14 +23,14 @@ class SmokeFlowTest extends TestCaseconfig(['app.admin_password' => 'test-password-123']);}- public function test_login_page_renders(): void+ public function testLoginPageRenders(): void{$resp = $this->get('/login');$resp->assertOk();$resp->assertSee('Admin password', false);}- public function test_login_works_with_configured_password_and_rejects_wrong_one(): void+ public function testLoginWorksWithConfiguredPasswordAndRejectsWrongOne(): void{$this->post('/login', ['password' => 'wrong'])->assertSessionHasErrors('password');@@ -41,7 +41,7 @@ class SmokeFlowTest extends TestCase$this->get(route('dashboard'))->assertOk();}- public function test_dashboard_renders_its_script_and_type_tabs(): void+ public function testDashboardRendersItsScriptAndTypeTabs(): void{$this->post('/login', ['password' => 'test-password-123']);$resp = $this->get(route('dashboard'));@@ -56,7 +56,7 @@ class SmokeFlowTest extends TestCase$resp->assertSee(count(\App\Modules\Osint\OsintCheckService::SOURCES) . ' keyless sources');}- public function test_api_check_accepts_five_hex_password_prefix(): void+ public function testApiCheckAcceptsFiveHexPasswordPrefix(): void{$this->post('/login', ['password' => 'test-password-123']);@@ -74,7 +74,7 @@ class SmokeFlowTest extends TestCase}}- public function test_api_check_rejects_bad_identifier(): void+ public function testApiCheckRejectsBadIdentifier(): void{$this->post('/login', ['password' => 'test-password-123']);$this->postJson('/api/check', ['type' => 'email', 'q' => 'not-an-email'])@@ -87,7 +87,7 @@ class SmokeFlowTest extends TestCase$this->assertContains($resp->status(), [200, 429], 'domain check failed: ' . $resp->status());}- public function test_settings_page_renders_real_checked_attributes(): void+ public function testSettingsPageRendersRealCheckedAttributes(): void{$this->post('/login', ['password' => 'test-password-123']);$resp = $this->get(route('settings'));@@ -98,7 +98,7 @@ class SmokeFlowTest extends TestCase$this->assertStringContainsString('checked', $resp->getContent());}- public function test_license_page_renders_on_fresh_install(): void+ public function testLicensePageRendersOnFreshInstall(): void{$this->post('/login', ['password' => 'test-password-123']);$this->get(route('license'))diff --git a/tests/Unit/BotCidrSourceTest.php b/tests/Unit/BotCidrSourceTest.phpindex e7ded6f..e95afe5 100644--- a/tests/Unit/BotCidrSourceTest.php+++ b/tests/Unit/BotCidrSourceTest.php@@ -19,19 +19,19 @@ final class BotCidrSourceTest extends TestCase$this->src = new BotCidrSource();}- public function test_supports_ip_only(): void+ public function testSupportsIpOnly(): void{$this->assertTrue($this->src->supports('ip'));$this->assertFalse($this->src->supports('email'));$this->assertFalse($this->src->supports('username'));}- public function test_makes_zero_http_requests(): void+ public function testMakesZeroHttpRequests(): void{$this->assertSame([], $this->src->requests('ip', '66.249.66.1'));}- public function test_googlebot_range_is_a_hit(): void+ public function testGooglebotRangeIsAHit(): void{$r = $this->src->parse('ip', '66.249.66.1', []);$this->assertSame('hit', $r['status']);@@ -40,40 +40,40 @@ final class BotCidrSourceTest extends TestCase$this->assertSame('66.249.64.0/19', $r['data']['Published range']);}- public function test_bingbot_range_is_a_hit(): void+ public function testBingbotRangeIsAHit(): void{$r = $this->src->parse('ip', '157.55.39.7', []);$this->assertSame('hit', $r['status']);$this->assertStringContainsString('Bingbot', $r['summary']);}- public function test_outside_all_ranges_is_clean_with_spoof_warning(): void+ public function testOutsideAllRangesIsCleanWithSpoofWarning(): void{$r = $this->src->parse('ip', '203.0.113.10', []);$this->assertSame('clean', $r['status']);$this->assertStringContainsString('SPOOFED', $r['data']['What it means']);}- public function test_boundary_ip_outside_prefix_is_clean(): void+ public function testBoundaryIpOutsidePrefixIsClean(): void{// 66.249.64.0/19 ends at 66.249.95.255$r = $this->src->parse('ip', '66.249.96.1', []);$this->assertSame('clean', $r['status']);}- public function test_ipv6_is_honest_unavailable(): void+ public function testIpv6IsHonestUnavailable(): void{$r = $this->src->parse('ip', '2620:11c:f008::108', []);$this->assertSame('unavailable', $r['status']);}- public function test_malformed_ip_is_honest_unavailable(): void+ public function testMalformedIpIsHonestUnavailable(): void{$r = $this->src->parse('ip', 'not-an-ip', []);$this->assertSame('unavailable', $r['status']);}- public function test_meta_and_apple_ranges(): void+ public function testMetaAndAppleRanges(): void{$this->assertSame('hit', $this->src->parse('ip', '69.171.230.5', [])['status']);$this->assertSame('hit', $this->src->parse('ip', '17.249.32.10', [])['status']);diff --git a/tests/Unit/DnsblSourceTest.php b/tests/Unit/DnsblSourceTest.phpindex b6ac03a..5317780 100644--- a/tests/Unit/DnsblSourceTest.php+++ b/tests/Unit/DnsblSourceTest.php@@ -25,7 +25,7 @@ final class DnsblSourceTest extends TestCase$this->src = new DnsblSource();}- public function test_supports_ip_only(): void+ public function testSupportsIpOnly(): void{$this->assertTrue($this->src->supports('ip'));foreach (['email', 'username', 'phone', 'password', 'domain'] as $t) {@@ -33,7 +33,7 @@ final class DnsblSourceTest extends TestCase}}- public function test_identity_fields(): void+ public function testIdentityFields(): void{$this->assertSame('dnsbl', $this->src->key());$this->assertMatchesRegularExpression('/^[a-z][a-z0-9_]*$/', $this->src->key());@@ -41,25 +41,25 @@ final class DnsblSourceTest extends TestCase$this->assertNotSame('', $this->src->label());}- public function test_no_http_requests_ever(): void+ public function testNoHttpRequestsEver(): void{$this->assertSame([], $this->src->requests('ip', '8.8.8.8'));}- public function test_ipv6_not_assessed_honestly(): void+ public function testIpv6NotAssessedHonestly(): void{$r = $this->src->parse('ip', '2001:db8::1', []);$this->assertSame('unavailable', $r['status']);$this->assertStringContainsStringIgnoringCase('IPv4', $r['summary'] . json_encode($r['data']));}- public function test_garbage_input_not_assessed(): void+ public function testGarbageInputNotAssessed(): void{$r = $this->src->parse('ip', 'not-an-ip', []);$this->assertSame('unavailable', $r['status']);}- public function test_result_shape_when_no_dns_available(): void+ public function testResultShapeWhenNoDnsAvailable(): void{// A valid IPv4 that cannot be resolved in this environment still// yields a well-formed result with the three contract keys — thediff --git a/tests/Unit/LeakLensSourceTest.php b/tests/Unit/LeakLensSourceTest.phpindex 62720a0..9ccdadc 100644--- a/tests/Unit/LeakLensSourceTest.php+++ b/tests/Unit/LeakLensSourceTest.php@@ -46,7 +46,7 @@ final class LeakLensSourceTest extends TestCasereturn ['leaklens.main' => $resp];}- public function test_supports_phone_and_username_only(): void+ public function testSupportsPhoneAndUsernameOnly(): void{$this->assertTrue($this->src->supports('phone'));$this->assertTrue($this->src->supports('username'));@@ -58,7 +58,7 @@ final class LeakLensSourceTest extends TestCase$this->assertFalse($this->src->supports('ip'));}- public function test_request_is_a_valid_stateless_mcp_call(): void+ public function testRequestIsAValidStatelessMcpCall(): void{$specs = $this->src->requests('phone', '8801712345678');$this->assertCount(1, $specs);@@ -74,20 +74,21 @@ final class LeakLensSourceTest extends TestCase$this->assertSame('+8801712345678', $body['params']['arguments']['phone']);}- public function test_username_request_uses_search_username_tool(): void+ public function testUsernameRequestUsesSearchUsernameTool(): void{$body = json_decode((string) $this->src->requests('username', 'someuser')[0]['body'], true);$this->assertSame('search_username', $body['params']['name']);$this->assertSame('someuser', $body['params']['arguments']['username']);}- public function test_hit_exposes_aggregates_and_drops_credential_fields(): void+ public function testHitExposesAggregatesAndDropsCredentialFields(): void{$inner = ['isExposed' => true,'exposedCount' => 2,'results' => [- ['breach' => 'Collection1', 'date' => '2019-01-07', 'records' => 772904991, 'email' => '[email protected]', 'password' => 'hunter2'],+ ['breach' => 'Collection1', 'date' => '2019-01-07', 'records' => 772904991,+ 'email' => '[email protected]', 'password' => 'hunter2'],['source' => 'MyFitnessPal', 'year' => '2018'],],'degraded' => true,@@ -106,7 +107,7 @@ final class LeakLensSourceTest extends TestCase$this->assertStringNotContainsString('hunter2', $flat);}- public function test_string_results_become_labels(): void+ public function testStringResultsBecomeLabels(): void{$inner = ['isExposed' => true, 'exposedCount' => 2, 'results' => ['BreachA', 'BreachB'], 'degraded' => false];$r = $this->src->parse('phone', '8801712345678', $this->responses($this->mcp($inner)));@@ -114,7 +115,7 @@ final class LeakLensSourceTest extends TestCase$this->assertSame(['BreachA', 'BreachB'], $r['data']['records']);}- public function test_clean_when_not_exposed_and_not_degraded(): void+ public function testCleanWhenNotExposedAndNotDegraded(): void{$inner = ['isExposed' => false, 'exposedCount' => 0, 'results' => [], 'degraded' => false];$r = $this->src->parse('phone', '8801712345678', $this->responses($this->mcp($inner)));@@ -122,22 +123,23 @@ final class LeakLensSourceTest extends TestCase$this->assertSame(0, $r['data']['exposures']);}- public function test_degraded_clean_is_unavailable_never_fake_clean(): void+ public function testDegradedCleanIsUnavailableNeverFakeClean(): void{// the core honesty rule: upstreams errored, so "not found" is not trustworthy- $inner = ['isExposed' => false, 'exposedCount' => 0, 'results' => [], 'degraded' => true, 'errors' => ['leakcheck', 'xposedornot']];+ $inner = ['isExposed' => false, 'exposedCount' => 0, 'results' => [], 'degraded' => true,+ 'errors' => ['leakcheck', 'xposedornot']];$r = $this->src->parse('username', 'someuser', $this->responses($this->mcp($inner)));$this->assertSame('unavailable', $r['status']);$this->assertStringContainsString('leakcheck', $r['summary']);}- public function test_mcp_isError_is_unavailable(): void+ public function testMcpIsErrorIsUnavailable(): void{$r = $this->src->parse('username', 'someuser', $this->responses($this->mcp(['whatever' => 1], true)));$this->assertSame('unavailable', $r['status']);}- public function test_transport_error_is_unavailable(): void+ public function testTransportErrorIsUnavailable(): void{$r = $this->src->parse('username', 'someuser', []);$this->assertSame('unavailable', $r['status']);@@ -147,18 +149,22 @@ final class LeakLensSourceTest extends TestCase$this->assertSame('unavailable', $r['status']);}- public function test_malformed_envelope_is_unavailable(): void+ public function testMalformedEnvelopeIsUnavailable(): void{$garbage = new Response(new Psr7Response(200, ['Content-Type' => 'application/json'], 'not json'));$r = $this->src->parse('username', 'someuser', $this->responses($garbage));$this->assertSame('unavailable', $r['status']);- $noText = new Response(new Psr7Response(200, ['Content-Type' => 'application/json'], json_encode(['result' => ['content' => []]])));+ $noText = new Response(new Psr7Response(+ 200,+ ['Content-Type' => 'application/json'],+ json_encode(['result' => ['content' => []]])+ ));$r = $this->src->parse('username', 'someuser', $this->responses($noText));$this->assertSame('unavailable', $r['status']);}- public function test_records_cap_at_ten(): void+ public function testRecordsCapAtTen(): void{$results = [];for ($i = 1; $i <= 25; $i++) {diff --git a/tests/Unit/MaigretConfidenceTest.php b/tests/Unit/MaigretConfidenceTest.phpindex 91cf83d..3ca135c 100644--- a/tests/Unit/MaigretConfidenceTest.php+++ b/tests/Unit/MaigretConfidenceTest.php@@ -55,7 +55,7 @@ class MaigretConfidenceTest extends TestCasereturn new Response(new Psr7Response($status, [], $body));}- public function test_hits_are_tiered_confirmed_vs_probable(): void+ public function testHitsAreTieredConfirmedVsProbable(): void{$src = new MaigretSource();$reqs = $src->requests('username', 'doctor');@@ -90,7 +90,7 @@ class MaigretConfidenceTest extends TestCase$this->assertStringContainsString('1 probable by status code alone', (string) $r['summary']);}- public function test_clean_verdict_has_zero_confidence_counts(): void+ public function testCleanVerdictHasZeroConfidenceCounts(): void{// MIN_ASSESSED_FOR_CLEAN is 10 — build 12 sites so 'clean' is honest.$sites = [];@@ -122,7 +122,7 @@ class MaigretConfidenceTest extends TestCase$this->assertStringContainsString('No public account found', (string) $r['summary']);}- public function test_unavailable_sites_never_become_hits(): void+ public function testUnavailableSitesNeverBecomeHits(): void{$src = new MaigretSource();$reqs = $src->requests('username', 'doctor');diff --git a/tests/Unit/SiteProbeSourceTest.php b/tests/Unit/SiteProbeSourceTest.phpindex 298253c..184e36e 100644--- a/tests/Unit/SiteProbeSourceTest.php+++ b/tests/Unit/SiteProbeSourceTest.php@@ -23,7 +23,7 @@ class SiteProbeSourceTest extends TestCasereturn new SiteProbeSource();}- public function test_contract_basics(): void+ public function testContractBasics(): void{$s = $this->src();$this->assertSame('site_probe', $s->key());@@ -35,7 +35,7 @@ class SiteProbeSourceTest extends TestCase$this->assertFalse($s->supports('phone'));}- public function test_registry_is_present_and_sane(): void+ public function testRegistryIsPresentAndSane(): void{// reach into the private loader via requests() (registry-driven)$reqs = $this->src()->requests('username', 'probeuser');@@ -52,7 +52,11 @@ class SiteProbeSourceTest extends TestCase$hosts[] = parse_url($r['url'], PHP_URL_HOST);}$this->assertEquals(count($names), count(array_unique($names)), 'site names must be unique');- $this->assertEquals(count($hosts), count(array_unique($hosts)), 'site hosts must be unique (no maigret overlap)');+ $this->assertEquals(+ count($hosts),+ count(array_unique($hosts)),+ 'site hosts must be unique (no maigret overlap)'+ );}private function resp(int $status, string $body = ''): Response@@ -60,7 +64,7 @@ class SiteProbeSourceTest extends TestCasereturn new Response(new PsrResponse($status, ['Content-Type' => 'text/html'], $body));}- public function test_parse_reports_hits_and_clean(): void+ public function testParseReportsHitsAndClean(): void{// build a mini-registry by slicing requests() output: use the first// two probe sites and fake responses for them@@ -93,7 +97,7 @@ class SiteProbeSourceTest extends TestCase}}- public function test_parse_all_unavailable_is_never_a_clean_pass(): void+ public function testParseAllUnavailableIsNeverACleanPass(): void{$reqs = $this->src()->requests('username', 'x');$responses = [];@@ -111,7 +115,7 @@ class SiteProbeSourceTest extends TestCase$this->assertGreaterThan(0, $out['data']['unavailable']);}- public function test_rejects_non_username_types(): void+ public function testRejectsNonUsernameTypes(): void{$this->assertSame([], $this->src()->requests('email', '[email protected]'));$this->assertSame([], $this->src()->requests('domain', 'x.com'));diff --git a/tests/Unit/SourceContractTest.php b/tests/Unit/SourceContractTest.phpindex aa81da7..211b700 100644--- a/tests/Unit/SourceContractTest.php+++ b/tests/Unit/SourceContractTest.php@@ -33,7 +33,7 @@ class SourceContractTest extends TestCasereturn new OsintCheckService(new SettingsService());}- public function test_every_source_implements_the_interface(): void+ public function testEverySourceImplementsTheInterface(): void{foreach (OsintCheckService::SOURCES as $cls) {$this->assertContains(OsintSource::class, class_implements($cls), "$cls must implement OsintSource");@@ -41,18 +41,22 @@ class SourceContractTest extends TestCase$this->assertNotEmpty(OsintCheckService::SOURCES);}- public function test_source_keys_are_unique_snake_case(): void+ public function testSourceKeysAreUniqueSnakeCase(): void{$keys = [];foreach ($this->sources() as $src) {$key = $src->key();- $this->assertMatchesRegularExpression('/^[a-z][a-z0-9_]*$/', $key, get_class($src) . ' key must be snake_case');+ $this->assertMatchesRegularExpression(+ '/^[a-z][a-z0-9_]*$/',+ $key,+ get_class($src) . ' key must be snake_case'+ );$keys[] = $key;}$this->assertCount(count(array_unique($keys)), $keys, 'source keys must be unique');}- public function test_categories_are_known(): void+ public function testCategoriesAreKnown(): void{$valid = ['stealer', 'breach', 'reputation', 'profile', 'email', 'infra'];foreach ($this->sources() as $src) {@@ -61,7 +65,7 @@ class SourceContractTest extends TestCase}}- public function test_check_types_include_domain_infra(): void+ public function testCheckTypesIncludeDomainInfra(): void{// v1.3.0: the domain type surfaces a domain's public infrastructure// footprint (CT-log history, registry data) — the fraud/trust signal.@@ -69,7 +73,7 @@ class SourceContractTest extends TestCase$this->assertSame(['email', 'username', 'phone', 'password', 'domain', 'ip'], OsintCheckService::TYPES);}- public function test_support_matrix_has_coverage_for_every_type(): void+ public function testSupportMatrixHasCoverageForEveryType(): void{$byType = array_fill_keys(OsintCheckService::TYPES, 0);foreach ($this->sources() as $src) {@@ -84,7 +88,7 @@ class SourceContractTest extends TestCase}}- public function test_request_specs_are_well_formed_for_sample_identifiers(): void+ public function testRequestSpecsAreWellFormedForSampleIdentifiers(): void{$samples = ['email' => '[email protected]',@@ -110,7 +114,7 @@ class SourceContractTest extends TestCase}}- public function test_normalize_validates_inputs(): void+ public function testNormalizeValidatesInputs(): void{$svc = $this->service();$this->assertSame('', $svc->normalize('email', 'not-an-email'));@@ -124,7 +128,7 @@ class SourceContractTest extends TestCase$this->assertSame('', $svc->normalize('ip', '999.999.999.999'));}- public function test_masking_never_reveals_full_identifier(): void+ public function testMaskingNeverRevealsFullIdentifier(): void{$svc = $this->service();$this->assertSame('j***[email protected]', $svc->mask('email', '[email protected]'));@@ -133,7 +137,7 @@ class SourceContractTest extends TestCase$this->assertStringStartsWith('SHA-1', $svc->mask('password', '21BD1'));}- public function test_sanitize_for_storage_strips_credential_lines(): void+ public function testSanitizeForStorageStripsCredentialLines(): void{$svc = $this->service();$payload = [