Passed
Branch master (89ed0c)
by Brian
03:20
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('master', 'Master branch');
21
22
$repo = new GitHubRemoteRepository(
23
    'mtvbrianking/laravel-ussd',
24
    dirname($dir),
25
    '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

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