1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-22 15:07:44 +00:00
Files
matomo/tests/PHPUnit/Framework/Mock/FakeSiteContentDetector.php
Stefan Giehl 6199cd6f6c [Coding Style] Enable rules Squiz.Functions.MultiLineFunctionDeclaration.* (#21838)
* [Coding Style] Enable rules Squiz.Functions.MultiLineFunctionDeclaration.*

* Apply CS

* apply review feedback

Co-authored-by: Marc Neudert <marc@innocraft.com>

---------

Co-authored-by: Marc Neudert <marc@innocraft.com>
2024-01-23 17:49:30 +01:00

29 خطوط
831 B
PHP

<?php
namespace Piwik\Tests\Framework\Mock;
use Piwik\SiteContentDetector;
class FakeSiteContentDetector extends SiteContentDetector
{
public function __construct($detectedContentDetections = [], $connectedConsentManagers = [])
{
foreach ($detectedContentDetections as $detectedContentDetection) {
$class = $this->getSiteContentDetectionById($detectedContentDetection);
$this->detectedContent[$class::getContentType()][$detectedContentDetection] = true;
}
$this->connectedConsentManagers = $connectedConsentManagers;
parent::__construct();
}
public function detectContent(
array $detectContent = [],
?int $idSite = null,
?array $siteResponse = null,
int $timeOut = 60
): void {
// skip any detections
}
}