These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * phpDocumentor |
||
4 | * |
||
5 | * PHP Version 5.3 |
||
6 | * |
||
7 | * @copyright 2010-2014 Mike van Riel / Naenius (http://www.naenius.com) |
||
8 | * @license http://www.opensource.org/licenses/mit-license.php MIT |
||
9 | * @link http://phpdoc.org |
||
10 | */ |
||
11 | |||
12 | namespace phpDocumentor\Configuration; |
||
13 | |||
14 | use JMS\Serializer\Annotation as Serializer; |
||
15 | use Psr\Log\LogLevel; |
||
16 | |||
17 | /** |
||
18 | * Configuration definition for the logger. |
||
19 | */ |
||
20 | class Logging |
||
21 | { |
||
22 | /** |
||
23 | * @var string the minimum output level for logging. |
||
24 | * |
||
25 | * @Serializer\Type("string") |
||
26 | */ |
||
27 | protected $level = LogLevel::ERROR; |
||
28 | |||
29 | /** |
||
30 | * @var string[] the paths determining where to output log files. |
||
31 | * |
||
32 | * @Serializer\Type("array<string>") |
||
33 | */ |
||
34 | protected $paths = array( |
||
35 | 'default' => null, |
||
36 | 'errors' => null |
||
37 | ); |
||
38 | |||
39 | /** |
||
40 | * Returns the minimum output level for logging. |
||
41 | * |
||
42 | * @return string |
||
43 | */ |
||
44 | 1 | public function getLevel() |
|
45 | { |
||
46 | 1 | return $this->level; |
|
47 | } |
||
48 | |||
49 | /** |
||
50 | * Sets the minimum output level for the logger. |
||
51 | * |
||
52 | * @param string $level |
||
53 | * |
||
54 | * @return void |
||
55 | */ |
||
56 | public function setLevel($level) |
||
57 | { |
||
58 | $this->level = $level; |
||
59 | } |
||
60 | |||
61 | /** |
||
62 | * Returns the paths that determine where to store log files. |
||
63 | * |
||
64 | * phpDocumentor uses two types of log files to be able to sift through the logs more easily: |
||
65 | * |
||
66 | * - 'default', contains all logs as mentioned in the logging level in this object and |
||
67 | * - 'debug', contains debugging information that is exposed when debugging is enabled. |
||
68 | * |
||
69 | * @return string[] |
||
70 | */ |
||
71 | 1 | public function getPaths() |
|
72 | { |
||
73 | 1 | return $this->paths; |
|
74 | } |
||
75 | |||
76 | /** |
||
77 | * Registers the paths that determine where to store log files. |
||
78 | * |
||
79 | * @param \string[] $paths |
||
80 | * |
||
81 | * @see getPaths() for more information. |
||
82 | * |
||
83 | * @return void |
||
84 | */ |
||
85 | public function setPaths($paths) |
||
86 | { |
||
87 | $this->paths = $paths; |
||
0 ignored issues
–
show
|
|||
88 | } |
||
89 | } |
||
90 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..