getChildHtml('global_notices') ?>
diff --git a/app/code/Magento/Theme/view/frontend/empty.phtml b/app/code/Magento/Theme/view/frontend/empty.phtml
index c188869510214..32d6376fd1189 100644
--- a/app/code/Magento/Theme/view/frontend/empty.phtml
+++ b/app/code/Magento/Theme/view/frontend/empty.phtml
@@ -40,7 +40,7 @@ $bodyCss = $this->getBodyClass() ? $this->getBodyClass() : '';
getAddAttribute() ?>
- data-mage-init="{loaderAjax: {}, loader: {}}">
+ data-mage-init='{"loaderAjax": {}, "loader": {}}'>
getChildHtml('after_body_start') ?>
getChildHtml('global_notices') ?>
@@ -55,4 +55,4 @@ $bodyCss = $this->getBodyClass() ? $this->getBodyClass() : '';
getAbsoluteFooter() ?>
-
\ No newline at end of file
+
diff --git a/app/code/Magento/Theme/view/frontend/page.phtml b/app/code/Magento/Theme/view/frontend/page.phtml
index 6cacc7b9319c8..c2612d79fe858 100644
--- a/app/code/Magento/Theme/view/frontend/page.phtml
+++ b/app/code/Magento/Theme/view/frontend/page.phtml
@@ -40,7 +40,7 @@ $bodyCss = $this->getBodyClass() ? $this->getBodyClass() : '';
getAddAttribute() ?>
- data-mage-init="{loaderAjax: {}, loader: {}}">
+ data-mage-init='{"loaderAjax": {}, "loader": {}}'>
getChildHtml('after_body_start') ?>
getChildHtml('global_notices') ?>
diff --git a/app/code/Magento/Theme/view/frontend/popup.phtml b/app/code/Magento/Theme/view/frontend/popup.phtml
index e1683f0f8f9b0..1f38bf6d80326 100644
--- a/app/code/Magento/Theme/view/frontend/popup.phtml
+++ b/app/code/Magento/Theme/view/frontend/popup.phtml
@@ -40,7 +40,7 @@ $bodyCss = $this->getBodyClass() ? $this->getBodyClass() : '';
getAddAttribute() ?>
- data-mage-init="{loaderAjax: {}, loader: {}}">
+ data-mage-init='{"loaderAjax": {}, "loader": {}}'>
getChildHtml('after_body_start') ?>
getChildHtml('main') ?>
diff --git a/app/code/Magento/Theme/view/frontend/print.phtml b/app/code/Magento/Theme/view/frontend/print.phtml
index a6c7760b3f43b..e92054e34152b 100644
--- a/app/code/Magento/Theme/view/frontend/print.phtml
+++ b/app/code/Magento/Theme/view/frontend/print.phtml
@@ -37,7 +37,7 @@
getAddAttribute() ?>
- data-mage-init="{loaderAjax: {}, loader: {}}">
+ data-mage-init='{"loaderAjax": {}, "loader": {}}'>
getChildHtml('after_body_start') ?>
diff --git a/app/code/Magento/Webapi/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webapi.php b/app/code/Magento/Webapi/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webapi.php
index 4c60d6ed3f824..dd6fbcbf8ed6a 100644
--- a/app/code/Magento/Webapi/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webapi.php
+++ b/app/code/Magento/Webapi/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webapi.php
@@ -91,6 +91,8 @@ public function __construct(
/**
* Set the selected resources, which is an array of resource ids. If everything is allowed, the
* array will contain just the root resource id, which is "Magento_Adminhtml::all".
+ *
+ * @return void
*/
protected function _construct()
{
@@ -99,7 +101,7 @@ protected function _construct()
}
/**
- * {@inheritDoc}
+ * {@inheritdoc}
*/
public function canShowTab()
{
@@ -109,7 +111,7 @@ public function canShowTab()
}
/**
- * {@inheritDoc}
+ * {@inheritdoc}
*/
public function getTabLabel()
{
@@ -117,7 +119,7 @@ public function getTabLabel()
}
/**
- * {@inheritDoc}
+ * {@inheritdoc}
*/
public function getTabTitle()
{
@@ -125,7 +127,7 @@ public function getTabTitle()
}
/**
- * {@inheritDoc}
+ * {@inheritdoc}
*/
public function isHidden()
{
diff --git a/app/code/Magento/Webapi/Block/Adminhtml/Integration/Edit/Tab/Webapi.php b/app/code/Magento/Webapi/Block/Adminhtml/Integration/Edit/Tab/Webapi.php
index a750b81667f56..63e13de83b009 100644
--- a/app/code/Magento/Webapi/Block/Adminhtml/Integration/Edit/Tab/Webapi.php
+++ b/app/code/Magento/Webapi/Block/Adminhtml/Integration/Edit/Tab/Webapi.php
@@ -64,9 +64,6 @@ class Webapi extends \Magento\Backend\Block\Widget\Form\Generic
/**
* Initialize dependencies.
*
- * TODO: Fix excessive number of arguments
- * @SuppressWarnings(PHPMD.ExcessiveParameterList)
- *
* @param \Magento\Backend\Block\Template\Context $context
* @param \Magento\Core\Model\Registry $registry
* @param \Magento\Data\FormFactory $formFactory
@@ -76,6 +73,9 @@ class Webapi extends \Magento\Backend\Block\Widget\Form\Generic
* @param \Magento\Webapi\Helper\Data $webapiData
* @param \Magento\Integration\Helper\Data $integrationData
* @param array $data
+ *
+ * @todo Fix excessive number of arguments
+ * @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
\Magento\Backend\Block\Template\Context $context,
@@ -140,6 +140,8 @@ public function isHidden()
/**
* Class constructor
+ *
+ * @return void
*/
protected function _construct()
{
diff --git a/app/code/Magento/Webapi/Controller/ErrorProcessor.php b/app/code/Magento/Webapi/Controller/ErrorProcessor.php
index 352221dec660f..169ca8aafe009 100644
--- a/app/code/Magento/Webapi/Controller/ErrorProcessor.php
+++ b/app/code/Magento/Webapi/Controller/ErrorProcessor.php
@@ -137,6 +137,7 @@ public function maskException(\Exception $exception)
*
* @param \Exception $exception
* @param int $httpCode
+ * @return void
* @SuppressWarnings(PHPMD.ExitExpression)
*/
public function renderException(\Exception $exception, $httpCode = self::DEFAULT_ERROR_HTTP_CODE)
@@ -179,6 +180,7 @@ protected function _logException(\Exception $exception)
* @param string $errorMessage
* @param string $trace
* @param int $httpCode
+ * @return void
*/
public function render(
$errorMessage,
@@ -205,9 +207,9 @@ public function render(
*
* @param string $errorMessage
* @param string $trace
- * @param string $format
* @param int $httpCode
- * @return array
+ * @param string $format
+ * @return array|string
*/
protected function _formatError($errorMessage, $trace, $httpCode, $format)
{
@@ -242,7 +244,7 @@ protected function _formatError($errorMessage, $trace, $httpCode, $format)
/**
* Declare web API-specific shutdown function.
*
- * @return \Magento\Webapi\Controller\ErrorProcessor
+ * @return $this
*/
public function registerShutdownFunction()
{
@@ -252,6 +254,8 @@ public function registerShutdownFunction()
/**
* Function to catch errors, that has not been caught by the user error dispatcher function.
+ *
+ * @return void
*/
public function apiShutdownFunction()
{
diff --git a/app/code/Magento/Webapi/Controller/Request.php b/app/code/Magento/Webapi/Controller/Request.php
index 620f9b41b3aef..442980e4f72ab 100644
--- a/app/code/Magento/Webapi/Controller/Request.php
+++ b/app/code/Magento/Webapi/Controller/Request.php
@@ -55,6 +55,7 @@ public function __construct(
* Set consumer ID.
*
* @param int $consumerId
+ * @return void
*/
public function setConsumerId($consumerId)
{
diff --git a/app/code/Magento/Webapi/Controller/Response.php b/app/code/Magento/Webapi/Controller/Response.php
index 26ba47cd5bb1e..66e4af726d5de 100644
--- a/app/code/Magento/Webapi/Controller/Response.php
+++ b/app/code/Magento/Webapi/Controller/Response.php
@@ -57,7 +57,7 @@ class Response extends \Zend_Controller_Response_Http implements \Magento\App\Re
* Set header appropriate to specified MIME type.
*
* @param string $mimeType MIME type
- * @return \Magento\Webapi\Controller\Response
+ * @return $this
*/
public function setMimeType($mimeType)
{
@@ -71,7 +71,7 @@ public function setMimeType($mimeType)
* @param string $code
* @param array $params
* @param string $type
- * @return \Magento\Webapi\Controller\Response
+ * @return $this
*/
public function addMessage($message, $code, $params = array(), $type = self::MESSAGE_TYPE_ERROR)
{
@@ -104,7 +104,7 @@ public function getMessages()
/**
* Clear messages.
*
- * @return \Magento\Webapi\Controller\Response
+ * @return $this
*/
public function clearMessages()
{
diff --git a/app/code/Magento/Webapi/Controller/Rest.php b/app/code/Magento/Webapi/Controller/Rest.php
index 98b2a14b2ae82..778948d28a654 100644
--- a/app/code/Magento/Webapi/Controller/Rest.php
+++ b/app/code/Magento/Webapi/Controller/Rest.php
@@ -25,8 +25,9 @@
namespace Magento\Webapi\Controller;
use Magento\Authz\Service\AuthorizationV1Interface as AuthorizationService;
-use Magento\Webapi\Controller\Rest\Router\Route;
-use Magento\Service\Entity\MagentoDtoInterface;
+use Magento\Webapi\Controller\Rest\Request as RestRequest;
+use Magento\Webapi\Controller\Rest\Response as RestResponse;
+use Magento\Webapi\Controller\Rest\Router;
/**
* Front controller for WebAPI REST area.
@@ -37,13 +38,13 @@
*/
class Rest implements \Magento\App\FrontControllerInterface
{
- /** @var \Magento\Webapi\Controller\Rest\Router */
+ /** @var Router */
protected $_router;
- /** @var \Magento\Webapi\Controller\Rest\Request */
+ /** @var RestRequest */
protected $_request;
- /** @var \Magento\Webapi\Controller\Rest\Response */
+ /** @var RestResponse */
protected $_response;
/** @var \Magento\ObjectManager */
@@ -64,37 +65,37 @@ class Rest implements \Magento\App\FrontControllerInterface
/** @var ServiceArgsSerializer */
protected $_serializer;
- /** @var \Magento\Webapi\Controller\ErrorProcessor */
+ /** @var ErrorProcessor */
protected $_errorProcessor;
/**
* Initialize dependencies.
*
- * TODO: Consider removal of warning suppression
- *
- * @SuppressWarnings(PHPMD.ExcessiveParameterList)
- * @param Rest\Request $request
- * @param Rest\Response $response
- * @param Rest\Router $router
+ * @param RestRequest $request
+ * @param RestResponse $response
+ * @param Router $router
* @param \Magento\ObjectManager $objectManager
* @param \Magento\App\State $appState
* @param \Magento\Oauth\OauthInterface $oauthService
* @param \Magento\Oauth\Helper\Request $oauthHelper
* @param AuthorizationService $authorizationService
* @param ServiceArgsSerializer $serializer
- * @param \Magento\Webapi\Controller\ErrorProcessor $errorProcessor
+ * @param ErrorProcessor $errorProcessor
+ *
+ * TODO: Consider removal of warning suppression
+ * @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
- \Magento\Webapi\Controller\Rest\Request $request,
- \Magento\Webapi\Controller\Rest\Response $response,
- \Magento\Webapi\Controller\Rest\Router $router,
+ RestRequest $request,
+ RestResponse $response,
+ Router $router,
\Magento\ObjectManager $objectManager,
\Magento\App\State $appState,
\Magento\Oauth\OauthInterface $oauthService,
\Magento\Oauth\Helper\Request $oauthHelper,
AuthorizationService $authorizationService,
ServiceArgsSerializer $serializer,
- \Magento\Webapi\Controller\ErrorProcessor $errorProcessor
+ ErrorProcessor $errorProcessor
) {
$this->_router = $router;
$this->_request = $request;
diff --git a/app/code/Magento/Webapi/Controller/Rest/Request.php b/app/code/Magento/Webapi/Controller/Rest/Request.php
index a175a6fbfcc96..73261b21b90cf 100644
--- a/app/code/Magento/Webapi/Controller/Rest/Request.php
+++ b/app/code/Magento/Webapi/Controller/Rest/Request.php
@@ -81,7 +81,7 @@ protected function _getDeserializer()
/**
* Retrieve accept types understandable by requester in a form of array sorted by quality in descending order.
*
- * @return array
+ * @return string[]
*/
public function getAcceptTypes()
{
diff --git a/app/code/Magento/Webapi/Controller/Rest/Request/Deserializer/Xml.php b/app/code/Magento/Webapi/Controller/Rest/Request/Deserializer/Xml.php
index 753cddb824e68..7c6c0e19d566e 100644
--- a/app/code/Magento/Webapi/Controller/Rest/Request/Deserializer/Xml.php
+++ b/app/code/Magento/Webapi/Controller/Rest/Request/Deserializer/Xml.php
@@ -102,6 +102,7 @@ public function deserialize($xmlRequestBody)
* @param string $errorMessage
* @param string $errorFile
* @param integer $errorLine
+ * @return void
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function handleErrors($errorNumber, $errorMessage, $errorFile, $errorLine)
diff --git a/app/code/Magento/Webapi/Controller/Rest/Response.php b/app/code/Magento/Webapi/Controller/Rest/Response.php
index 5337a40efc0a2..408cc12081c48 100644
--- a/app/code/Magento/Webapi/Controller/Rest/Response.php
+++ b/app/code/Magento/Webapi/Controller/Rest/Response.php
@@ -55,6 +55,8 @@ public function __construct(
/**
* Send response to the client, render exceptions if they are present.
+ *
+ * @return void
*/
public function sendResponse()
{
@@ -80,12 +82,14 @@ public function sendResponse()
/**
* Generate and set HTTP response code, error messages to Response object.
+ *
+ * @return $this
*/
protected function _renderMessages()
{
$formattedMessages = $this->getMessages();
$responseHttpCode = null;
- /** @var Exception $exception */
+ /** @var \Exception $exception */
foreach ($this->getException() as $exception) {
$maskedException = $this->_errorProcessor->maskException($exception);
$messageData = array(
@@ -115,7 +119,7 @@ protected function _renderMessages()
* Perform rendering of response data.
*
* @param array|null $outputData
- * @return \Magento\Webapi\Controller\Rest\Response
+ * @return $this
*/
public function prepareResponse($outputData = null)
{
@@ -129,7 +133,8 @@ public function prepareResponse($outputData = null)
/**
* Render data using registered Renderer.
*
- * @param mixed $data
+ * @param array|object $data
+ * @return void
*/
protected function _render($data)
{
diff --git a/app/code/Magento/Webapi/Controller/Rest/Router.php b/app/code/Magento/Webapi/Controller/Rest/Router.php
index 7a656634688ee..a4e95d2c0a6aa 100644
--- a/app/code/Magento/Webapi/Controller/Rest/Router.php
+++ b/app/code/Magento/Webapi/Controller/Rest/Router.php
@@ -47,11 +47,11 @@ public function __construct(\Magento\Webapi\Model\Rest\Config $apiConfig)
* Route the Request, the only responsibility of the class.
* Find route that matches current URL, set parameters of the route to Request object.
*
- * @param \Magento\Webapi\Controller\Rest\Request $request
+ * @param Request $request
* @return \Magento\Webapi\Controller\Rest\Router\Route
* @throws \Magento\Webapi\Exception
*/
- public function match(\Magento\Webapi\Controller\Rest\Request $request)
+ public function match(Request $request)
{
/** @var \Magento\Webapi\Controller\Rest\Router\Route[] $routes */
$routes = $this->_apiConfig->getRestRoutes($request);
diff --git a/app/code/Magento/Webapi/Controller/Rest/Router/Route.php b/app/code/Magento/Webapi/Controller/Rest/Router/Route.php
index 2e3a403c4b652..2c85514c4819a 100644
--- a/app/code/Magento/Webapi/Controller/Rest/Router/Route.php
+++ b/app/code/Magento/Webapi/Controller/Rest/Router/Route.php
@@ -43,7 +43,7 @@ class Route extends \Zend_Controller_Router_Route
* Set service class.
*
* @param string $serviceClass
- * @return \Magento\Webapi\Controller\Rest\Router\Route
+ * @return $this
*/
public function setServiceClass($serviceClass)
{
@@ -65,7 +65,7 @@ public function getServiceClass()
* Set service method name.
*
* @param string $serviceMethod
- * @return \Magento\Webapi\Controller\Rest\Router\Route
+ * @return $this
*/
public function setServiceMethod($serviceMethod)
{
@@ -87,7 +87,7 @@ public function getServiceMethod()
* Set if the route is secure
*
* @param boolean $secure
- * @return \Magento\Webapi\Controller\Rest\Router\Route
+ * @return $this
*/
public function setSecure($secure)
{
@@ -109,6 +109,7 @@ public function isSecure()
* Set ACL resources list.
*
* @param array $aclResources
+ * @return void
*/
public function setAclResources($aclResources)
{
diff --git a/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php b/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php
index 4a8ce5ea919dd..2c0ac5c4f8273 100644
--- a/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php
+++ b/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php
@@ -60,7 +60,6 @@ public function __construct(TypeProcessor $typeProcessor)
* @param string $serviceClassName name of the service class that we are trying to call
* @param string $serviceMethodName name of the method that we are trying to call
* @param array $inputArray data to send to method in key-value format
- *
* @return array list of parameters that can be used to call the service method
*/
public function getInputData($serviceClassName, $serviceMethodName, array $inputArray)
diff --git a/app/code/Magento/Webapi/Controller/Soap.php b/app/code/Magento/Webapi/Controller/Soap.php
index b617a0324a3cc..a4702dceed463 100644
--- a/app/code/Magento/Webapi/Controller/Soap.php
+++ b/app/code/Magento/Webapi/Controller/Soap.php
@@ -51,10 +51,10 @@ class Soap implements \Magento\App\FrontControllerInterface
/** @var \Magento\Webapi\Controller\Soap\Request */
protected $_request;
- /** @var \Magento\Webapi\Controller\Response */
+ /** @var Response */
protected $_response;
- /** @var \Magento\Webapi\Controller\ErrorProcessor */
+ /** @var ErrorProcessor */
protected $_errorProcessor;
/** @var \Magento\App\State */
@@ -70,20 +70,20 @@ class Soap implements \Magento\App\FrontControllerInterface
* Initialize dependencies.
*
* @param \Magento\Webapi\Controller\Soap\Request $request
- * @param \Magento\Webapi\Controller\Response $response
+ * @param Response $response
* @param \Magento\Webapi\Model\Soap\Wsdl\Generator $wsdlGenerator
* @param \Magento\Webapi\Model\Soap\Server $soapServer
- * @param \Magento\Webapi\Controller\ErrorProcessor $errorProcessor
+ * @param ErrorProcessor $errorProcessor
* @param \Magento\App\State $appState
* @param \Magento\AppInterface $application
* @param \Magento\Oauth\OauthInterface $oauthService
*/
public function __construct(
\Magento\Webapi\Controller\Soap\Request $request,
- \Magento\Webapi\Controller\Response $response,
+ Response $response,
\Magento\Webapi\Model\Soap\Wsdl\Generator $wsdlGenerator,
\Magento\Webapi\Model\Soap\Server $soapServer,
- \Magento\Webapi\Controller\ErrorProcessor $errorProcessor,
+ ErrorProcessor $errorProcessor,
\Magento\App\State $appState,
\Magento\AppInterface $application,
\Magento\Oauth\OauthInterface $oauthService
@@ -161,6 +161,7 @@ protected function _getAccessToken()
* Set body and status code to response using information extracted from provided exception.
*
* @param \Exception $exception
+ * @return void
*/
protected function _prepareErrorResponse($exception)
{
@@ -169,7 +170,7 @@ protected function _prepareErrorResponse($exception)
$httpCode = $maskedException->getHttpCode();
$contentType = self::CONTENT_TYPE_WSDL_REQUEST;
} else {
- $httpCode = \Magento\Webapi\Controller\Response::HTTP_OK;
+ $httpCode = Response::HTTP_OK;
$contentType = self::CONTENT_TYPE_SOAP_CALL;
}
$this->_setResponseContentType($contentType);
@@ -183,7 +184,7 @@ protected function _prepareErrorResponse($exception)
* Set content type to response object.
*
* @param string $contentType
- * @return \Magento\Webapi\Controller\Soap
+ * @return $this
*/
protected function _setResponseContentType($contentType = 'text/xml')
{
@@ -196,7 +197,7 @@ protected function _setResponseContentType($contentType = 'text/xml')
* Replace WSDL xml encoding from config, if present, else default to UTF-8 and set it to the response object.
*
* @param string $responseBody
- * @return \Magento\Webapi\Controller\Soap
+ * @return $this
*/
protected function _setResponseBody($responseBody)
{
diff --git a/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php b/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php
index 383428ad47b62..cef4b66f2277b 100644
--- a/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php
+++ b/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php
@@ -145,7 +145,7 @@ protected function _prepareRequestData($serviceClass, $serviceMethod, $arguments
/**
* Convert service response into format acceptable by SoapServer.
*
- * @param object|array|string|int|double|null $data
+ * @param object|array|string|int|float|null $data
* @return array
* @throws \InvalidArgumentException
*/
diff --git a/app/code/Magento/Webapi/Exception.php b/app/code/Magento/Webapi/Exception.php
index 1c1362d8f0eac..55de4cad66868 100644
--- a/app/code/Magento/Webapi/Exception.php
+++ b/app/code/Magento/Webapi/Exception.php
@@ -64,8 +64,8 @@ class Exception extends \RuntimeException
* Initialize exception with HTTP code.
*
* @param string $message
- * @param int $httpCode
* @param int $code Error code
+ * @param int $httpCode
* @param array $details Additional exception details
* @param string $name Exception name
* @throws \InvalidArgumentException
diff --git a/app/code/Magento/Webapi/Helper/Data.php b/app/code/Magento/Webapi/Helper/Data.php
index aa996df32aa3c..472e5fd4a20c9 100644
--- a/app/code/Magento/Webapi/Helper/Data.php
+++ b/app/code/Magento/Webapi/Helper/Data.php
@@ -24,21 +24,30 @@
namespace Magento\Webapi\Helper;
+use Magento\App\Helper\Context;
+use Magento\Core\Model\Registry;
use Magento\Integration\Controller\Adminhtml\Integration as IntegrationController;
class Data extends \Magento\App\Helper\AbstractHelper
{
- /** @var \Magento\Core\Model\Registry */
+ /** @var Registry */
protected $_registry;
+ /**
+ * @param Context $context
+ * @param Registry $registry
+ */
public function __construct(
- \Magento\App\Helper\Context $context,
- \Magento\Core\Model\Registry $registry
+ Context $context,
+ Registry $registry
) {
$this->_registry = $registry;
parent::__construct($context);
}
+ /**
+ * @return array
+ */
public function getSelectedResources()
{
$selectedResourceIds = array();
@@ -81,7 +90,7 @@ public function getServiceName($interfaceName, $preserveVersion = true)
*
* @param string $className
* @param bool $preserveVersion Should version be preserved during class name conversion into service name
- * @return array
+ * @return string[]
* @throws \InvalidArgumentException When class is not valid API service.
*/
public function getServiceNameParts($className, $preserveVersion = false)
diff --git a/app/code/Magento/Webapi/Model/Config.php b/app/code/Magento/Webapi/Model/Config.php
index 404132d2eb2b5..d670f05d5157e 100644
--- a/app/code/Magento/Webapi/Model/Config.php
+++ b/app/code/Magento/Webapi/Model/Config.php
@@ -24,6 +24,9 @@
*/
namespace Magento\Webapi\Model;
+use Magento\Webapi\Model\Cache\Type;
+use Magento\Webapi\Model\Config\Reader;
+
/**
* Web API Config Model.
*
@@ -44,7 +47,7 @@ class Config
protected $_configCacheType;
/**
- * @var \Magento\Webapi\Model\Config\Reader
+ * @var Reader
*/
protected $_configReader;
@@ -61,12 +64,12 @@ class Config
protected $_services;
/**
- * @param Cache\Type $configCacheType
- * @param Config\Reader $configReader
+ * @param Type $configCacheType
+ * @param Reader $configReader
*/
public function __construct(
- \Magento\Webapi\Model\Cache\Type $configCacheType,
- \Magento\Webapi\Model\Config\Reader $configReader
+ Type $configCacheType,
+ Reader $configReader
) {
$this->_configCacheType = $configCacheType;
$this->_configReader = $configReader;
@@ -93,6 +96,8 @@ public function getServices()
/**
* Load services from cache
+ *
+ * @return string|bool
*/
protected function _loadFromCache()
{
@@ -103,7 +108,7 @@ protected function _loadFromCache()
* Save services into the cache
*
* @param string $data serialized version of the webapi registry
- * @return \Magento\Webapi\Model\Config
+ * @return $this
*/
protected function _saveToCache($data)
{
diff --git a/app/code/Magento/Webapi/Model/Config/ClassReflector.php b/app/code/Magento/Webapi/Model/Config/ClassReflector.php
index 72cc4f8555870..81b67b4731286 100644
--- a/app/code/Magento/Webapi/Model/Config/ClassReflector.php
+++ b/app/code/Magento/Webapi/Model/Config/ClassReflector.php
@@ -48,8 +48,8 @@ public function __construct(\Magento\Webapi\Model\Config\ClassReflector\TypeProc
/**
* Reflect methods in given class and set retrieved data into reader.
*
- * @param array $methods
* @param string $className
+ * @param array $methods
* @return array
array(
* $firstMethod => array(
* 'documentation' => $methodDocumentation,
diff --git a/app/code/Magento/Webapi/Model/Config/ClassReflector/TypeProcessor.php b/app/code/Magento/Webapi/Model/Config/ClassReflector/TypeProcessor.php
index 72264cf7c75c8..e4a9905737c62 100644
--- a/app/code/Magento/Webapi/Model/Config/ClassReflector/TypeProcessor.php
+++ b/app/code/Magento/Webapi/Model/Config/ClassReflector/TypeProcessor.php
@@ -36,8 +36,7 @@ class TypeProcessor
/**
* Array of types data.
- *
- * @var array array(
+ * array(
* $complexTypeName => array(
* 'documentation' => $typeDocumentation
* 'parameters' => array(
@@ -52,16 +51,19 @@ class TypeProcessor
* ),
* ...
* )
+ *
+ * @var array
*/
protected $_types = array();
/**
* Types class map.
- *
- * @var array array(
+ * array(
* $complexTypeName => $interfaceName,
* ...
* )
+ *
+ * @var array
*/
protected $_typeToClassMap = array();
@@ -105,6 +107,7 @@ public function getTypeData($typeName)
*
* @param string $typeName
* @param array $data
+ * @return void
*/
public function setTypeData($typeName, $data)
{
@@ -182,6 +185,7 @@ protected function _processComplexType($class)
*
* @param \Zend\Code\Reflection\MethodReflection $methodReflection
* @param string $typeName
+ * @return void
*/
protected function _processMethod(\Zend\Code\Reflection\MethodReflection $methodReflection, $typeName)
{
diff --git a/app/code/Magento/Webapi/Model/Config/Integration/Reader.php b/app/code/Magento/Webapi/Model/Config/Integration/Reader.php
index 63afe34d121b0..a1139a0d28304 100644
--- a/app/code/Magento/Webapi/Model/Config/Integration/Reader.php
+++ b/app/code/Magento/Webapi/Model/Config/Integration/Reader.php
@@ -50,8 +50,8 @@ class Reader extends \Magento\Config\Reader\Filesystem
*/
public function __construct(
\Magento\Config\FileResolverInterface $fileResolver,
- \Magento\Webapi\Model\Config\Integration\Converter $converter,
- \Magento\Webapi\Model\Config\Integration\SchemaLocator $schemaLocator,
+ Converter $converter,
+ SchemaLocator $schemaLocator,
\Magento\Config\ValidationStateInterface $validationState,
$fileName = 'integration\api.xml',
$idAttributes = array(),
diff --git a/app/code/Magento/Webapi/Model/Config/Reader.php b/app/code/Magento/Webapi/Model/Config/Reader.php
index c9756afbc4361..a1a50095209e4 100644
--- a/app/code/Magento/Webapi/Model/Config/Reader.php
+++ b/app/code/Magento/Webapi/Model/Config/Reader.php
@@ -50,8 +50,8 @@ class Reader extends \Magento\Config\Reader\Filesystem
*/
public function __construct(
\Magento\Config\FileResolverInterface $fileResolver,
- \Magento\Webapi\Model\Config\Converter $converter,
- \Magento\Webapi\Model\Config\SchemaLocator $schemaLocator,
+ Converter $converter,
+ SchemaLocator $schemaLocator,
\Magento\Config\ValidationStateInterface $validationState,
$fileName = 'webapi.xml',
$idAttributes = array(),
diff --git a/app/code/Magento/Webapi/Model/Plugin/IntegrationServiceV1.php b/app/code/Magento/Webapi/Model/Plugin/IntegrationServiceV1.php
index 3d8cdaa46a0a0..0adb76dd9c454 100644
--- a/app/code/Magento/Webapi/Model/Plugin/IntegrationServiceV1.php
+++ b/app/code/Magento/Webapi/Model/Plugin/IntegrationServiceV1.php
@@ -92,6 +92,7 @@ public function afterGet($integration)
* Add the list of allowed resources to the integration object data by 'resource' key.
*
* @param IntegrationModel $integration
+ * @return void
*/
protected function _addAllowedResources(IntegrationModel $integration)
{
@@ -108,6 +109,7 @@ protected function _addAllowedResources(IntegrationModel $integration)
* If 'all_resources' is set and is evaluated to true, permissions to all resources will be granted.
*
* @param IntegrationModel $integration
+ * @return void
*/
protected function _saveApiPermissions(IntegrationModel $integration)
{
diff --git a/app/code/Magento/Webapi/Model/Plugin/Setup.php b/app/code/Magento/Webapi/Model/Plugin/Setup.php
index f0984acd46830..02a6b4eef123b 100644
--- a/app/code/Magento/Webapi/Model/Plugin/Setup.php
+++ b/app/code/Magento/Webapi/Model/Plugin/Setup.php
@@ -26,6 +26,7 @@
use Magento\Authz\Model\UserIdentifier;
use Magento\Integration\Model\Integration;
+use Magento\Webapi\Model\IntegrationConfig;
/**
* Plugin for Magento\Core\Model\Resource\Setup model to manage resource permissions of
@@ -36,7 +37,7 @@ class Setup
/**
* API Integration config
*
- * @var Config
+ * @var IntegrationConfig
*/
protected $_integrationConfig;
@@ -65,13 +66,13 @@ class Setup
/**
* Construct Setup plugin instance
*
- * @param \Magento\Webapi\Model\IntegrationConfig $integrationConfig
+ * @param IntegrationConfig $integrationConfig
* @param \Magento\Authz\Service\AuthorizationV1 $authzService
* @param \Magento\Integration\Service\IntegrationV1Interface $integrationService
* @param \Magento\Authz\Model\UserIdentifier\Factory $userIdentifierFactory
*/
public function __construct(
- \Magento\Webapi\Model\IntegrationConfig $integrationConfig,
+ IntegrationConfig $integrationConfig,
\Magento\Authz\Service\AuthorizationV1 $authzService,
\Magento\Integration\Service\IntegrationV1Interface $integrationService,
\Magento\Authz\Model\UserIdentifier\Factory $userIdentifierFactory
@@ -85,8 +86,8 @@ public function __construct(
/**
* Process integration resource permissions after the integration is created
*
- * @param array $integrationNames Name of integrations passed as array from the invocation chain
- * @return array
+ * @param string[] $integrationNames Name of integrations passed as array from the invocation chain
+ * @return string[]
*/
public function afterInitIntegrationProcessing($integrationNames)
{
diff --git a/app/code/Magento/Webapi/Model/Rest/Config.php b/app/code/Magento/Webapi/Model/Rest/Config.php
index 7f75332c38e16..edb934460434b 100644
--- a/app/code/Magento/Webapi/Model/Rest/Config.php
+++ b/app/code/Magento/Webapi/Model/Rest/Config.php
@@ -23,7 +23,9 @@
*/
namespace Magento\Webapi\Model\Rest;
+use Magento\Webapi\Controller\Rest\Router\Route;
use \Magento\Webapi\Model\Config\Converter;
+use Magento\Webapi\Model\Config as ModelConfig;
/**
* Webapi Config Model for Rest.
@@ -49,18 +51,18 @@ class Config
const KEY_ACL_RESOURCES = 'resources';
/*#@-*/
- /** @var \Magento\Webapi\Model\Config */
+ /** @var ModelConfig */
protected $_config;
/** @var \Magento\Controller\Router\Route\Factory */
protected $_routeFactory;
/**
- * @param \Magento\Webapi\Model\Config
+ * @param ModelConfig $config
* @param \Magento\Controller\Router\Route\Factory $routeFactory
*/
public function __construct(
- \Magento\Webapi\Model\Config $config,
+ ModelConfig $config,
\Magento\Controller\Router\Route\Factory $routeFactory
) {
$this->_config = $config;
@@ -114,7 +116,7 @@ protected function _getServiceBaseUrl($request)
* Generate the list of available REST routes. Current HTTP method is taken into account.
*
* @param \Magento\Webapi\Controller\Rest\Request $request
- * @return array
+ * @return Route[]
* @throws \Magento\Webapi\Exception
*/
public function getRestRoutes(\Magento\Webapi\Controller\Rest\Request $request)
diff --git a/app/code/Magento/Webapi/Model/Soap/Fault.php b/app/code/Magento/Webapi/Model/Soap/Fault.php
index b748e5bf22449..0e295ca1f348c 100644
--- a/app/code/Magento/Webapi/Model/Soap/Fault.php
+++ b/app/code/Magento/Webapi/Model/Soap/Fault.php
@@ -78,19 +78,19 @@ class Fault extends \RuntimeException
/** @var \Magento\Core\Model\App */
protected $_application;
- /** @var \Magento\Webapi\Model\Soap\Server */
+ /** @var Server */
protected $_soapServer;
/**
* Construct exception.
*
* @param \Magento\Core\Model\App $application
+ * @param Server $soapServer
* @param \Magento\Webapi\Exception $previousException
- * @param \Magento\Webapi\Model\Soap\Server $soapServer
*/
public function __construct(
\Magento\Core\Model\App $application,
- \Magento\Webapi\Model\Soap\Server $soapServer,
+ Server $soapServer,
\Magento\Webapi\Exception $previousException
) {
parent::__construct($previousException->getMessage(), $previousException->getCode(), $previousException);
@@ -145,7 +145,8 @@ public function getFaultName()
/**
* Define current SOAP fault name. It is used as a name of the wrapper node for SOAP fault details.
*
- * @param $exceptionName
+ * @param string $exceptionName
+ * @return void
*/
protected function _setFaultName($exceptionName)
{
@@ -173,7 +174,7 @@ public function getErrorCode()
* Add details about current fault.
*
* @param array $details Associative array containing details about current fault
- * @return \Magento\Webapi\Model\Soap\Fault
+ * @return $this
*/
public function addDetails($details)
{
diff --git a/app/code/Magento/Webapi/Model/Soap/Server.php b/app/code/Magento/Webapi/Model/Soap/Server.php
index cf9e60c9ded32..dc9f366785ae8 100644
--- a/app/code/Magento/Webapi/Model/Soap/Server.php
+++ b/app/code/Magento/Webapi/Model/Soap/Server.php
@@ -107,6 +107,8 @@ public function __construct(
/**
* Handle SOAP request. Response is sent by SOAP server.
+ *
+ * @return void
*/
public function handle()
{
@@ -128,7 +130,7 @@ public function handle()
public function getApiCharset()
{
$charset = $this->_storeManager->getStore()->getConfig(self::CONFIG_PATH_SOAP_CHARSET);
- return $charset ? $charset : \Magento\Webapi\Model\Soap\Server::SOAP_DEFAULT_ENCODING;
+ return $charset ? $charset : self::SOAP_DEFAULT_ENCODING;
}
/**
@@ -141,7 +143,7 @@ public function generateUri($isWsdl = false)
{
$params = array(
self::REQUEST_PARAM_SERVICES => $this->_request->getParam(
- \Magento\Webapi\Model\Soap\Server::REQUEST_PARAM_SERVICES
+ self::REQUEST_PARAM_SERVICES
)
);
if ($isWsdl) {
@@ -166,8 +168,8 @@ public function getEndpointUri()
* Generate exception if request is invalid.
*
* @param string $soapRequest
- * @throws \Magento\Webapi\Exception with invalid SOAP extension
- * @return \Magento\Webapi\Model\Soap\Server
+ * @throws \Magento\Webapi\Exception With invalid SOAP extension
+ * @return $this
*/
protected function _checkRequest($soapRequest)
{
diff --git a/app/code/Magento/Webapi/Model/Soap/Wsdl/ComplexTypeStrategy.php b/app/code/Magento/Webapi/Model/Soap/Wsdl/ComplexTypeStrategy.php
index cc48f70fced4d..88be0a701604d 100644
--- a/app/code/Magento/Webapi/Model/Soap/Wsdl/ComplexTypeStrategy.php
+++ b/app/code/Magento/Webapi/Model/Soap/Wsdl/ComplexTypeStrategy.php
@@ -148,6 +148,7 @@ protected function _processParameters($parameters, $callInfo)
* @param array $parameterData
* @param string $parameterType
* @param array $callInfo
+ * @return void
*/
protected function _processParameter(\DOMElement $element, $isRequired, $parameterData, $parameterType, $callInfo)
{
@@ -168,6 +169,7 @@ protected function _processParameter(\DOMElement $element, $isRequired, $paramet
*
* @param string $type
* @param array $callInfo
+ * @return void
*/
protected function _processArrayParameter($type, $callInfo = array())
{
@@ -195,8 +197,9 @@ protected function _processArrayParameter($type, $callInfo = array())
/**
* Revert required call info data if needed.
*
- * @param boolean $isRequired
- * @param array $callInfo
+ * @param bool $isRequired
+ * @param array &$callInfo
+ * @return void
*/
protected function _revertRequiredCallInfo($isRequired, &$callInfo)
{
@@ -222,6 +225,7 @@ protected function _revertRequiredCallInfo($isRequired, &$callInfo)
* @param string $documentation parameter documentation string
* @param string|null $default
* @param array $callInfo
+ * @return void
*/
public function addAnnotation(\DOMElement $element, $documentation, $default = null, $callInfo = array())
{
@@ -290,6 +294,7 @@ public function addAnnotation(\DOMElement $element, $documentation, $default = n
* @param string $elementType
* @param string $documentation
* @param \DOMElement $appInfoNode
+ * @return void
*/
protected function _processElementType($elementType, $documentation, \DOMElement $appInfoNode)
{
@@ -314,6 +319,7 @@ protected function _processElementType($elementType, $documentation, \DOMElement
* @param string $elementType
* @param string $default
* @param \DOMElement $appInfoNode
+ * @return void
*/
protected function _processDefaultValueAnnotation($elementType, $default, \DOMElement $appInfoNode)
{
@@ -346,9 +352,10 @@ protected function _getElementType(\DOMElement $element)
/**
* Check if there is given annotation in documentation, and if not - create an empty one.
*
- * @param $annotation
- * @param $documentation
+ * @param string $annotation
+ * @param string $documentation
* @param \DOMElement $appInfoNode
+ * @return void
*/
protected function _processRequiredAnnotation($annotation, $documentation, \DOMElement $appInfoNode)
{
@@ -362,7 +369,8 @@ protected function _processRequiredAnnotation($annotation, $documentation, \DOME
* Process 'callInfo' appinfo tag.
*
* @param \DOMElement $appInfoNode
- * @param $callInfo
+ * @param array $callInfo
+ * @return void
*/
protected function _processCallInfo(\DOMElement $appInfoNode, $callInfo)
{
@@ -394,7 +402,8 @@ protected function _processCallInfo(\DOMElement $appInfoNode, $callInfo)
* Process 'docInstructions' appinfo tag.
*
* @param \DOMElement $appInfoNode
- * @param $tagValue
+ * @param string $tagValue
+ * @return void
*/
protected function _processDocInstructions(\DOMElement $appInfoNode, $tagValue)
{
@@ -412,7 +421,8 @@ protected function _processDocInstructions(\DOMElement $appInfoNode, $tagValue)
* Process 'seeLink' appinfo tag.
*
* @param \DOMElement $appInfoNode
- * @param $tagValue
+ * @param string $tagValue
+ * @return void
*/
protected function _processSeeLink(\DOMElement $appInfoNode, $tagValue)
{
@@ -437,8 +447,9 @@ protected function _processSeeLink(\DOMElement $appInfoNode, $tagValue)
/**
* Delete callName if it's already defined in some direction group.
*
- * @param $callInfo
- * @param $callName
+ * @param array &$callInfo
+ * @param string $callName
+ * @return void
*/
protected function _overrideCallInfoName(&$callInfo, $callName)
{
diff --git a/app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php b/app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php
index 018327b311e81..db17cef1f0f36 100644
--- a/app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php
+++ b/app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php
@@ -38,7 +38,7 @@ class Generator
/**
* WSDL factory instance.
*
- * @var \Magento\Webapi\Model\Soap\Wsdl\Factory
+ * @var Factory
*/
protected $_wsdlFactory;
@@ -66,13 +66,13 @@ class Generator
* Initialize dependencies.
*
* @param \Magento\Webapi\Model\Soap\Config $apiConfig
- * @param \Magento\Webapi\Model\Soap\Wsdl\Factory $wsdlFactory
+ * @param Factory $wsdlFactory
* @param \Magento\Webapi\Model\Cache\Type $cache
* @param \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor $typeProcessor
*/
public function __construct(
\Magento\Webapi\Model\Soap\Config $apiConfig,
- \Magento\Webapi\Model\Soap\Wsdl\Factory $wsdlFactory,
+ Factory $wsdlFactory,
\Magento\Webapi\Model\Cache\Type $cache,
\Magento\Webapi\Model\Config\ClassReflector\TypeProcessor $typeProcessor
) {
@@ -346,6 +346,7 @@ public function getOutputMessageName($operationName)
* Walks through all requested services and checks all methods 'in' and 'out' parameters.
*
* @param array $requestedServices
+ * @return void
*/
protected function _collectCallInfo($requestedServices)
{
@@ -362,6 +363,7 @@ protected function _collectCallInfo($requestedServices)
* @param array $interface
* @param string $serviceName
* @param string $methodName
+ * @return void
*/
protected function _processInterfaceCallInfo($interface, $serviceName, $methodName)
{
diff --git a/app/code/Magento/Webapi/view/adminhtml/resourcetree.phtml b/app/code/Magento/Webapi/view/adminhtml/resourcetree.phtml
index 3e89c7bbea568..e09e6a356aea3 100644
--- a/app/code/Magento/Webapi/view/adminhtml/resourcetree.phtml
+++ b/app/code/Magento/Webapi/view/adminhtml/resourcetree.phtml
@@ -49,14 +49,14 @@
-
jsonEncode(array(
- "rolesTree" => array(
+ 'rolesTree' => array(
"treeInitData" => $this->getTree(),
"treeInitSelectedData" => $this->getSelectedResources(),
)
)));
- ?>">
+ ?>'>