Passed
Push — master ( 12ed59...661264 )
by Julien
05:22
created

ServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 3
c 0
b 0
f 0
dl 0
loc 12
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 3 1
1
<?php
2
/**
3
 * This file is part of the Zemit Framework.
4
 *
5
 * (c) Zemit Team <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE.txt
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Zemit\Provider\OCR;
12
13
use Phalcon\Di\DiInterface;
14
use thiagoalessio\TesseractOCR\TesseractOCR;
0 ignored issues
show
Bug introduced by
The type thiagoalessio\TesseractOCR\TesseractOCR 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...
15
use Zemit\Provider\AbstractServiceProvider;
16
17
/**
18
 * Class ServiceProvider
19
 *
20
 * @link https://github.com/thiagoalessio/tesseract-ocr-for-php
21
 *
22
 * @author Julien Turbide <[email protected]>
23
 * @copyright Zemit Team <[email protected]>
24
 *
25
 * @since 1.0
26
 * @version 1.0
27
 *
28
 * @package Zemit\Provider\OCR
29
 */
30
class ServiceProvider extends AbstractServiceProvider
31
{
32
    protected $serviceName = 'ocr';
33
    
34
    /**
35
     * {@inheritdoc}
36
     *
37
     * @param DiInterface $di
38
     */
39 7
    public function register(DiInterface $di): void
40
    {
41 7
        $di->setShared($this->getName(), TesseractOCR::class);
42
    }
43
}
44