PersonTrack   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A subTracks() 0 6 1
A collectInformateFromSubTracks() 0 12 1
1
<?php
2
namespace Finder\Pipelines\Track;
3
4
use Finder\Contracts\Spider\Track;
5
6
7
/**
8
 * Run all script analysers and outputs their result.
9
 */
10
class PersonTrack extends Track
11
{
12
13
    public function subTracks()
14
    {
15
        return [
16
            'accounts' => AccountTrack::class,
17
        ];
18
    }
19
20
21
    public function collectInformateFromSubTracks()
22
    {
23
        return [
24
            [
25
                'profilePic',
26
                function ($result) {
27
                    $this->model->addMediaFromUrl($result)->toMediaCollection('avatars');
0 ignored issues
show
Bug introduced by
The method addMediaFromUrl cannot be called on $this->model (of type boolean).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
28
                }
29
            ]
30
        ];
31
       
32
    }
33
34
35
}