Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHPDOC] Fix bad phpdoc for Magento\Framework\Message\ManagerInterface #39153

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0c33ab9
Fix bad phpdoc for Magento\Framework\Message\ManagerInterface
Sep 10, 2024
0889a17
Merge branch '2.4-develop' into bad-phpdoc-ManagerInterface
engcom-Hotel Dec 16, 2024
863bae7
Merge branch '2.4-develop' into bad-phpdoc-ManagerInterface
engcom-Charlie Dec 18, 2024
c8abbb9
Fixed static test failures
engcom-Charlie Dec 18, 2024
7609f8a
Merge branch '2.4-develop' into bad-phpdoc-ManagerInterface
engcom-Charlie Dec 19, 2024
801efbe
Fixed static test failures
engcom-Charlie Dec 19, 2024
834e8c3
Merge branch 'bad-phpdoc-ManagerInterface' of https://github.com/dimi…
engcom-Charlie Dec 19, 2024
875fbfc
Fixed static test failures
engcom-Charlie Dec 19, 2024
ab100b4
Fixed static test failures
engcom-Charlie Dec 23, 2024
4dc8d3d
Merge branch '2.4-develop' into bad-phpdoc-ManagerInterface
engcom-Charlie Dec 23, 2024
a567199
Fixed static test failures
engcom-Charlie Dec 23, 2024
20bdc77
Merge branch 'bad-phpdoc-ManagerInterface' of https://github.com/dimi…
engcom-Charlie Dec 23, 2024
071dd7e
Fixed static test failures
engcom-Charlie Dec 31, 2024
aa2ded9
Merge branch '2.4-develop' into bad-phpdoc-ManagerInterface
engcom-Hotel Jan 6, 2025
16c6364
Merge branch '2.4-develop' into bad-phpdoc-ManagerInterface
engcom-Charlie Jan 8, 2025
dcf084d
PHPDoc: Use \Stringable instead of \Magento\Framework\Message\Manager…
Jan 31, 2025
388a859
Merge branch '2.4-develop' into bad-phpdoc-ManagerInterface
ihor-sviziev Feb 3, 2025
5657cd0
Merge branch '2.4-develop' into bad-phpdoc-ManagerInterface
dimitriBouteille Feb 6, 2025
5d7e258
Merge branch '2.4-develop' into bad-phpdoc-ManagerInterface
dimitriBouteille Feb 11, 2025
d2c4cdb
Revert "Fixed static test failures"
engcom-Charlie Feb 12, 2025
b68d8b7
After revert, fixed some code base to avoid static tests failures
engcom-Charlie Feb 12, 2025
a25d310
Fixed static test fialure
engcom-Charlie Feb 13, 2025
5f5643f
Merge branch '2.4-develop' into bad-phpdoc-ManagerInterface
engcom-Charlie Feb 14, 2025
ecff80d
Merge branch '2.4-develop' into bad-phpdoc-ManagerInterface
engcom-Charlie Feb 17, 2025
15cd7ae
Merge branch '2.4-develop' into bad-phpdoc-ManagerInterface
dimitriBouteille Feb 17, 2025
871ba52
Merge branch '2.4-develop' into bad-phpdoc-ManagerInterface
engcom-Charlie Feb 17, 2025
1e7b0ed
Merge branch '2.4-develop' into bad-phpdoc-ManagerInterface
dimitriBouteille Mar 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 13 additions & 100 deletions lib/internal/Magento/Framework/Message/Manager.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2017 Adobe
* All Rights Reserved.
*/
namespace Magento\Framework\Message;

Expand All @@ -21,7 +21,7 @@ class Manager implements ManagerInterface
/**
* Default message group
*/
const DEFAULT_GROUP = 'default';
public const DEFAULT_GROUP = 'default';

