Passed
Branch 2.0.0 (c5bb78)
by Chubarov
09:06
created

example.php (5 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
4
use agoalofalife\bpm\KernelBpm;
5
use agoalofalife\bpm\SourcesConfigurations\File;
6
7
require_once './vendor/autoload.php';
8
9
$test = new KernelBpm();
10
$file = new File();
11
12
// 1.Option
0 ignored issues
show
Unused Code Comprehensibility introduced by
40% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
13
// set file with configuration | pre settings
14
//$file->setSource(__DIR__ . '/config/apiBpm.php');
15
//$test->loadConfiguration($file);
16
17
18
// 2.Option
19
// set configuration manually
20
$test->setConfigManually('apiBpm', [
21
        'UrlLogin' => '',
22
        'Login'    => '',
23
        'Password' => '',
24
        'UrlHome'  => ''
25
]);
26
27
// 3, Setting collection
28
$test->setCollection('CaseCollection');
29
30
// 4. get Cookie or just auth
0 ignored issues
show
Unused Code Comprehensibility introduced by
37% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
31
//$test->authentication();
32
33
// 5. Example Reading from API
0 ignored issues
show
Unused Code Comprehensibility introduced by
57% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
34
//$test = $test->action('read:json', function ($read){
35
//    $read->amount(1)->skip(100);
36
//
37
//})->get();
38
//
39
//dd($test->toArray(), '?');
40
41
// 6.Example Creating from API
0 ignored issues
show
Unused Code Comprehensibility introduced by
54% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
42
//$test = $test->action('create:xml', function ($creator){
43
//    $creator->setData([
44
//        // array key => value
45
//    ]);
46
//})->get();
47
//dd($test, 'done');
48
49
// 7 Example Update from API
0 ignored issues
show
Unused Code Comprehensibility introduced by
55% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
50
//$test = $test->action('update:json', function ($creator){
51
//    $creator->guid('')->setData([
52
//       'Number' => 'SR00006250(testJson)'
53
//    ]);
54
//})->get();
55
//dd($test);
56
57
// 8.  Example delete
58
$test = $test->action('delete:xml', function ($creator){
59
    $creator->guid('');
60
})->get();
61
dd($test);