-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
36 lines (33 loc) · 1.12 KB
/
Copy pathfunctions.php
File metadata and controls
36 lines (33 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
/**
* Italix Rules - Helper Functions
*
* @package Italix\Rules
* @license MPL-2.0
*/
declare(strict_types=1);
namespace Italix\Rules;
/**
* Create a new Checker.
*
* For applications with a container, prefer registering Checker as a service
* and injecting it — this helper is for scripts, tests and templates, where
* wiring a container would be more ceremony than the job deserves.
*
* @param string $country_c Default country, e.g. 'IT'
* @param bool $check_email_dns Allow MX/A lookups on e-mail domains
* @param MunicipalityCodeSource|null $municipality_codes Reference data for tax codes, if available
* @return Checker
*/
function checker(
string $country_c = 'IT',
bool $check_email_dns = false,
?MunicipalityCodeSource $municipality_codes = null
): Checker {
return new Checker($country_c, $check_email_dns, $municipality_codes);
}