Kint_Object_Stream::getValueShort()   A
last analyzed

Complexity

Conditions 4
Paths 3

Size

Total Lines 14
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 8
nc 3
nop 0
dl 0
loc 14
rs 9.2
c 0
b 0
f 0
1
<?php
2
3
class Kint_Object_Stream extends Kint_Object_Resource
0 ignored issues
show
Coding Style introduced by
Kint_Object_Stream does not seem to conform to the naming convention (^[A-Z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
Coding Style introduced by
The property $stream_meta is not named in camelCase.

This check marks property names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
4
{
5
    public $stream_meta = null;
0 ignored issues
show
Coding Style introduced by
$stream_meta does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
6
7
    public function __construct(array $meta = null)
8
    {
9
        parent::__construct();
10
        $this->stream_meta = $meta;
11
    }
12
13
    public function getValueShort()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
14
    {
15
        if (empty($this->stream_meta['uri'])) {
16
            return;
17
        }
18
19
        $uri = $this->stream_meta['uri'];
20
21
        if (KINT_PHP524 && stream_is_local($uri)) {
22
            return Kint::shortenPath($uri);
23
        } else {
24
            return $uri;
25
        }
26
    }
27
}
28