1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace App\Services\History\Detector;
- use App\Services\History\Converter\ConverterContact;
- use App\Services\History\Converter\WhitelistConverter;
- class ProjectDetector implements DetectorContact
- {
- public static function fields(): array
- {
- return [
- 'name',
- 'code',
- 'const',
- 'status',
- 'begin',
- 'end',
- 'latitude',
- 'type',
- 'acl',
- 'whitelist',
- 'description',
- ];
- }
- public static function diffFields(): array
- {
- return [
- 'description',
- ];
- }
- public static function converter(string $field): ConverterContact
- {
- return match ($field) {
- "whitelist" => new WhitelistConverter(),
- default => null
- };
- }
- }
|