CommitNew   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 25
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getData() 0 3 1
1
<?php declare(strict_types=1);
2
3
/*
4
 * This file is part of Biurad opensource projects.
5
 *
6
 * @copyright 2022 Biurad Group (https://biurad.com/)
7
 * @license   https://opensource.org/licenses/BSD-3-Clause License
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
namespace Biurad\Git;
14
15
/**
16
 * Represents a new git commit.
17
 *
18
 * @author Divine Niiquaye Ibok <[email protected]>
19
 */
20
class CommitNew
21
{
22
    /** @var array<int,mixed> */
23
    private array $data = [];
24
25
    /**
26
     * @param array<int,string>          $paths
27
     * @param array<int,Commit\Identity> $coAuthors
28
     */
29
    public function __construct(
30
        Commit\Message $message,
31
        array $paths = [],
32
        Commit\Identity $author = null,
33
        Commit\Identity $committer = null,
34
        array $coAuthors = []
35
    ) {
36
        $this->data = \func_get_args();
37
    }
38
39
    /**
40
     * @return array<int,mixed>
41
     */
42
    public function getData(): array
43
    {
44
        return $this->data;
45
    }
46
}
47