/**
* @var Session
Expand Down Expand Up @@ -88,7 +88,7 @@ public function __construct(
$this->logger = $logger;
$this->defaultGroup = $defaultGroup;
$this->exceptionMessageFactory = $exceptionMessageFactory ?: ObjectManager::getInstance()
->get(ExceptionMessageLookupFactory::class);
->get(ExceptionMessageLookupFactory::class); // phpcs:ignore
}

/**
Expand All @@ -112,10 +112,6 @@ protected function prepareGroup($group)

/**
* @inheritdoc
*
* @param bool $clear
* @param string|null $group
* @return Collection
*/
public function getMessages($clear = false, $group = null)
{
Expand All @@ -135,10 +131,6 @@ public function getMessages($clear = false, $group = null)

/**
* @inheritdoc
*
* @param MessageInterface $message
* @param string|null $group
* @return $this
*/
public function addMessage(MessageInterface $message, $group = null)
{
Expand All @@ -150,10 +142,6 @@ public function addMessage(MessageInterface $message, $group = null)

/**
* @inheritdoc
*
* @param MessageInterface[] $messages
* @param string|null $group
* @return $this
*/
public function addMessages(array $messages, $group = null)
{
Expand All @@ -167,10 +155,6 @@ public function addMessages(array $messages, $group = null)

/**
* @inheritdoc
*
* @param string $message
* @param string|null $group
* @return $this
*/
public function addError($message, $group = null)
{
Expand All @@ -180,10 +164,6 @@ public function addError($message, $group = null)

/**
* @inheritdoc
*
* @param string $message
* @param string|null $group
* @return $this
*/
public function addWarning($message, $group = null)
{
Expand All @@ -193,10 +173,6 @@ public function addWarning($message, $group = null)

/**
* @inheritdoc
*
* @param string $message
* @param string|null $group
* @return $this
*/
public function addNotice($message, $group = null)
{
Expand All @@ -206,10 +182,6 @@ public function addNotice($message, $group = null)

/**
* @inheritdoc
*
* @param string $message
* @param string|null $group
* @return $this
*/
public function addSuccess($message, $group = null)
{
Expand All @@ -219,10 +191,6 @@ public function addSuccess($message, $group = null)

/**
* @inheritdoc
*
* @param MessageInterface[] $messages
* @param string|null $group
* @return $this
*/
public function addUniqueMessages(array $messages, $group = null)
{
Expand All @@ -239,11 +207,6 @@ public function addUniqueMessages(array $messages, $group = null)

/**
* @inheritdoc
*
* @param \Exception $exception
* @param string $alternativeText
* @param string $group
* @return $this
*/
public function addException(\Exception $exception, $alternativeText = null, $group = null)
{
Expand Down Expand Up @@ -282,11 +245,6 @@ public function hasMessages()

/**
* @inheritdoc
*
* @param \Exception $exception
* @param string $alternativeText
* @param string $group
* @return $this
*/
public function addExceptionMessage(\Exception $exception, $alternativeText = null, $group = null)
{
Expand Down Expand Up @@ -314,11 +272,7 @@ public function addExceptionMessage(\Exception $exception, $alternativeText = nu
}

/**
* Adds new error message
*
* @param string $message
* @param string|null $group
* @return ManagerInterface
* @inheritdoc
*/
public function addErrorMessage($message, $group = null)
{
Expand All @@ -331,11 +285,7 @@ public function addErrorMessage($message, $group = null)
}

/**
* Adds new warning message
*
* @param string $message
* @param string|null $group
* @return ManagerInterface
* @inheritdoc
*/
public function addWarningMessage($message, $group = null)
{
Expand All @@ -348,11 +298,7 @@ public function addWarningMessage($message, $group = null)
}

/**
* Adds new notice message
*
* @param string $message
* @param string|null $group
* @return ManagerInterface
* @inheritdoc
*/
public function addNoticeMessage($message, $group = null)
{
Expand All @@ -365,11 +311,7 @@ public function addNoticeMessage($message, $group = null)
}

/**
* Adds new success message
*
* @param string $message
* @param string|null $group
* @return ManagerInterface
* @inheritdoc
*/
public function addSuccessMessage($message, $group = null)
{
Expand All @@ -382,13 +324,7 @@ public function addSuccessMessage($message, $group = null)
}

/**
* Adds new complex error message
*
* @param string $identifier
* @param array $data
* @param string|null $group
* @return ManagerInterface
* @throws \InvalidArgumentException
* @inheritdoc
*/
public function addComplexErrorMessage($identifier, array $data = [], $group = null)
{
Expand All @@ -403,13 +339,7 @@ public function addComplexErrorMessage($identifier, array $data = [], $group = n
}

/**
* Adds new complex warning message
*
* @param string $identifier
* @param array $data
* @param string|null $group
* @return ManagerInterface
* @throws \InvalidArgumentException
* @inheritdoc
*/
public function addComplexWarningMessage($identifier, array $data = [], $group = null)
{
Expand All @@ -424,13 +354,7 @@ public function addComplexWarningMessage($identifier, array $data = [], $group =
}

/**
* Adds new complex notice message
*
* @param string $identifier
* @param array $data
* @param string|null $group
* @return ManagerInterface
* @throws \InvalidArgumentException
* @inheritdoc
*/
public function addComplexNoticeMessage($identifier, array $data = [], $group = null)
{
Expand All @@ -445,13 +369,7 @@ public function addComplexNoticeMessage($identifier, array $data = [], $group =
}

/**
* Adds new complex success message
*
* @param string $identifier
* @param array $data
* @param string|null $group
* @return ManagerInterface
* @throws \InvalidArgumentException
* @inheritdoc
*/
public function addComplexSuccessMessage($identifier, array $data = [], $group = null)
{
Expand All @@ -466,12 +384,7 @@ public function addComplexSuccessMessage($identifier, array $data = [], $group =
}

/**
* Creates identified message
*
* @param string $type
* @param string|null $identifier
* @return MessageInterface
* @throws \InvalidArgumentException
* @inheritdoc
*/
public function createMessage($type, $identifier = null)
{
Expand Down
25 changes: 15 additions & 10 deletions lib/internal/Magento/Framework/Message/ManagerInterface.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2017 Adobe
* All Rights Reserved.
*/
namespace Magento\Framework\Message;

Expand Down Expand Up @@ -50,7 +50,7 @@ public function addMessages(array $messages, $group = null);
/**
* Adds new error message
*
* @param string $message
* @param string|\Stringable $message
* @param string|null $group
* @return ManagerInterface
* @deprecated 100.1.0
Expand All @@ -61,7 +61,7 @@ public function addError($message, $group = null);
/**
* Adds new warning message
*
* @param string $message
* @param string|\Stringable $message
* @param string|null $group
* @return ManagerInterface
* @deprecated 100.1.0
Expand All @@ -72,7 +72,7 @@ public function addWarning($message, $group = null);
/**
* Adds new notice message
*
* @param string $message
* @param string|\Stringable $message
* @param string|null $group
* @return ManagerInterface
* @deprecated 100.1.0
Expand All @@ -83,7 +83,7 @@ public function addNotice($message, $group = null);
/**
* Adds new success message
*
* @param string $message
* @param string|\Stringable $message
* @param string|null $group
* @return ManagerInterface
* @deprecated 100.1.0
Expand All @@ -94,7 +94,7 @@ public function addSuccess($message, $group = null);
/**
* Adds new error message
*
* @param string $message
* @param string|\Stringable $message
* @param string|null $group
* @return ManagerInterface
*/
Expand All @@ -103,7 +103,7 @@ public function addErrorMessage($message, $group = null);
/**
* Adds new warning message
*
* @param string $message
* @param string|\Stringable $message
* @param string|null $group
* @return ManagerInterface
*/
Expand All @@ -112,7 +112,7 @@ public function addWarningMessage($message, $group = null);
/**
* Adds new notice message
*
* @param string $message
* @param string|\Stringable $message
* @param string|null $group
* @return ManagerInterface
*/
Expand All @@ -121,7 +121,7 @@ public function addNoticeMessage($message, $group = null);
/**
* Adds new success message
*
* @param string $message
* @param string|\Stringable $message
* @param string|null $group
* @return ManagerInterface
*/
Expand All @@ -134,6 +134,7 @@ public function addSuccessMessage($message, $group = null);
* @param array $data
* @param string|null $group
* @return ManagerInterface
* @throws \InvalidArgumentException
*/
public function addComplexErrorMessage($identifier, array $data = [], $group = null);

Expand All @@ -144,6 +145,7 @@ public function addComplexErrorMessage($identifier, array $data = [], $group = n
* @param array $data
* @param string|null $group
* @return ManagerInterface
* @throws \InvalidArgumentException
*/
public function addComplexWarningMessage($identifier, array $data = [], $group = null);

Expand All @@ -154,6 +156,7 @@ public function addComplexWarningMessage($identifier, array $data = [], $group =
* @param array $data
* @param string|null $group
* @return ManagerInterface
* @throws \InvalidArgumentException
*/
public function addComplexNoticeMessage($identifier, array $data = [], $group = null);

Expand All @@ -164,6 +167,7 @@ public function addComplexNoticeMessage($identifier, array $data = [], $group =
* @param array $data
* @param string|null $group
* @return ManagerInterface
* @throws \InvalidArgumentException
*/
public function addComplexSuccessMessage($identifier, array $data = [], $group = null);

Expand Down Expand Up @@ -195,6 +199,7 @@ public function addException(\Exception $exception, $alternativeText = null, $gr
* @param string|null $alternativeText
* @param string|null $group
* @return ManagerInterface
* @throws \InvalidArgumentException
*/
public function addExceptionMessage(\Exception $exception, $alternativeText = null, $group = null);

Expand Down