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

Fixes incorrectly cased namespace usages. #37574

Open
wants to merge 2 commits into
base: 2.4-develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions app/code/Magento/Sales/Model/Order/Creditmemo/Notifier.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 2016 Adobe
* All Rights Reserved.
*/
namespace Magento\Sales\Model\Order\Creditmemo;

Expand All @@ -14,20 +14,20 @@
class Notifier implements \Magento\Sales\Model\Order\Creditmemo\NotifierInterface
{
/**
* @var \Magento\Sales\Model\Order\CreditMemo\SenderInterface[]
* @var \Magento\Sales\Model\Order\Creditmemo\SenderInterface[]
*/
private $senders;

/**
* @param \Magento\Sales\Model\Order\CreditMemo\SenderInterface[] $senders
* @param \Magento\Sales\Model\Order\Creditmemo\SenderInterface[] $senders
*/
public function __construct(array $senders = [])
{
$this->senders = $senders;
}

/**
* {@inheritdoc}
* @inheritdoc
* @since 100.1.3
*/
public function notify(
Expand Down
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 2015 Adobe
* All Rights Reserved.
*/
declare(strict_types=1);

Expand Down Expand Up @@ -89,19 +89,16 @@ protected function setUp(): void
$taxData = $this->getMockBuilder(Data::class)
->disableOriginalConstructor()
->getMock();
$this->priceCurrency = $this->getMockBuilder(
PriceCurrencyInterface::class
)->getMock();
$this->priceCurrency = $this->getMockBuilder(PriceCurrencyInterface::class)
->getMock();
$sessionMock = $this->getMockBuilder(Quote::class)
->disableOriginalConstructor()
->onlyMethods(['getQuote'])
->getMock();

$quoteMock = $this->getMockBuilder(\Magento\Quote\Model\Quote::class)
->disableOriginalConstructor()
->onlyMethods(['getStore'])
->getMock();

$storeMock = $this->getMockBuilder(Store::class)
->disableOriginalConstructor()
->getMock();
Expand All @@ -115,7 +112,7 @@ protected function setUp(): void
->addMethods(['methods'])
->getMock();

$giftMessageSave = $this->getMockBuilder(\Magento\Giftmessage\Model\Save::class)
$giftMessageSave = $this->getMockBuilder(\Magento\GiftMessage\Model\Save::class)
->disableOriginalConstructor()
->getMock();

Expand Down
12 changes: 6 additions & 6 deletions app/code/Magento/Tax/Block/Item/Price/Renderer.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2014 Adobe
* All Rights Reserved.
*/
namespace Magento\Tax\Block\Item\Price;

use Magento\Framework\Pricing\PriceCurrencyInterface;
use Magento\Framework\Pricing\Render as PricingRender;
use Magento\Framework\View\Element\Template\Context;
use Magento\Quote\Model\Quote\Item\AbstractItem as QuoteItem;
use Magento\Sales\Model\Order\CreditMemo\Item as CreditMemoItem;
use Magento\Sales\Model\Order\Creditmemo\Item as CreditMemoItem;
use Magento\Sales\Model\Order\Invoice\Item as InvoiceItem;
use Magento\Sales\Model\Order\Item as OrderItem;
use Magento\Tax\Helper\Data as TaxHelper;
Expand All @@ -18,7 +18,6 @@
* Item price render block
*
* @api
* @author Magento Core Team <core@magentocommerce.com>
* @since 100.0.2
*/
class Renderer extends \Magento\Framework\View\Element\Template
Expand Down Expand Up @@ -106,6 +105,8 @@ public function setZone($zone)
}

/**
* Get store id
*
* @return int|null|string
*/
public function getStoreId()
Expand Down Expand Up @@ -201,8 +202,7 @@ public function formatPrice($price)
}

/**
* Get item price in display currency or order currency depending
* on item type
* Get item price in display currency or order currency depending on item type
*
* @return float
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2016 Adobe
* All Rights Reserved.
*/
namespace Magento\Tax\Model\Api\SearchCriteria\JoinProcessor;

