Issues (12)

doctum.php (1 issue)

Severity
1
<?php
2
3
require __DIR__.'/vendor/autoload.php';
4
5
use Doctum\Doctum;
6
use Doctum\RemoteRepository\GitHubRemoteRepository;
7
use Doctum\Version\GitVersionCollection;
8
use Symfony\Component\Finder\Finder;
9
10
$dir = __DIR__.'/src';
11
12
$iterator = Finder::create()
13
    ->files()
14
    ->name('*.php')
15
    ->exclude('tests')
16
    ->exclude('vendor')
17
    ->in($dir);
18
19
$versions = GitVersionCollection::create($dir)
20
    ->add('1.3', 'v1.3')
21
    ->add('1.4', 'v1.4')
22
    ->add('1.5', 'v1.5')
23
    ->add('1.6', 'v1.6')
24
    ->add('1.7', 'v1.7')
25
    ->add('1.8', 'v1.8')
26
    ->add('2.0', 'v2.0')
27
    ->add('3.x', 'v3.x')
28
    ->add('master', 'Master');
29
30
$repo = new GitHubRemoteRepository(
31
    'mtvbrianking/laravel-mtn-momo',
32
    dirname($dir),
33
    'https://github.com/'
0 ignored issues
show
The call to Doctum\RemoteRepository\...pository::__construct() has too many arguments starting with 'https://github.com/'. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

33
$repo = /** @scrutinizer ignore-call */ new GitHubRemoteRepository(

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.

Loading history...
34
);
35
36
$options = [
37
    'theme' => 'default',
38
    'title' => 'Laravel MTN MOMO API',
39
    'versions' => $versions,
40
    'build_dir' => __DIR__.'/docs/%version%',
41
    'cache_dir' => __DIR__.'/docs/cache/%version%',
42
    'remote_repository' => $repo,
43
    'default_opened_level' => 2,
44
];
45
46
return new Doctum($iterator, $options);
47