forked from consistence/consistence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ObjectMixinTrait.php
103 lines (93 loc) · 2.55 KB
/
ObjectMixinTrait.php
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
declare(strict_types = 1);
namespace Consistence\Type;
trait ObjectMixinTrait
{
/**
* Call to undefined method
*
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint
*
* @param string $name method name
* @param mixed[] $args method args
*/
public function __call(string $name, array $args)
{
ObjectMixin::magicCall($this, $name);
// @codeCoverageIgnoreStart
// return from this method is never invoked (always throws exception)
}
// @codeCoverageIgnoreEnd
/**
* Call to undefined static method
*
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint
*
* @param string $name method name
* @param mixed[] $args method args
*/
public static function __callStatic(string $name, array $args)
{
ObjectMixin::magicCallStatic(get_called_class(), $name);
// @codeCoverageIgnoreStart
// return from this method is never invoked (always throws exception)
}
// @codeCoverageIgnoreEnd
/**
* Access to undefined property
*
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint
*
* @param string $name property name
*/
public function &__get(string $name)
{
ObjectMixin::magicGet($this, $name);
// @codeCoverageIgnoreStart
// return from this method is never invoked (always throws exception)
}
// @codeCoverageIgnoreEnd
/**
* Write to undefined property
*
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint
*
* @param string $name property name
* @param mixed $value property value
*/
public function __set(string $name, $value)
{
ObjectMixin::magicSet($this, $name);
// @codeCoverageIgnoreStart
// return from this method is never invoked (always throws exception)
}
// @codeCoverageIgnoreEnd
/**
* Isset undefined property
*
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint
*
* @param string $name property name
*/
public function __isset(string $name)
{
ObjectMixin::magicIsSet($this, $name);
// @codeCoverageIgnoreStart
// return from this method is never invoked (always throws exception)
}
// @codeCoverageIgnoreEnd
/**
* Unset undefined property
*
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint
*
* @param string $name property name
*/
public function __unset(string $name)
{
ObjectMixin::magicUnset($this, $name);
// @codeCoverageIgnoreStart
// return from this method is never invoked (always throws exception)
}
// @codeCoverageIgnoreEnd
}