PdfViewModel::forPdfOutput()   A
last analyzed

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
namespace Sfneal\ViewModels\Traits;
4
5
trait PdfViewModel
6
{
7
    /**
8
     * @var bool
9
     */
10
    public bool $forPdf = false;
11
12
    /**
13
     * Declare this ViewModel is being used to create a PDF.
14
     *
15
     * @param  bool  $value
16
     * @return $this
17
     */
18
    public function forPdfOutput(bool $value = true): self
19
    {
20
        $this->forPdf = $value;
21
22
        return $this;
23
    }
24
}
25