Code Duplication    Length = 8-13 lines in 2 locations

src/Xtools/AutoEdits.php 1 location

@@ 38-45 (lines=8) @@
35
     * @param string  $start Start date in a format accepted by strtotime()
36
     * @param string  $end End date in a format accepted by strtotime()
37
     */
38
    public function __construct(Project $project, User $user, $namespace = 'all', $start = '', $end = '')
39
    {
40
        $this->project = $project;
41
        $this->user = $user;
42
        $this->namespace = $namespace;
43
        $this->start = $start;
44
        $this->end = $end;
45
    }
46
47
    /**
48
     * Get the number of edits this user made using semi-automated tools.

src/Xtools/Pages.php 1 location

@@ 51-63 (lines=13) @@
48
     * @param string     $redirects One of 'noredirects', 'onlyredirects' or blank for both.
49
     * @param int        $offset    Pagination offset.
50
     */
51
    public function __construct(
52
        Project $project,
53
        User $user,
54
        $namespace = 0,
55
        $redirects = 'noredirects',
56
        $offset = 0
57
    ) {
58
        $this->project = $project;
59
        $this->user = $user;
60
        $this->namespace = $namespace === 'all' ? 'all' : (string)$namespace;
61
        $this->redirects = $redirects;
62
        $this->offset = $offset;
63
    }
64
65
    /**
66
     * The project associated with this Pages instance.