SideNavComposer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
c 2
b 0
f 0
lcom 0
cbo 2
dl 0
loc 10
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A compose() 0 7 1
1
<?php
2
3
namespace LearnParty\Http\Composers;
4
5
use LearnParty\Http\Repositories\VideoRepository;
6
use LearnParty\Category;
7
8
class SideNavComposer
9
{
10
    public function compose($view)
11
    {
12
        $videoRepository = new VideoRepository();
13
14
        $view->with('categories', Category::all());
15
        $view->with('topVideos', $videoRepository->getTopPopularVideos(3));
16
    }
17
}
18