Skip to content

Commit 3de5264

Browse files
author
Dale Sikkema
committed
MAGETWO-35004: Investigate and Annotate @api to classes and/or methods
1 parent 729991a commit 3de5264

File tree

6 files changed

+41
-19
lines changed

6 files changed

+41
-19
lines changed

lib/internal/Magento/Framework/App/Config/Data/ProcessorFactory.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,22 @@ public function __construct(\Magento\Framework\ObjectManagerInterface $objectMan
3030
/**
3131
* Get concrete Processor Interface instance
3232
*
33-
* @param string $model
33+
* @param string $processorModel Classname of the instance to get
3434
* @return ProcessorInterface
35-
* @throws \InvalidArgumentException
35+
* @throws \InvalidArgumentException In case the given classname is not an instance of ProcessorInterface
36+
* @api
3637
*/
37-
public function get($model)
38+
public function get($processorModel)
3839
{
39-
if (!isset($this->_pool[$model])) {
40-
$instance = $this->_objectManager->create($model);
40+
if (!isset($this->_pool[$processorModel])) {
41+
$instance = $this->_objectManager->create($processorModel);
4142
if (!$instance instanceof ProcessorInterface) {
4243
throw new \InvalidArgumentException(
43-
$model . ' is not instance of \Magento\Framework\App\Config\Data\ProcessorInterface'
44+
$processorModel . ' is not instance of \Magento\Framework\App\Config\Data\ProcessorInterface'
4445
);
4546
}
46-
$this->_pool[$model] = $instance;
47+
$this->_pool[$processorModel] = $instance;
4748
}
48-
return $this->_pool[$model];
49+
return $this->_pool[$processorModel];
4950
}
5051
}
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
<?php
22
/**
3-
* Processor interface
4-
*
53
* Copyright © 2015 Magento. All rights reserved.
64
* See COPYING.txt for license details.
75
*/
86
namespace Magento\Framework\App\Config\Data;
97

8+
/**
9+
* Processes data from admin store configuration fields
10+
*
11+
* @api
12+
*/
1013
interface ProcessorInterface
1114
{
1215
/**
1316
* Process config value
1417
*
15-
* @param string $value
16-
* @return string
18+
* @param string $value Raw value of the configuration field
19+
* @return string Processed value
1720
*/
1821
public function processValue($value);
1922
}

lib/internal/Magento/Framework/App/Config/DataInterface.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,21 @@
55
*/
66
namespace Magento\Framework\App\Config;
77

8+
/**
9+
* @api
10+
*/
811
interface DataInterface
912
{
1013
/**
1114
* @param string|null $path
1215
* @return string|array
1316
*/
1417
public function getValue($path);
18+
19+
/**
20+
* @param string $path
21+
* @param mixed $value
22+
* @return void
23+
*/
24+
public function setValue($path, $value);
1525
}

lib/internal/Magento/Framework/App/Config/Resource/ConfigInterface.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
namespace Magento\Framework\App\Config\Resource;
77

88
/**
9-
* Resource Config Interface
9+
* Resource for storing store configuration values
10+
*
11+
* @api
1012
*/
1113
interface ConfigInterface
1214
{
1315
/**
14-
* Save config value
16+
* Save config value to the storage resource
1517
*
1618
* @param string $path
1719
* @param string $value
@@ -22,7 +24,7 @@ interface ConfigInterface
2224
public function saveConfig($path, $value, $scope, $scopeId);
2325

2426
/**
25-
* Delete config value
27+
* Delete config value from the storage resource
2628
*
2729
* @param string $path
2830
* @param string $scope

lib/internal/Magento/Framework/Message/Factory.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ public function __construct(ObjectManagerInterface $objectManager)
4545
}
4646

4747
/**
48-
* Create message instance with specified parameters
48+
* Create a message instance of a given type with given text.
4949
*
50-
* @param string $type
51-
* @param string $text
52-
* @throws \InvalidArgumentException
50+
* @param string $type The message type to create, must implement \Magento\Framework\Message\MessageInterface
51+
* @param string $text The text to inject into the message
52+
* @throws \InvalidArgumentException Exception gets thrown if given type does not implement MessageInterface
5353
* @return MessageInterface
54+
*
55+
* @api
5456
*/
5557
public function create($type, $text)
5658
{

lib/internal/Magento/Framework/Object/Copy.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ public function __construct(
4747
* @param array|\Magento\Framework\Object $target
4848
* @param string $root
4949
* @return array|\Magento\Framework\Object|null the value of $target
50+
*
51+
* @api
5052
*/
5153
public function copyFieldsetToTarget($fieldset, $aspect, $source, $target, $root = 'global')
5254
{
@@ -91,6 +93,8 @@ public function copyFieldsetToTarget($fieldset, $aspect, $source, $target, $root
9193
* @param array|\Magento\Framework\Object $source
9294
* @param string $root
9395
* @return array $data
96+
*
97+
* @api
9498
*/
9599
public function getDataFromFieldset($fieldset, $aspect, $source, $root = 'global')
96100
{

0 commit comments

Comments
 (0)