TopTwentyViewComposer::compose()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 5
rs 9.4286
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace WITR\ViewComposers;
4
5
use WITR\AlbumReview;
6
use WITR\TopTwenty\Reader;
7
use Illuminate\View\View;
8
9
class TopTwentyViewComposer {
10
11
	protected $reader;
12
13
	public function __construct(Reader $reader)
14
	{
15
		$this->reader = $reader;
16
	}
17
18
	/**
19
	 * Bind data to the view.
20
	 *
21
	 * @param  View  $view
22
	 * @return void
23
	 */
24
	public function compose(View $view)
25
	{
26
		$data = $this->reader->get();
27
		$view->with('toptwenty', $data);
28
	}
29
}