PdfViewModel   A
last analyzed

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
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