GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( fb3a62...ec23f8 )
by Orlando
01:04
created

IO::getFileExtensionName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the cfdi-certificate project.
5
 *
6
 * (c) Kinedu
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Kinedu\CFDI\Certificate\Utils;
13
14
class IO
15
{
16
    /** @var string */
17
    protected $file;
18
19
    /**
20
     * Create a new IO instance.
21
     *
22
     * @param string $file
23
     */
24
    public function __construct(string $file)
25
    {
26
        $this->file = $file;
27
    }
28
29
    public function getFileName(): string
30
    {
31
        $name = pathinfo($this->file);
32
        $name = $name['filename'];
33
34
        return $name;
35
    }
36
37
    public function getFileExtensionName(): string
38
    {
39
        $ext = strrchr($this->file, '.');
40
        $ext = substr($ext, 1);
41
42
        return $ext;
43
    }
44
45
    public function getOriginalRoute(): string
46
    {
47
        return $this->file;
48
    }
49
}
50