Skip to content

"ScopeDefault" class returns 1 as id where 0 would be expected #12377

@wexo-team

Description

@wexo-team

\Magento\Framework\App\ScopeDefault::getId() returns 1 where I with my Magento 1 background would expect 0 to be the correct result.
I have not seen this behavior trigger any bugs in the code so I would like to hear if anyone can confirm whatever the current implementation is correct or not.

/**
* Get scope identifier
*
* @return int
*/
public function getId()
{
return 1;
}

Steps to produce

/** @var \Magento\Framework\App\ScopeDefault $scopeDefault */
$scopeDefault = \Magento\Framework\App\ObjectManager::getInstance()
    ->create(\Magento\Framework\App\ScopeInterface::class);

var_dump($scopeDefault->getId());

Expected result

int(0)

Actual result

int(1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: Format is not validGate 1 Failed. Automatic verification of issue format is failed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions