-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathInvalidHasherValueException.php
More file actions
39 lines (33 loc) · 925 Bytes
/
Copy pathInvalidHasherValueException.php
File metadata and controls
39 lines (33 loc) · 925 Bytes
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
37
38
39
<?php
/**
* Matomo - Open source web analytics
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
* @copyright (c) 2024 Joubert RedRat
* @author Joubert RedRat <eu+matomo@redrat.com.br>
* @license MIT
* @category Matomo_Plugins
* @package ProtectTrackID
*/
declare(strict_types=1);
namespace Piwik\Plugins\ProtectTrackID;
use InvalidArgumentException;
class InvalidHasherValueException extends InvalidArgumentException
{
public static function handleEncode(string $value): self
{
return new self(sprintf(
'Invalid value for Hasher encode, expected id site integer, got %1$s.',
$value
));
}
public static function handleDecode(string $value): self
{
return new self(sprintf(
'Invalid value for Hasher decode, expected valid hash, got %1$s.',
$value
));
}
}