Skip to content

Commit 4f8cc5c

Browse files
author
Kovsher, Iurii(ikovsher)
committed
Merge pull request #315 from magento-tango/MAGETWO-36095
[Tango] API
2 parents 77e1bfd + 342f476 commit 4f8cc5c

File tree

8 files changed

+20
-13
lines changed

8 files changed

+20
-13
lines changed

app/code/Magento/Captcha/Block/Captcha/DefaultCaptcha.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ protected function _toHtml()
7979
/**
8080
* Returns captcha model
8181
*
82-
* @return \Magento\Captcha\Model\ModelInterface
82+
* @return \Magento\Captcha\Model\CaptchaInterface
8383
*/
8484
public function getCaptchaModel()
8585
{

app/code/Magento/Captcha/Helper/Data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function __construct(
8181
* Get Captcha
8282
*
8383
* @param string $formId
84-
* @return \Magento\Captcha\Model\ModelInterface
84+
* @return \Magento\Captcha\Model\CaptchaInterface
8585
*/
8686
public function getCaptcha($formId)
8787
{

app/code/Magento/Captcha/Model/CaptchaFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ public function __construct(\Magento\Framework\ObjectManagerInterface $objectMan
2727
*
2828
* @param string $captchaType
2929
* @param string $formId
30-
* @return \Magento\Captcha\Model\ModelInterface
30+
* @return \Magento\Captcha\Model\CaptchaInterface
3131
* @throws \InvalidArgumentException
3232
*/
3333
public function create($captchaType, $formId)
3434
{
3535
$className = 'Magento\Captcha\Model\\' . ucfirst($captchaType);
3636

3737
$instance = $this->_objectManager->create($className, ['formId' => $formId]);
38-
if (!$instance instanceof \Magento\Captcha\Model\ModelInterface) {
38+
if (!$instance instanceof \Magento\Captcha\Model\CaptchaInterface) {
3939
throw new \InvalidArgumentException(
40-
$className . ' does not implement \Magento\Captcha\Model\ModelInterface'
40+
$className . ' does not implement \Magento\Captcha\Model\CaptchaInterface'
4141
);
4242
}
4343
return $instance;

app/code/Magento/Captcha/Model/ModelInterface.php renamed to app/code/Magento/Captcha/Model/CaptchaInterface.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77
*/
88
namespace Magento\Captcha\Model;
99

10-
interface ModelInterface
10+
/**
11+
* Captcha Model Interface
12+
*
13+
* @api
14+
*/
15+
interface CaptchaInterface
1116
{
1217
/**
1318
* Generates captcha

app/code/Magento/Captcha/Model/Checkout/ConfigProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ protected function isRequired($formId)
119119
* Return captcha model for specified form
120120
*
121121
* @param string $formId
122-
* @return \Magento\Captcha\Model\ModelInterface
122+
* @return \Magento\Captcha\Model\CaptchaInterface
123123
*/
124124
protected function getCaptchaModel($formId)
125125
{

app/code/Magento/Captcha/Model/DefaultModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* @author Magento Core Team <core@magentocommerce.com>
1212
*/
13-
class DefaultModel extends \Zend_Captcha_Image implements \Magento\Captcha\Model\ModelInterface
13+
class DefaultModel extends \Zend_Captcha_Image implements \Magento\Captcha\Model\CaptchaInterface
1414
{
1515
/**
1616
* Key in session for captcha code

app/code/Magento/Captcha/Test/Unit/Model/CaptchaFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function testCreateNegative()
5858
'InvalidArgumentException',
5959
'Magento\Captcha\Model\\' . ucfirst(
6060
$captchaType
61-
) . ' does not implement \Magento\Captcha\Model\ModelInterface'
61+
) . ' does not implement \Magento\Captcha\Model\CaptchaInterface'
6262
);
6363

6464
$this->assertEquals($defaultCaptchaMock, $this->_model->create($captchaType, 'form_id'));

app/code/Magento/Widget/Model/Widget.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@
66

77
// @codingStandardsIgnoreFile
88

9+
namespace Magento\Widget\Model;
10+
911
/**
1012
* Widget model for different purposes
11-
*
12-
* @author Magento Core Team <core@magentocommerce.com>
1313
*/
14-
namespace Magento\Widget\Model;
15-
1614
class Widget
1715
{
1816
/**
@@ -86,6 +84,7 @@ public function __construct(
8684
*
8785
* @param string $type Widget type
8886
* @return null|array
87+
* @api
8988
*/
9089
public function getWidgetByClassType($type)
9190
{
@@ -185,6 +184,7 @@ public function getConfigAsObject($type)
185184
*
186185
* @param array $filters Key-value array of filters for widget node properties
187186
* @return array
187+
* @api
188188
*/
189189
public function getWidgets($filters = [])
190190
{
@@ -215,6 +215,7 @@ public function getWidgets($filters = [])
215215
*
216216
* @param array $filters Key-value array of filters for widget node properties
217217
* @return array
218+
* @api
218219
*/
219220
public function getWidgetsArray($filters = [])
220221
{
@@ -241,6 +242,7 @@ public function getWidgetsArray($filters = [])
241242
* @param array $params Pre-configured Widget Params
242243
* @param bool $asIs Return result as widget directive(true) or as placeholder image(false)
243244
* @return string Widget directive ready to parse
245+
* @api
244246
*/
245247
public function getWidgetDeclaration($type, $params = [], $asIs = true)
246248
{

0 commit comments

Comments
 (0)