| Total Complexity | 5 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class Sample |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | public $title; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | public $subtitle; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var \Illuminate\Support\Collection|\Zing\QueryBuilder\Samples\CodeSample[] |
||
| 23 | */ |
||
| 24 | public $codeSamples; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | private $description = ''; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param string $title |
||
| 33 | * @param string $subtitle |
||
| 34 | * @param \Zing\QueryBuilder\Samples\CodeSample[] $codeSamples |
||
| 35 | */ |
||
| 36 | public function __construct(string $title, string $subtitle, array $codeSamples) |
||
| 37 | { |
||
| 38 | $this->title = $title; |
||
| 39 | $this->subtitle = $subtitle; |
||
| 40 | $this->codeSamples = collect($codeSamples); |
||
| 41 | } |
||
| 42 | |||
| 43 | public function description(string $description): self |
||
| 44 | { |
||
| 45 | $this->description = $description; |
||
| 46 | |||
| 47 | return $this; |
||
| 48 | } |
||
| 49 | |||
| 50 | public function print(): string |
||
| 60 | } |
||
| 61 | } |
||
| 62 |