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

CPS-IT / personio-jobs / 19627356689

24 Nov 2025 08:04AM UTC coverage: 3.125%. Remained the same
19627356689

push

github

web-flow
Merge pull request #266 from CPS-IT/task/codeclimate

[TASK] Drop CodeClimate integration

23 of 736 relevant lines covered (3.13%)

0.14 hits per line

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

0.0
/Classes/Extension.php
1
<?php
2

3
declare(strict_types=1);
4

5
/*
6
 * This file is part of the TYPO3 CMS extension "personio_jobs".
7
 *
8
 * Copyright (C) 2023 Elias Häußler <e.haeussler@familie-redlich.de>
9
 *
10
 * This program is free software: you can redistribute it and/or modify
11
 * it under the terms of the GNU General Public License as published by
12
 * the Free Software Foundation, either version 2 of the License, or
13
 * (at your option) any later version.
14
 *
15
 * This program is distributed in the hope that it will be useful,
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 * GNU General Public License for more details.
19
 *
20
 * You should have received a copy of the GNU General Public License
21
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22
 */
23

24
namespace CPSIT\Typo3PersonioJobs;
25

26
use CPSIT\Typo3PersonioJobs\Controller\JobController;
27
use CPSIT\Typo3PersonioJobs\Hooks\DataHandlerHook;
28
use TYPO3\CMS\Core\Core\Environment;
29
use TYPO3\CMS\Core\Information\Typo3Version;
30
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
31
use TYPO3\CMS\Core\Utility\GeneralUtility;
32
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
33

34
/**
35
 * Extension
36
 *
37
 * @author Elias Häußler <e.haeussler@familie-redlich.de>
38
 * @license GPL-2.0-or-later
39
 */
40
final class Extension
41
{
42
    public const KEY = 'personio_jobs';
43

44
    /**
45
     * FOR USE IN ext_localconf.php ONLY.
46
     */
47
    public static function registerHooks(): void
×
48
    {
49
        $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][]
×
50
            = DataHandlerHook::class;
×
51
    }
52

53
    /**
54
     * FOR USE IN ext_localconf.php ONLY.
55
     */
56
    public static function registerPlugins(): void
×
57
    {
58
        ExtensionUtility::configurePlugin(
×
59
            self::KEY,
×
60
            'List',
×
61
            [
×
62
                JobController::class => 'list',
×
63
            ],
×
64
        );
×
65

66
        ExtensionUtility::configurePlugin(
×
67
            self::KEY,
×
68
            'Show',
×
69
            [
×
70
                JobController::class => 'show',
×
71
            ],
×
72
        );
×
73
    }
74

75
    /**
76
     * FOR USE IN ext_localconf.php ONLY.
77
     *
78
     * @todo Remove once support for TYPO3 v12 is dropped
79
     */
80
    public static function registerTSconfig(): void
×
81
    {
82
        if ((new Typo3Version())->getMajorVersion() >= 13) {
×
83
            return;
×
84
        }
85

86
        ExtensionManagementUtility::addPageTSConfig(
×
87
            '@import "EXT:personio_jobs/Configuration/TSconfig/Page.tsconfig"',
×
88
        );
×
89
    }
90

91
    /**
92
     * Load additional libraries provided by PHAR file (only to be used in non-Composer-mode).
93
     *
94
     * FOR USE IN ext_localconf.php AND NON-COMPOSER-MODE ONLY.
95
     */
96
    public static function loadVendorLibraries(): void
×
97
    {
98
        // Vendor libraries are already available in Composer mode
99
        if (Environment::isComposerMode()) {
×
100
            return;
×
101
        }
102

103
        $vendorPharFile = GeneralUtility::getFileAbsFileName('EXT:personio_jobs/Resources/Private/Libs/vendors.phar');
×
104
        if (file_exists($vendorPharFile)) {
×
105
            require_once 'phar://' . $vendorPharFile . '/vendor/autoload.php';
×
106
        }
107
    }
108
}
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

© 2025 Coveralls, Inc