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
Pull Request — master (#34)
by
unknown
01:05
created

run.php ➔ usePdfToText()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 1
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: julius hernandez alvarado
5
 * Date: 3/27/2020
6
 * Time: 12:24 PM
7
 */
8
9
require 'vendor/autoload.php';
10
11
use \Smalot\PdfParser\Parser;
12
use \Spatie\PdfToText\Pdf;
13
14
$pdfFiles = glob("pdf-input\*.pdf");
15
16
usePdfToText($pdfFiles);
17
18
function usePdfToText ($pdfFiles) {
19
    foreach($pdfFiles as $pdfFile) {
20
        //$pdfObj = (new Pdf())->setPdf($pdfFile)->text();
21
        $text = Pdf::getText($pdfFile);
0 ignored issues
show
Unused Code introduced by
$text is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
22
        $debug = 1;
0 ignored issues
show
Unused Code introduced by
$debug is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
23
    }
24
}
25
26
// at the moment PdfParser can't parse these PDFs
27
function usePdfParser ($pdfFiles) {
28
    $parser = new Parser();
29
    
30
    foreach($pdfFiles as $pdfFile) {
31
        //echo "\n_> scanning: " . basename($pdfFile) . "\n";
32
        $pdf = $parser->parseFile($pdfFile);
33
        $text = $pdf->getText();
0 ignored issues
show
Unused Code introduced by
$text is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
34
        $debug = 1;
0 ignored issues
show
Unused Code introduced by
$debug is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
35
    }
36
}
37
38
39
40
41
42
43
//