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

phpolar / model / 6328972008

27 Sep 2023 04:47PM UTC coverage: 91.815%. First build
6328972008

Pull #42

github

web-flow
Merge ea05db7cb into c9b7f1c25
Pull Request #42: build(deps-dev): bump phpmd/phpmd from 2.13.0 to 2.14.0

258 of 281 relevant lines covered (91.81%)

7.74 hits per line

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

100.0
/src/Column.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Phpolar\Model;
6

7
;
8

9
use Attribute;
10
use Phpolar\Phpolar\Core\AbstractPropertyNameExtractor;
11
use Phpolar\Phpolar\Core\ColumnConfig;
12
use Phpolar\Phpolar\Core\DefaultColumnName;
13

14
/**
15
 * Provides support for configuring the text for column names in records.
16
 */
17
#[Attribute(Attribute::TARGET_PROPERTY)]
18
final class Column extends AbstractPropertyNameExtractor
19
{
20
    public function __construct(private string|ColumnConfig $arg = ColumnConfig::T_Default)
21
    {
22
    }
4✔
23

24
    /**
25
     * Returns the configured column name.
26
     *
27
     * @api
28
     */
29
    public function getColumnName(): string
30
    {
31
        return match ($this->arg) {
4✔
32
            ColumnConfig::T_Default => (new DefaultColumnName($this->propName))->getColumnName(),
4✔
33
            default => (string) $this->arg
4✔
34
        };
4✔
35
    }
36
}
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