api/webservice/WebservicePremium/BaseAction/Menu.php
Avoid using static access to class '\Settings_Menu_Record_Model' in method 'get'. Open
Open
'items' => \Settings_Menu_Record_Model::parseToDisplay($menu),
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Possibly zero references to use statement for classlike/namespace OA
(\OpenApi\Annotations)
Open
Open
use OpenApi\Annotations as OA;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* response=200,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* title="Base action - Menu",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* property="items",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="id", type="integer", example=171),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="type", type="string", example="Module"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="sequence", type="integer", example=1),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="newwindow", type="integer", example=0),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="dataurl", type="string", example="index.php?module=Module&view=List&mid=172"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* path="/webservice/WebservicePremium/Menu",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* summary="Gets the menu for the portal",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* description="Get menu",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* response=200,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* property="result",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="filters", type="string", example="4,130"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* schema="BaseAction_Get_Menu_Response",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* description="Tree item",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* description="Tree item",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="newwindow", type="integer", example=0),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="parent", type="integer", example=0),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
$menu = \Settings_Menu_Record_Model::getCleanInstance()->getChildMenu($this->controller->app['id'], 0, \Settings_Menu_Record_Model::SRC_API);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* description="Menu details",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* property="result",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* description="Menu items selected in the system, consists of parents and children",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* security={{"basicAuth" : {}, "ApiKeyAuth" : {}, "token" : {}}},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* property="items",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* tags={"BaseAction"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* security={{"basicAuth" : {}, "ApiKeyAuth" : {}, "token" : {}}},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Schema(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* title="Base action - Menu",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* title="Parent parameters",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="mod", type="string", example="Accounts"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="name", type="string", example="Accounts"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Get(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* schema="BaseAction_Get_Menu_Response",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* description="Base action menu response body",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* description="Menu items selected in the system, consists of parents and children",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
return [
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* description="Get menu",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="name", type="string", example="Accounts"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="hotkey", type="string", example="ctrl+k"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\JsonContent(ref="#/components/schemas/BaseAction_Get_Menu_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="label", type="string", example="My home page"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* title="Parent parameters",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="parent", type="integer", example=0),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="hotkey", type="string", example="ctrl+k"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* path="/webservice/WebservicePremium/Menu",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* summary="Gets the menu for the portal",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* description="Base action menu response body",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="tabid", type="integer", example=3),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="icon", type="string", example="dminIcon-shared-owner"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="childs", type="object", title="Children parameters"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
'items' => \Settings_Menu_Record_Model::parseToDisplay($menu),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\JsonContent(ref="#/components/schemas/BaseAction_Get_Menu_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="icon", type="string", example="dminIcon-shared-owner"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* description="Menu details",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Schema(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="mod", type="string", example="Accounts"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\XmlContent(ref="#/components/schemas/BaseAction_Get_Menu_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
public function get(): array
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* tags={"BaseAction"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\XmlContent(ref="#/components/schemas/BaseAction_Get_Menu_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\AdditionalProperties(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\AdditionalProperties(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="id", type="integer", example=171),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="tabid", type="integer", example=3),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="type", type="string", example="Module"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="sequence", type="integer", example=1),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="childs", type="object", title="Children parameters"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="label", type="string", example="My home page"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="dataurl", type="string", example="index.php?module=Module&view=List&mid=172"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @OA\Property(property="filters", type="string", example="4,130"),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Get method - Gets the menu for the portal.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Line exceeds 120 characters; contains 189 characters Open
Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @OA\Get(
- Exclude checks
Line exceeds 120 characters; contains 149 characters Open
Open
$menu = \Settings_Menu_Record_Model::getCleanInstance()->getChildMenu($this->controller->app['id'], 0, \Settings_Menu_Record_Model::SRC_API);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $allowedMethod = ['GET'];
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
Open
* @OA\Property(property="dataurl", type="string", example="index.php?module=Module&view=List&mid=172"),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Line exceeds 120 characters; contains 131 characters Open
Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** {@inheritdoc} */
- Exclude checks