PersonTrack::collectInformateFromSubTracks()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 12
rs 9.8666
c 0
b 0
f 0
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
}