1 | <?php |
||
23 | class Support |
||
24 | { |
||
25 | /** |
||
26 | * @var \Aimeos\Shop\Base\Context |
||
27 | */ |
||
28 | private $context; |
||
29 | |||
30 | /** |
||
31 | * @var \Aimeos\Shop\Base\Locale |
||
32 | */ |
||
33 | private $locale; |
||
34 | |||
35 | |||
36 | /** |
||
37 | * Initializes the object |
||
38 | * |
||
39 | * @param \Aimeos\Shop\Base\Context $context Context provider |
||
40 | * @param \Aimeos\Shop\Base\Locale $locale Locale provider |
||
41 | */ |
||
42 | public function __construct( \Aimeos\Shop\Base\Context $context, \Aimeos\Shop\Base\Locale $locale ) |
||
47 | |||
48 | |||
49 | /** |
||
50 | * Checks if the user is in the specified group and associatied to the site |
||
51 | * |
||
52 | * @param string $userid Unique user ID |
||
|
|||
53 | * @param string|array $groupcodes Unique user/customer group codes that are allowed |
||
54 | * @return boolean True if user is part of the group, false if not |
||
55 | */ |
||
56 | public function checkUserGroup( \Illuminate\Foundation\Auth\User $user, $groupcodes ) |
||
77 | |||
78 | |||
79 | /** |
||
80 | * Checks if the user with the given ID is in the specified group |
||
81 | * |
||
82 | * @param string $userid Unique user ID |
||
83 | * @param string|array $groupcodes Unique user/customer group codes that are allowed |
||
84 | * @return boolean True if user is part of the group, false if not |
||
85 | * @deprecated Use checkUserGroup() instead |
||
86 | */ |
||
87 | public function checkGroup( $userid, $groupcodes ) |
||
96 | |||
97 | |||
98 | /** |
||
99 | * Returns the available group codes |
||
100 | * |
||
101 | * @param \Aimeos\MShop\Context\Item\Iface $context Context item |
||
102 | * @return string[] List of group codes |
||
103 | */ |
||
104 | public function getGroups( \Aimeos\MShop\Context\Item\Iface $context ) |
||
118 | |||
119 | |||
120 | /** |
||
121 | * Checks if one of the groups is associated to the given user ID |
||
122 | * |
||
123 | * @param \Aimeos\MShop\Context\Item\Iface $context Context item |
||
124 | * @param string $userid ID of the logged in user |
||
125 | * @param string[] $groupcodes List of group codes to check against |
||
126 | * @return boolean True if the user is in one of the groups, false if not |
||
127 | */ |
||
128 | protected function checkGroups( \Aimeos\MShop\Context\Item\Iface $context, $userid, $groupcodes ) |
||
150 | } |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.