FieldSettingsTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 7
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getCustomFields() 0 2 1
1
<?php
2
3
namespace Helix\Asana\CustomField;
4
5
use Helix\Asana\Base\AbstractEntity;
6
use Helix\Asana\CustomField;
7
8
/**
9
 * Adds custom field settings to an entity.
10
 *
11
 * @mixin AbstractEntity
12
 *
13
 * @method FieldSetting[]   getCustomFieldSettings  ()
14
 * @method CustomField[]    selectCustomFields      (callable $filter) `fn( CustomField $field ): bool`
15
 */
16
trait FieldSettingsTrait {
17
18
    /**
19
     * @return CustomField[]
20
     */
21
    public function getCustomFields () {
22
        return array_column($this->getCustomFieldSettings(), 'custom_field');
23
    }
24
25
}