• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / Yoast-SEO-for-TYPO3 / 21521134747

30 Jan 2026 03:30PM UTC coverage: 0.866% (-0.4%) from 1.275%
21521134747

push

github

RinyVT
[FEATURE] Version 12.0.0, added v14 support, removed v11 support including php8.0 and php8.1, rewrote backend javascript functionality to typescript and webcomponents

0 of 550 new or added lines in 53 files covered. (0.0%)

33 existing lines in 21 files now uncovered.

23 of 2657 relevant lines covered (0.87%)

0.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/Classes/StructuredData/SiteStructuredDataProvider.php
1
<?php
2

3
/**
4
 * This file is part of the "yoast_seo" extension for TYPO3 CMS.
5
 *
6
 * For the full copyright and license information, please read the
7
 * LICENSE.txt file that was distributed with this source code.
8
 */
9

10
declare(strict_types=1);
11

12
namespace YoastSeoForTypo3\YoastSeo\StructuredData;
13

14
use TYPO3\CMS\Core\Domain\Repository\PageRepository;
15
use TYPO3\CMS\Core\Site\SiteFinder;
16
use YoastSeoForTypo3\YoastSeo\Service\Frontend\FrontendServiceInterface;
17

18
class SiteStructuredDataProvider implements StructuredDataProviderInterface
19
{
20
    /** @var array<string, mixed> */
21
    protected array $configuration = [];
22

23
    public function __construct(
24
        protected SiteFinder $siteFinder,
25
        protected PageRepository $pageRepository,
26
        protected FrontendServiceInterface $frontendService,
UNCOV
27
    ) {}
×
28

29
    /**
30
     * @return array<array<string, mixed>>
31
     */
32
    public function getData(): array
33
    {
NEW
34
        if (!$this->frontendService->isSiteRoot()) {
×
35
            return [];
×
36
        }
37
        return [
×
38
            [
×
39
                '@context' => 'https://www.schema.org',
×
40
                '@type' => 'WebSite',
×
NEW
41
                'url' => $this->getUrl($this->frontendService->getPageUid()),
×
NEW
42
                'name' => $this->getName($this->frontendService->getPageUid()),
×
43
            ],
×
44
        ];
×
45
    }
46

47
    protected function getUrl(int $pageId): string
48
    {
49
        $site = $this->siteFinder->getSiteByPageId($pageId);
×
50
        return (string)$site->getBase();
×
51
    }
52

53
    protected function getName(int $pageId): string
54
    {
55
        $rootPageRecord = $this->pageRepository->getPage($pageId);
×
56
        return $rootPageRecord['seo_title'] ?: $rootPageRecord['title'] ?: $this->getUrl($pageId);
×
57
    }
58

59
    /**
60
     * @param array<string, mixed> $configuration
61
     */
62
    public function setConfiguration(array $configuration): void
63
    {
64
        $this->configuration = $configuration;
×
65
    }
66
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc