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

PdfViewModel   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A forPdfOutput() 0 5 1
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