• 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/Utility/YoastUtility.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\Utility;
13

14
use TYPO3\CMS\Core\Database\ConnectionPool;
15
use TYPO3\CMS\Core\Utility\GeneralUtility;
16

17
class YoastUtility
18
{
19
    /**
20
     * @param array<string, mixed>|null $configuration
21
     * @return int[]
22
     */
23
    public static function getAllowedDoktypes(?array $configuration = null): array
24
    {
NEW
25
        $allowedDoktypes = (array)($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['yoast_seo']['allowedDoktypes'] ?? []);
×
NEW
26
        $allowedDoktypes = array_map('intval', array_values($allowedDoktypes));
×
27

NEW
28
        if (is_array($configuration['allowedDoktypes'] ?? null)) {
×
29
            foreach ($configuration['allowedDoktypes'] as $doktype) {
×
NEW
30
                $doktype = (int)$doktype;
×
NEW
31
                if (!in_array($doktype, $allowedDoktypes, true)) {
×
NEW
32
                    $allowedDoktypes[] = $doktype;
×
33
                }
34
            }
35
        }
36

NEW
37
        return $allowedDoktypes ? array_values(array_unique($allowedDoktypes)) : [1];
×
38
    }
39

40
    /**
41
     * @param array<string, mixed>|null $configuration
42
     */
43
    public static function getAllowedDoktypesList(?array $configuration = null): string
44
    {
45
        return implode(',', self::getAllowedDoktypes($configuration));
×
46
    }
47

48
    /**
49
     * @return array<string, array{keyword: string, synonyms: string}>
50
     */
51
    public static function getRelatedKeyphrases(string $parentTable, int $parentId): array
52
    {
53
        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable(
×
54
            'tx_yoastseo_related_focuskeyword'
×
55
        );
×
56
        $relatedKeyphrases = $queryBuilder->select('*')
×
57
            ->from('tx_yoastseo_related_focuskeyword')
×
58
            ->where(
×
59
                $queryBuilder->expr()->eq('tablenames', $queryBuilder->createNamedParameter($parentTable)),
×
60
                $queryBuilder->expr()->eq('uid_foreign', $parentId)
×
61
            )
×
62
            ->executeQuery()
×
63
            ->fetchAllAssociative();
×
64

NEW
65
        $result = [];
×
66
        foreach ($relatedKeyphrases as $relatedKeyphrase) {
×
NEW
67
            $result['rk' . (int)$relatedKeyphrase['uid']] = [
×
68
                'keyword' => (string)$relatedKeyphrase['keyword'],
×
69
                'synonyms' => (string)$relatedKeyphrase['synonyms'],
×
70
            ];
×
71
        }
72

NEW
73
        return $result;
×
74
    }
75
}
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