Passed
Push — master ( c18ae0...51968f )
by Brian
20:48 queued 10:49
created

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.x', 'v1.x')
21
    ->add('master', 'Master branch');
22
23
$repo = new GitHubRemoteRepository(
24
    'mtvbrianking/laravel-xml',
25
    dirname($dir),
26
    '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

26
$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...
27
);
28
29
$options = [
30
    'theme' => 'default',
31
    'versions' => $versions,
32
    'title' => 'Laravel XML',
33
    'build_dir' => __DIR__.'/build/docs/%version%',
34
    'cache_dir' => __DIR__.'/build/docs/cache/%version%',
35
    'remote_repository' => $repo,
36
    'default_opened_level' => 3,
37
];
38
39
return new Doctum($iterator, $options);
40