use Magento\Framework\Api\SearchCriteria\CollectionProcessor\JoinProcessor\CustomJoinInterface;
use Magento\Framework\Data\Collection\AbstractDb;

/**
* Class CalculationData
* @package Magento\Tax\Model\Api\SearchCriteria\JoinProcessor
*/
class CalculationData implements CustomJoinInterface
{
/** Alias of table, that will be joined */
const CALCULATION_DATA_ALIAS = "cd";
public const CALCULATION_DATA_ALIAS = "cd";

/**
* Apply join to collection
*
* @param \Magento\Tax\Model\ResourceModel\Calculation\Rule\Collection $collection
* @return bool
*/
public function apply(AbstractDb $collection)
{
$isNotApplied = !array_key_exists(
self::CALCULATION_DATA_ALIAS,
$collection->getSelect()->getPart(\Magento\Framework\Db\Select::FROM)
$collection->getSelect()->getPart(\Magento\Framework\DB\Select::FROM)
);
if ($isNotApplied) {
$collection->joinCalculationData(self::CALCULATION_DATA_ALIAS);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2018 Adobe
* All Rights Reserved.
*/

namespace Magento\Framework\Setup\Declaration\Schema\DataSavior;

use Magento\Framework\App\ResourceConnection;
use Magento\Framework\Db\Select;
use Magento\Framework\DB\Select;

/**
* Yields data from database by select objects
Expand Down
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 2015 Adobe
* All Rights Reserved.
*/
namespace Magento\Framework\View\Element\Template\File;

Expand All @@ -26,7 +26,7 @@ class Validator
/**
* View filesystem
*
* @var \Magento\Framework\FileSystem
* @var \Magento\Framework\Filesystem
*/
protected $_filesystem;

Expand Down
14 changes: 8 additions & 6 deletions setup/src/Magento/Setup/Model/BasePackageInfo.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2015 Adobe
* All Rights Reserved.
*/
namespace Magento\Setup\Model;

use Magento\Framework\FileSystem\Directory\ReadFactory;
use Magento\Framework\Filesystem\Directory\ReadFactory;

/**
* Information about the Magento base package.
*
*/
class BasePackageInfo
{
const MAGENTO_BASE_PACKAGE_COMPOSER_JSON_FILE = 'magento/magento2-base/composer.json';
public const MAGENTO_BASE_PACKAGE_COMPOSER_JSON_FILE = 'magento/magento2-base/composer.json';

const COMPOSER_KEY_EXTRA = 'extra';
public const COMPOSER_KEY_EXTRA = 'extra';

const COMPOSER_KEY_MAP = 'map';
public const COMPOSER_KEY_MAP = 'map';

/**
* @var \Magento\Framework\Filesystem\Directory\ReadInterface $reader
Expand All @@ -44,6 +44,8 @@ public function getPaths()
{
// Locate composer.json for magento2-base module
$filesPathList = [];

// phpcs:ignore Magento2.Security.IncludeFile.FoundIncludeFile
$vendorDir = require VENDOR_PATH;
$basePackageComposerFilePath = $vendorDir . '/' . self::MAGENTO_BASE_PACKAGE_COMPOSER_JSON_FILE;
if (!$this->reader->isExist($basePackageComposerFilePath)) {
Expand Down
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 2016 Adobe
* All Rights Reserved.
*/
declare(strict_types=1);

Expand All @@ -16,12 +16,12 @@
class BasePackageInfoTest extends \PHPUnit\Framework\TestCase
{
/**
* @var \PHPUnit\Framework\MockObject\MockObject|\Magento\Framework\FileSystem\Directory\ReadFactory
* @var \PHPUnit\Framework\MockObject\MockObject|\Magento\Framework\Filesystem\Directory\ReadFactory
*/
private $readFactoryMock;

/**
* @var \PHPUnit\Framework\MockObject\MockObject|\Magento\Framework\FileSystem\Directory\ReadInterface
* @var \PHPUnit\Framework\MockObject\MockObject|\Magento\Framework\Filesystem\Directory\ReadInterface
*/
private $readerMock;

Expand Down