SideNavComposer::compose()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 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