Skip to content

Commit ab2be56

Browse files
committed
Introduce private method to correctly support strict types
1 parent 3e6bb4b commit ab2be56

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

app/code/Magento/Cms/Block/BlockByIdentifier.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919

2020
/**
2121
* This class is replacement of \Magento\Cms\Block\Block, that accepts only `string` identifier of CMS Block
22-
*
23-
* @method getIdentifier(): int Returns the value of `identifier` injected in `<block>` definition
2422
*/
2523
class BlockByIdentifier extends AbstractBlock implements IdentityInterface
2624
{
@@ -80,6 +78,16 @@ protected function _toHtml(): string
8078
}
8179
}
8280

81+
/**
82+
* Returns the value of `identifier` injected in `<block>` definition
83+
*
84+
* @return string|null
85+
*/
86+
private function getIdentifier(): ?string
87+
{
88+
return $this->getdata('identifier') ?: null;
89+
}
90+
8391
/**
8492
* Filters the Content
8593
*

0 commit comments

Comments
 (0)