<?php
/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */

namespace Kufer\Web\KuferTools\Utils\FilterSettings\Dozenten;

use Kufer\Web\Classes\Dbfilter\DozentenSQLFilter;
use Kufer\Web\KuferTools\Utils\FilterSettings\IFilterSettings;
use Kufer\Web\Classes\Dbfilter\ISQLFilter;

class NotVerstorbeneDozentenFilterSettings implements IFilterSettings
{
  
  public function applySettings($filter): ISQLFilter
  {
    return $filter->notAny(static function(\Kufer\Web\Classes\Dbfilter\DozentenSQLFilter $filter) {
      return $filter->isVerstorben();
    });
  }

  public function assertFilterClass($filter): void
  {
    assert($filter instanceof DozentenSQLFilter);
  }
}