TopTwentyViewComposer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 21
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A compose() 0 5 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
}