1
|
|
|
<?php |
2
|
|
|
declare(strict_types=1); |
3
|
|
|
|
4
|
|
|
/** |
5
|
|
|
* ReportingCloud PHP Wrapper |
6
|
|
|
* |
7
|
|
|
* PHP wrapper for ReportingCloud Web API. Authored and supported by Text Control GmbH. |
8
|
|
|
* |
9
|
|
|
* @link https://www.reporting.cloud to learn more about ReportingCloud |
10
|
|
|
* @link https://github.com/TextControl/txtextcontrol-reportingcloud-php for the canonical source repository |
11
|
|
|
* @license https://raw.githubusercontent.com/TextControl/txtextcontrol-reportingcloud-php/master/LICENSE.md |
12
|
|
|
* @copyright © 2019 Text Control GmbH |
13
|
|
|
*/ |
14
|
|
|
|
15
|
|
|
namespace TxTextControl\ReportingCloud\Assert; |
16
|
|
|
|
17
|
|
|
use TxTextControl\ReportingCloud\Exception\InvalidArgumentException; |
18
|
|
|
use Webmozart\Assert\Assert as ParentAssert; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* Class Assert |
22
|
|
|
* |
23
|
|
|
* @package TxTextControl\ReportingCloud |
24
|
|
|
*/ |
25
|
|
|
class Assert extends ParentAssert |
26
|
|
|
{ |
27
|
|
|
use AssertApiKeyTrait; |
28
|
|
|
use AssertBase64DataTrait; |
29
|
|
|
use AssertCultureTrait; |
30
|
|
|
use AssertDateTimeTrait; |
31
|
|
|
use AssertDocumentDividerTrait; |
32
|
|
|
use AssertDocumentExtensionTrait; |
33
|
|
|
use AssertImageFormatTrait; |
34
|
|
|
use AssertLanguageTrait; |
35
|
|
|
use AssertPageTrait; |
36
|
|
|
use AssertReturnFormatTrait; |
37
|
|
|
use AssertTemplateExtensionTrait; |
38
|
|
|
use AssertTemplateFormatTrait; |
39
|
|
|
use AssertTemplateNameTrait; |
40
|
|
|
use AssertTimestampTrait; |
41
|
|
|
use AssertZoomFactorTrait; |
42
|
|
|
use FilenameExistsTrait; |
43
|
|
|
use FileFormatsTrait; |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* Customized version of parent::reportInvalidArgument to throw |
47
|
|
|
* |
48
|
|
|
* TxTextControl\ReportingCloud\Exception\InvalidArgumentException |
49
|
|
|
* |
50
|
|
|
* exception instead of parent's |
51
|
|
|
* |
52
|
|
|
* InvalidArgumentException |
53
|
|
|
* |
54
|
|
|
* @param $message |
55
|
|
|
*/ |
56
|
|
|
protected static function reportInvalidArgument($message) |
57
|
|
|
{ |
58
|
|
|
throw new InvalidArgumentException($message); |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
} |
62
|
|
|
|