Skip to content

Commit 81a9461

Browse files
committed
MAGETWO-36836: Other lib api annotations
- Changes based on architectural code review feedback.
1 parent 3cd45a0 commit 81a9461

File tree

7 files changed

+12
-27
lines changed

7 files changed

+12
-27
lines changed

lib/internal/Magento/Framework/Archive/ArchiveInterface.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
*/
1212
namespace Magento\Framework\Archive;
1313

14+
/**
15+
* @api
16+
*/
1417
interface ArchiveInterface
1518
{
1619
/**
@@ -19,7 +22,6 @@ interface ArchiveInterface
1922
* @param string $source
2023
* @param string $destination
2124
* @return string
22-
* @api
2325
*/
2426
public function pack($source, $destination);
2527

@@ -29,7 +31,6 @@ public function pack($source, $destination);
2931
* @param string $source
3032
* @param string $destination
3133
* @return string
32-
* @api
3334
*/
3435
public function unpack($source, $destination);
3536
}

lib/internal/Magento/Framework/Stdlib/Cookie/CookieReaderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
/**
1010
* CookieReaderInterface provides the ability to read cookies sent in a request.
11+
* @api
1112
*/
1213
interface CookieReaderInterface
1314
{
@@ -17,7 +18,6 @@ interface CookieReaderInterface
1718
* @param string $name
1819
* @param string|null $default The default value to return if no value could be found for the given $name.
1920
* @return string|null
20-
* @api
2121
*/
2222
public function getCookie($name, $default = null);
2323
}

