Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
zoidbergx authored and github-actions[bot] committed Jun 9, 2023
1 parent 86a86b1 commit 80aca0b
Show file tree
Hide file tree
Showing 95 changed files with 282 additions and 94 deletions.
4 changes: 4 additions & 0 deletions bundles/AdminBundle/Controller/Admin/AssetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,7 @@ public function publishVersionAction(Request $request)

/**
* @Route("/show-version", name="pimcore_admin_asset_showversion", methods={"GET"})
*
* @TemplatePhp()
*
* @param Request $request
Expand Down Expand Up @@ -1479,6 +1480,7 @@ protected function addThumbnailCacheHeaders(Response $response)

/**
* @Route("/get-preview-document", name="pimcore_admin_asset_getpreviewdocument", methods={"GET"})
*
* @TemplatePhp()
*
* @param Request $request
Expand Down Expand Up @@ -1535,6 +1537,7 @@ protected function getDocumentPreviewPdf(Asset\Document $asset)

/**
* @Route("/get-preview-video", name="pimcore_admin_asset_getpreviewvideo", methods={"GET"})
*
* @TemplatePhp()
*
* @param Request $request
Expand Down Expand Up @@ -1617,6 +1620,7 @@ public function serveVideoPreviewAction(Request $request)
* @Route("/image-editor", name="pimcore_admin_asset_imageeditor", methods={"GET"})
*
* @param Request $request
*
* @TemplatePhp()
*
* @return array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1548,6 +1548,7 @@ public function publishVersionAction(Request $request)
* @Route("/preview-version", name="pimcore_admin_dataobject_dataobject_previewversion", methods={"GET"})
*
* @param Request $request
*
* @TemplatePhp()
*
* @throws \Exception
Expand Down Expand Up @@ -1583,6 +1584,7 @@ public function previewVersionAction(Request $request)

/**
* @Route("/diff-versions/from/{from}/to/{to}", name="pimcore_admin_dataobject_dataobject_diffversions", methods={"GET"})
*
* @TemplatePhp()
*
* @param Request $request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ public function doGetGridColumnConfig(Request $request, Config $config, $isDelet
$userIds = implode(',', $userIds);
$shared = ($savedGridConfig->getOwnerId() != $userId && $savedGridConfig->isShareGlobally()) || $db->fetchOne('select * from gridconfig_shares where sharedWithUserId IN (' . $userIds . ') and gridConfigId = ' . $savedGridConfig->getId());

// $shared = $savedGridConfig->isShareGlobally() ||GridConfigShare::getByGridConfigAndSharedWithId($savedGridConfig->getId(), $this->getUser()->getId());
// $shared = $savedGridConfig->isShareGlobally() ||GridConfigShare::getByGridConfigAndSharedWithId($savedGridConfig->getId(), $this->getUser()->getId());
} catch (\Exception $e) {
}

Expand Down
1 change: 1 addition & 0 deletions bundles/AdminBundle/Controller/Admin/IndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public function __construct(EventDispatcherInterface $eventDispatcher)

/**
* @Route("/", name="pimcore_admin_index", methods={"GET"})
*
* @TemplatePhp()
*
* @param Request $request
Expand Down
3 changes: 3 additions & 0 deletions bundles/AdminBundle/Controller/Admin/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ public function loginCheckAction()

/**
* @Route("/login/lostpassword", name="pimcore_admin_login_lostpassword")
*
* @TemplatePhp()
*/
public function lostpasswordAction(Request $request, BruteforceProtectionHandler $bruteforceProtectionHandler, CsrfProtectionHandler $csrfProtection, Config $config)
Expand Down Expand Up @@ -218,6 +219,7 @@ public function lostpasswordAction(Request $request, BruteforceProtectionHandler

/**
* @Route("/login/deeplink", name="pimcore_admin_login_deeplink")
*
* @TemplatePhp()
*/
public function deeplinkAction(Request $request)
Expand Down Expand Up @@ -264,6 +266,7 @@ protected function buildLoginPageViewModel(Config $config)

/**
* @Route("/login/2fa", name="pimcore_admin_2fa")
*
* @TemplatePhp()
*/
public function twoFactorAuthenticationAction(Request $request, BruteforceProtectionHandler $bruteforceProtectionHandler, Config $config)
Expand Down
1 change: 1 addition & 0 deletions bundles/AdminBundle/Controller/Admin/MiscController.php
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,7 @@ public function getLanguageFlagAction(Request $request)

/**
* @Route("/icon-list", name="pimcore_admin_misc_iconlist", methods={"GET"})
*
* @TemplatePhp()
*
* @param Request $request
Expand Down
4 changes: 4 additions & 0 deletions bundles/AdminBundle/Controller/Admin/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1621,6 +1621,7 @@ public function tagManagementTreeAction(Request $request)

/**
* @deprecated
*
* @Route("/tag-management-add", name="pimcore_admin_settings_tagmanagementadd", methods={"POST"})
*
* @param Request $request
Expand Down Expand Up @@ -1648,6 +1649,7 @@ public function tagManagementAddAction(Request $request)

/**
* @deprecated
*
* @Route("/tag-management-delete", name="pimcore_admin_settings_tagmanagementdelete", methods={"DELETE"})
*
* @param Request $request
Expand All @@ -1666,6 +1668,7 @@ public function tagManagementDeleteAction(Request $request)

/**
* @deprecated
*
* @Route("/tag-management-get", name="pimcore_admin_settings_tagmanagementget", methods={"GET"})
*
* @param Request $request
Expand All @@ -1683,6 +1686,7 @@ public function tagManagementGetAction(Request $request)

/**
* @deprecated
*
* @Route("/tag-management-update", name="pimcore_admin_settings_tagmanagementupdate", methods={"PUT"})
*
* @param Request $request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -952,8 +952,8 @@ public function wordExportAction(Request $request)

if ($element instanceof Element\ElementInterface) {
$output .= '<h1 class="element-headline">' . ucfirst(
$element->getType()
) . ' - ' . $element->getRealFullPath() . ' (ID: ' . $element->getId() . ')</h1>';
$element->getType()
) . ' - ' . $element->getRealFullPath() . ' (ID: ' . $element->getId() . ')</h1>';
}

if ($element instanceof Document\PageSnippet) {
Expand Down
1 change: 1 addition & 0 deletions bundles/AdminBundle/Controller/Reports/PiwikController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

/**
* @deprecated
*
* @Route("/piwik")
*/
class PiwikController extends ReportsControllerBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

/**
* @deprecated
*
* @Route("/qrcode")
*/
class QrcodeController extends ReportsControllerBase implements EventedControllerInterface
Expand Down
16 changes: 16 additions & 0 deletions bundles/AdminBundle/Controller/Rest/Element/AssetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,22 @@ class AssetController extends AbstractElementController
* @Route("/asset/id/{id}", name="pimcore_api_rest_element_asset_get", requirements={"id": "\d+"}, methods={"GET"})
*
* @api {get} /asset Get asset
*
* @apiParamExample {json} Request-Example:
* {
* "id": 4711
* "apikey": '2132sdf2321rwefdcvvce22'
* }
*
* @apiName getAssetFileById
*
* @apiSampleRequest off
*
* @apiGroup Asset
*
* @apiParam {int} id The id of asset you search
* @apiParam {string} apikey your access token
*
* @apiSuccessExample {json} Success-Response:
* {"success": "true", "data":{"path":"\/crm\/inquiries\/","creationDate":1368630916,"modificationDate":1388409137,"userModification":null,"childs":null}}
*
Expand Down Expand Up @@ -143,20 +149,30 @@ public function updateAction(Request $request, $id)
* @Route("/asset/id/{id}", name="pimcore_api_rest_element_asset_delete", requirements={"id": "\d+"}, methods={"DELETE"})
*
* @api {delete} /asset Delete asset
*
* @apiName deleteAsset
*
* @apiGroup Asset
*
* @apiParam {int} id The id of asset you delete
*
* @apiSampleRequest off
*
* @apiParamExample {json} Request-Example:
* {
* "id": 4711
* "apikey": '2132sdf2321rwefdcvvce22'
* }
*
* @apiParam {string} apikey your access token
*
* @apiSuccess {boolean} success Returns true if finished successfully
*
* @apiSuccessExample {json} Succes-Response:
* {"success":true}
*
* @apiError {boolean} success Returns false if failed
*
* @apiErrorExample {json} Error-Response:
* {"success":false,"msg":"exception 'Exception' with message 'Asset with given ID (712131243) does not exist.'"}
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,29 @@ class DataObjectController extends AbstractElementController
* @Route("/object/id/{id}", name="pimcore_api_rest_element_dataobject_get", requirements={"id": "\d+"}, methods={"GET"})
*
* @api {get} /object Get object data
*
* @apiName Get object by id
*
* @apiGroup Object
*
* @apiSampleRequest off
*
* @apiParam {int} id an object id
* @apiParam {string} apikey your access token
*
* @apiParamExample {json} Request-Example:
* {
* "id": 1,
* "apikey": "21314njdsfn1342134"
* }
*
* @apiSuccess {json} success parameter of the returned data = true
*
* @apiError {json} success parameter of the returned data = false
*
* @apiErrorExample {json} Error-Response:
* {"success":false, "msg":"exception 'Exception' with message '....'"}
*
* @apiSuccessExample {json} Success-Response:
* HTTP/1.1 200 OK
* {
Expand Down Expand Up @@ -151,14 +160,19 @@ public function getAction(Request $request, $id = null)
* @Route("/object", name="pimcore_api_rest_element_dataobject_create", methods={"POST", "PUT"})
*
* @api {post} /object Create a new object
*
* @apiName Create a new object
*
* @apiGroup Object
*
* @apiSampleRequest off
*
* @apiDescription
* Request body: JSON-encoded object data in the same format as returned by get object by id for the data segment but with missing id field or id set to 0
*
* @apiParam {json} data a new object data
* @apiParam {string} apikey your access token
*
* @apiParamExample {json} Request-Example:
* {
* "apikey": "21314njdsfn1342134",
Expand Down Expand Up @@ -209,10 +223,14 @@ public function getAction(Request $request, $id = null)
* ]
* }
* }
*
* @apiSuccess {json} success parameter of the returned data = true
*
* @apiError {json} success parameter of the returned data = false
*
* @apiErrorExample {json} Error-Response:
* {"success":false, "msg":"exception 'Exception' with message '....'"}
*
* @apiSuccessExample {json} Success-Response:
* HTTP/1.1 200 OK
* {
Expand Down Expand Up @@ -245,14 +263,19 @@ public function createAction(Request $request)
* @Route("/object/id/{id}", name="pimcore_api_rest_element_dataobject_update", requirements={"id": "\d+"}, methods={"POST", "PUT"})
*
* @api {put} /object/id/{id} Update an object
*
* @apiName Create a new object
*
* @apiGroup Object
*
* @apiSampleRequest off
*
* @apiDescription
* Request body: JSON-encoded object data in the same format as returned by get object by id for the data segment but with missing id field or id set to 0
*
* @apiParam {json} data a new object data
* @apiParam {string} apikey your access token
*
* @apiParamExample {json} Request-Example:
* {
* "apikey": "21314njdsfn1342134",
Expand Down Expand Up @@ -303,10 +326,14 @@ public function createAction(Request $request)
* ]
* }
* }
*
* @apiSuccess {json} success parameter of the returned data = true
*
* @apiError {json} success parameter of the returned data = false
*
* @apiErrorExample {json} Error-Response:
* {"success":false, "msg":"exception 'Exception' with message '....'"}
*
* @apiSuccessExample {json} Success-Response:
* HTTP/1.1 200 OK
* {
Expand Down Expand Up @@ -336,20 +363,29 @@ public function updateAction(Request $request, $id)
* @Route("/object/id/{id}", name="pimcore_api_rest_element_dataobject_delete", requirements={"id": "\d+"}, methods={"DELETE"})
*
* @api {delete} /object/id/{id} Delete object
*
* @apiName Delete object
*
* @apiGroup Object
*
* @apiSampleRequest off
*
* @apiParam {int} id an object id
* @apiParam {string} apikey your access token
*
* @apiParamExample {json} Request-Example:
* {
* "id": 1,
* "apikey": "21314njdsfn1342134"
* }
*
* @apiSuccess {json} success parameter of the returned data = true
*
* @apiError {json} success parameter of the returned data = false
*
* @apiErrorExample {json} Error-Response:
* {"success":false, "msg":"exception 'Exception' with message '....'"}
*
* @apiSuccessExample {json} Success-Response:
* HTTP/1.1 200 OK
* {
Expand Down
Loading

0 comments on commit 80aca0b

Please sign in to comment.