Issues (103)

src/FlexiPeeHP/Firma.php (1 issue)

Labels
Severity
1
<?php
2
/**
3
 * FlexiPeeHP - Document Default Address support
4
 *
5
 * @author     Vítězslav Dvořák <[email protected]>
6
 * @copyright  (C) 2018-2020 Spoje.Net
7
 */
8
9
namespace FlexiPeeHP;
10
11
/**
12
 * Add for Objects use with "firma" data column
13
 * @author Vítězslav Dvořák <[email protected]>
14
 */
15
trait Firma
16
{
17
    /**
18
     * Here Customer's or Provider's comany object live
19
     * @var \FlexiPeeHP\Adresar
20
     */
21
    public $firma = null;
22
23
    /**
24
     * Instance of Adresar( $this->getDataValue('firma') ) 
25
     * 
26
     * @return Adresar
27
     */
28
    public function getFirmaObject()
29
    {
30
        if (is_null($this->firma)) {
31
            $this->firma = new Adresar($this->getDataValue('firma'),
0 ignored issues
show
It seems like getDataValue() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

31
            $this->firma = new Adresar($this->/** @scrutinizer ignore-call */ getDataValue('firma'),
Loading history...
32
                ['details' => 'id']);
33
        }
34
        return $this->firma;
35
    }
36
}
37