PHP Linter
OK
composer validate
OK
Copy/Paste Detector
phpcpd 6.0.3 by Sebastian Bergmann.
Found 1 clones with 54 duplicated lines in 2 files:
- /app/swissup/module-rich-snippets/Block/FAQPage.php:9-63 (54 lines)
/app/swissup/module-rich-snippets/Block/QAPage.php:5-59
class FAQPage extends LdJson
{
/**
* @return bool
*/
private function isProductPage()
{
return 'catalog_product_view' === $this->getRequest()->getFullActionName();
}
/**
* Get product id
*
* @return int|false
*/
private function getProductId()
{
$productId = $this->getRequest()->getParam('product_id', false);
if (!$productId && $this->isProductPage()) {
$productId = $this->getRequest()->getParam('id', false);
}
return $productId;
}
/**
* @return bool
*/
private function isCategoryPage()
{
return 'catalog_category_view' === $this->getRequest()->getFullActionName();
}
/**
* Get category id
*
* @return int|false
*/
private function getCategoryId()
{
return $this->getRequest()->getParam('id', false);
}
/**
* @return array|false|mixed
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
private function getItems()
{
/** @var \Swissup\RichSnippets\Api\Data\SchemaDataProviderInterface $dataProvider */
$dataProvider = $this->getData('data_provider');
if (!$dataProvider) {
return [];
1.34% duplicated lines out of 4020 total lines of code.
Average size of duplication is 54 lines, largest clone has 54 of lines
Time: 00:00.006, Memory: 4.00 MB
PHP Stan
OK
Magento Coding Standard
OK