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

heimrichhannot / contao-utils-bundle / 15155386051

21 May 2025 06:45AM UTC coverage: 25.959% (+0.5%) from 25.433%
15155386051

Pull #101

github

koertho
fix php 8 only code
Pull Request #101: Add alias field

46 of 55 new or added lines in 4 files covered. (83.64%)

1543 of 5944 relevant lines covered (25.96%)

1.56 hits per line

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

50.0
/src/Dca/AliasFieldConfiguration.php
1
<?php
2

3
namespace HeimrichHannot\UtilsBundle\Dca;
4

5
use HeimrichHannot\UtilsBundle\EventListener\DcaField\AliasDcaFieldListener;
6

7
class AliasFieldConfiguration extends DcaFieldConfiguration
8
{
9
    public ?array $aliasExistCallback = [AliasDcaFieldListener::class, 'onFieldsAliasSaveCallback'];
10

11
    public string $fieldName = 'alias';
12

13
    /**
14
     * Override the default alias exist function. Provide as [Class, 'method'].
15
     *
16
     * @param array<string, string> $aliasExistCallback
17
     */
18
    public function setAliasExistCallback(?array $aliasExistCallback): AliasFieldConfiguration
19
    {
20
        $this->aliasExistCallback = $aliasExistCallback;
1✔
21
        return $this;
1✔
22
    }
23

24
    public function setFieldName(string $fieldName): AliasFieldConfiguration
25
    {
NEW
26
        $this->fieldName = $fieldName;
×
NEW
27
        return $this;
×
28
    }
29
}
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