Passed
Push — master ( 368833...405cb1 )
by Stephen
10:36
created

PdfViewModel::forPdfOutput()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
4
namespace Sfneal\ViewModels\Traits;
5
6
7
trait PdfViewModel
8
{
9
    /**
10
     * @var bool
11
     */
12
    public $forPdf = false;
13
14
    /**
15
     * Declare this ViewModel is being used to create a PDF.
16
     *
17
     * @param bool $value
18
     * @return $this
19
     */
20
    public function forPdfOutput(bool $value = true): self
21
    {
22
        $this->forPdf = $value;
23
24
        return $this;
25
    }
26
}
27