| Total Complexity | 2 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class MonologHandler extends AbstractProcessingHandler |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * Holds Api object |
||
| 17 | * @var Api |
||
| 18 | */ |
||
| 19 | private $mobApi = null; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Which chat id the message should be sent to |
||
| 23 | * @var int |
||
| 24 | */ |
||
| 25 | private $sessionid = 0; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * MonologHandler constructor. |
||
| 29 | * |
||
| 30 | * @param Api $mobApi |
||
| 31 | * @param string $sessionid |
||
| 32 | * @param int $level |
||
| 33 | * @param bool $bubble |
||
| 34 | */ |
||
| 35 | public function __construct(Api $mobApi, string $sessionid, $level = Logger::DEBUG, $bubble = true) |
||
| 36 | { |
||
| 37 | $this->mobApi = $mobApi; |
||
| 38 | $this->sessionid = $sessionid; |
||
|
|
|||
| 39 | parent::__construct($level, $bubble); |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param array $record |
||
| 44 | * @return $this |
||
| 45 | */ |
||
| 46 | public function write(array $record) |
||
| 54 | } |
||
| 55 | } |
||
| 56 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.