lib/internal/Magento/Framework/Stdlib/Cookie/CookieScopeInterface.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
/**
99
* CookieScope is used to store default scope metadata.
10+
* @api
1011
*/
1112
interface CookieScopeInterface
1213
{
@@ -16,7 +17,6 @@ interface CookieScopeInterface
1617
*
1718
* @param SensitiveCookieMetadata|null $override
1819
* @return SensitiveCookieMetadata
19-
* @api
2020
*/
2121
public function getSensitiveCookieMetadata(SensitiveCookieMetadata $override = null);
2222

@@ -26,7 +26,6 @@ public function getSensitiveCookieMetadata(SensitiveCookieMetadata $override = n
2626
*
2727
* @param PublicCookieMetadata|null $override
2828
* @return PublicCookieMetadata
29-
* @api
3029
*/
3130
public function getPublicCookieMetadata(PublicCookieMetadata $override = null);
3231

@@ -36,7 +35,6 @@ public function getPublicCookieMetadata(PublicCookieMetadata $override = null);
3635
*
3736
* @param CookieMetadata|null $override
3837
* @return CookieMetadata
39-
* @api
4038
*/
4139
public function getCookieMetadata(CookieMetadata $override = null);
4240
}

lib/internal/Magento/Framework/Stdlib/CookieManagerInterface.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* The cookie manager will make it possible for an application to indicate if a cookie contains sensitive data,
2121
* this will allow extra protection to be added to the contents of the cookie as well sending directives to the browser
2222
* about how the cookie should be stored and whether JavaScript can access the cookie.
23+
* @api
2324
*/
2425
interface CookieManagerInterface extends CookieReaderInterface
2526
{
@@ -36,7 +37,6 @@ interface CookieManagerInterface extends CookieReaderInterface
3637
* there is still no guarantee that the browser received and accepted the cookie.
3738
* @throws CookieSizeLimitReachedException Thrown when the cookie is too big to store any additional data.
3839
* @throws InputException If the cookie name is empty or contains invalid characters.
39-
* @api
4040
*/
4141
public function setSensitiveCookie($name, $value, SensitiveCookieMetadata $metadata = null);
4242

@@ -53,7 +53,6 @@ public function setSensitiveCookie($name, $value, SensitiveCookieMetadata $metad
5353
* @throws FailureToSendException If cookie couldn't be sent to the browser.
5454
* @throws CookieSizeLimitReachedException Thrown when the cookie is too big to store any additional data.
5555
* @throws InputException If the cookie name is empty or contains invalid characters.
56-
* @api
5756
*/
5857
public function setPublicCookie($name, $value, PublicCookieMetadata $metadata = null);
5958

@@ -67,7 +66,6 @@ public function setPublicCookie($name, $value, PublicCookieMetadata $metadata =
6766
* If this exception isn't thrown, there is still no guarantee that the browser
6867
* received and accepted the request to delete this cookie.
6968
* @throws InputException If the cookie name is empty or contains invalid characters.
70-
* @api
7169
*/
7270
public function deleteCookie($name, CookieMetadata $metadata = null);
7371
}

lib/internal/Magento/Framework/Stdlib/DateTime/DateTime.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ public function date($format = null, $input = null)
103103
*
104104
* @param int|string $input date in current timezone
105105
* @return int
106-
* @api
107106
*/
108107
public function gmtTimestamp($input = null)
109108
{
@@ -130,7 +129,6 @@ public function gmtTimestamp($input = null)
130129
*
131130
* @param int|string $input date in GMT timezone
132131
* @return int
133-
* @api
134132
*/
135133
public function timestamp($input = null)
136134
{

lib/internal/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,22 @@
88

99
namespace Magento\Framework\Stdlib\DateTime;
1010

11+
/**
12+
* @api
13+
*/
1114
interface TimezoneInterface
1215
{
1316
/**
1417
* Return path to default timezone
1518
*
1619
* @return string
17-
* @api
1820
*/
1921
public function getDefaultTimezonePath();
2022

2123
/**
2224
* Retrieve timezone code
2325
*
2426
* @return string
25-
* @api
2627
*/
2728
public function getDefaultTimezone();
2829

@@ -31,15 +32,13 @@ public function getDefaultTimezone();
3132
*
3233
* @param int $type
3334
* @return string
34-
* @api
3535
*/
3636
public function getDateFormat($type = \IntlDateFormatter::SHORT);
3737

3838
/**
3939
* Retrieve short date format with 4-digit year
4040
*
4141
* @return string
42-
* @api
4342
*/
4443
public function getDateFormatWithLongYear();
4544

@@ -48,7 +47,6 @@ public function getDateFormatWithLongYear();
4847
*
4948
* @param string $type
5049
* @return string
51-
* @api
5250
*/
5351
public function getTimeFormat($type = null);
5452

@@ -57,7 +55,6 @@ public function getTimeFormat($type = null);
5755
*
5856
* @param string $type
5957
* @return string
60-
* @api
6158
*/
6259
public function getDateTimeFormat($type);
6360

@@ -68,7 +65,6 @@ public function getDateTimeFormat($type);
6865
* @param string $locale
6966
* @param bool $useTimezone
7067
* @return \DateTime
71-
* @api
7268
*/
7369
public function date($date = null, $locale = null, $useTimezone = true);
7470

@@ -79,7 +75,6 @@ public function date($date = null, $locale = null, $useTimezone = true);
7975
* @param string|integer|\DateTime|array|null $date date in UTC
8076
* @param boolean $includeTime flag for including time to date
8177
* @return \DateTime
82-
* @api
8378
*/
8479
public function scopeDate($scope = null, $date = null, $includeTime = false);
8580

@@ -89,7 +84,6 @@ public function scopeDate($scope = null, $date = null, $includeTime = false);
8984
*
9085
* @param mixed $scope
9186
* @return int
92-
* @api
9387
*/
9488
public function scopeTimeStamp($scope = null);
9589

@@ -100,7 +94,6 @@ public function scopeTimeStamp($scope = null);
10094
* @param int $format
10195
* @param bool $showTime
10296
* @return string
103-
* @api
10497
*/
10598
public function formatDate(
10699
$date = null,
@@ -112,7 +105,6 @@ public function formatDate(
112105
* Gets the scope config timezone
113106
*
114107
* @return string
115-
* @api
116108
*/
117109
public function getConfigTimezone();
118110

@@ -123,7 +115,6 @@ public function getConfigTimezone();
123115
* @param string|null $dateFrom
124116
* @param string|null $dateTo
125117
* @return bool
126-
* @api
127118
*/
128119
public function isScopeDateInInterval($scope, $dateFrom = null, $dateTo = null);
129120

@@ -135,7 +126,6 @@ public function isScopeDateInInterval($scope, $dateFrom = null, $dateTo = null);
135126
* @param null $timezone
136127
* @param string|null $pattern
137128
* @return string
138-
* @api
139129
*/
140130
public function formatDateTime(
141131
\DateTimeInterface $date,

lib/internal/Magento/Framework/Validator/ValidatorInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,30 @@
77
*/
88
namespace Magento\Framework\Validator;
99

10+
/**
11+
* @api
12+
*/
1013
interface ValidatorInterface extends \Zend_Validate_Interface
1114
{
1215
/**
1316
* Set translator instance.
1417
*
1518
* @param \Magento\Framework\Translate\AdapterInterface|null $translator
1619
* @return \Magento\Framework\Validator\ValidatorInterface
17-
* @api
1820
*/
1921
public function setTranslator($translator = null);
2022

2123
/**
2224
* Get translator.
2325
*
2426
* @return \Magento\Framework\Translate\AdapterInterface|null
25-
* @api
2627
*/
2728
public function getTranslator();
2829

2930
/**
3031
* Check that translator is set.
3132
*
3233
* @return boolean
33-
* @api
3434
*/
3535
public function hasTranslator();
3636
}

0 commit comments

Comments
 (0)