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

Yoast / Yoast-SEO-for-TYPO3 / 24723291290

21 Apr 2026 12:50PM UTC coverage: 10.457% (+9.2%) from 1.275%
24723291290

push

github

web-flow
Merge pull request #632 from Yoast/feature/yoast-v12

[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

40 of 806 new or added lines in 69 files covered. (4.96%)

40 existing lines in 23 files now uncovered.

284 of 2716 relevant lines covered (10.46%)

0.29 hits per line

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

0.0
/Classes/Hooks/DisableAnalysisCleanupHook.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\Hooks;
13

14
use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
15
use TYPO3\CMS\Core\Database\ConnectionPool;
16
use TYPO3\CMS\Core\DataHandling\DataHandler;
17
use YoastSeoForTypo3\YoastSeo\Constants\TableNames;
18

19
#[Autoconfigure(public: true)]
20
class DisableAnalysisCleanupHook
21
{
22
    public function __construct(
23
        protected ConnectionPool $connectionPool,
NEW
24
    ) {}
×
25

26
    /**
27
     * @param array<string, mixed> $fieldArray
28
     */
29
    public function processDatamap_postProcessFieldArray(
30
        string $status,
31
        string $table,
32
        string|int $id,
33
        array &$fieldArray,
34
        DataHandler $dataHandler,
35
    ): void {
NEW
36
        if ($table !== TableNames::PAGES) {
×
NEW
37
            return;
×
38
        }
39

NEW
40
        if (!isset($fieldArray['tx_yoastseo_disable_analysis'])) {
×
NEW
41
            return;
×
42
        }
43

NEW
44
        if ((int)$fieldArray['tx_yoastseo_disable_analysis'] !== 1) {
×
NEW
45
            return;
×
46
        }
47

NEW
48
        $uid = (int)$id;
×
49

NEW
50
        $fieldArray['tx_yoastseo_score_readability'] = '';
×
NEW
51
        $fieldArray['tx_yoastseo_score_seo'] = '';
×
NEW
52
        $fieldArray['tx_yoastseo_cornerstone'] = 0;
×
53

NEW
54
        $this->deleteProminentWords($uid, $table);
×
55
    }
56

57
    protected function deleteProminentWords(int $uid, string $table): void
58
    {
NEW
59
        $queryBuilder = $this->connectionPool->getQueryBuilderForTable(TableNames::PROMINENT_WORD);
×
NEW
60
        $queryBuilder->delete(TableNames::PROMINENT_WORD)
×
NEW
61
            ->where(
×
NEW
62
                $queryBuilder->expr()->eq('uid_foreign', $uid),
×
NEW
63
                $queryBuilder->expr()->eq('tablenames', $queryBuilder->createNamedParameter($table)),
×
NEW
64
            )
×
NEW
65
            ->executeStatement();
×
66
    }
67
}
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