Completed
Push — master ( 118c60...254398 )
by Litera
03:47
created

BlockRepository::setBlockModel()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
rs 9.4285
1
<?php
2
3
namespace App\Repositories;
4
5
use App\Models\BlockModel;
6
7
class BlockRepository
8
{
9
10
	/**
11
	 * @var BlockModel
12
	 */
13
	protected $blockModel;
14
15
	/**
16
	 * @param BlockModel $blockModel
17
	 */
18
	public function __construct(
19
		BlockModel $blockModel
20
	) {
21
		$this->setBlockModel($blockModel);
22
	}
23
24
	/**
25
	 * @param  string $meetingId
26
	 * @return array
27
	 */
28
	public function findByMeeting(string $meetingId): array
29
	{
30
		return $this->getBlockModel()->findBymeeting($meetingId);
31
	}
32
33
	/**
34
	 * @return BlockModel
35
	 */
36
	protected function getBlockModel()
37
	{
38
		return $this->blockModel;
39
	}
40
41
	/**
42
	 * @param  BlockModel $model
43
	 * @return $this
44
	 */
45
	protected function setBlockModel(BlockModel $model): self
46
	{
47
		$this->blockModel = $model;
48
49
		return $this;
50
	}
51
52
}
53