20 lines
532 B
PHP
20 lines
532 B
PHP
<?php
|
|
|
|
namespace App\Services\Drift\Normalizers;
|
|
|
|
use App\Services\Intune\PolicyNormalizer;
|
|
|
|
class SettingsNormalizer
|
|
{
|
|
public function __construct(private readonly PolicyNormalizer $policyNormalizer) {}
|
|
|
|
/**
|
|
* @param array<string, mixed>|null $snapshot
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function normalizeForDiff(?array $snapshot, string $policyType, ?string $platform = null): array
|
|
{
|
|
return $this->policyNormalizer->flattenForDiff($snapshot ?? [], $policyType, $platform);
|
|
}
|
|
}
|