Test Failed
Push — master ( dd0813...14557d )
by Antony
06:13
created

UnleashedBuildTask   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A log() 0 8 3
1
<?php
2
3
namespace AntonyThorpe\SilverShopUnleashed;
4
5
use Psr\Http\Message\ResponseInterface;
6
use GuzzleHttp\Exception\RequestException;
7
use SilverStripe\Dev\BuildTask;
8
use SilverStripe\Control\Controller;
9
use SilverStripe\ORM\DatabaseAdmin;
10
use SilverStripe\Control\Director;
11
12
/**
13
 * Base BuildTask for Unleashed Software
14
 */
15
abstract class UnleashedBuildTask extends BuildTask
16
{
17
    /**
18
     * @var string
19
     */
20
    protected $email_subject = "API Unleashed Software";
21
22
    /**
23
     * @var booleen
0 ignored issues
show
Bug introduced by
The type AntonyThorpe\SilverShopUnleashed\booleen was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
24
     */
25
    protected $preview = false;
26
27
    /**
28
     * echo to screen for Build Reports
29
     * @param  string $msg the message to be printed
30
     */
31
    protected function log($text)
32
    {
33
        if (Controller::curr() instanceof DatabaseAdmin) {
34
            DB::alteration_message($text, 'obsolete');
0 ignored issues
show
Bug introduced by
The type AntonyThorpe\SilverShopUnleashed\DB was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
35
        } elseif (Director::is_cli()) {
36
            echo $text . "\n";
37
        } else {
38
            echo $text . "<br/>";
39
        }
40
    }
41
}
42