src/Helpers/LogTrait.php
<?php There must be one blank line after the namespace declarationnamespace Nopolabs\Yabot\Helpers; use Psr\Log\LoggerInterface;use Psr\Log\NullLogger; trait LogTrait{ private $log; Parameter `$log` has undeclared type `?\Psr\Log\LoggerInterface` protected function setLog(LoggerInterface $log = null) {Call to method `__construct` from undeclared class `\Psr\Log\NullLogger` $this->log = $log ?? new NullLogger(); } Return type of `getLog()` is undeclared type `\Psr\Log\LoggerInterface` protected function getLog() : LoggerInterface { return $this->log; } protected function emergency($message, array $context = array()) {Call to method `emergency` from undeclared class `\Psr\Log\LoggerInterface` $this->getLog()->emergency($message, $context); } protected function alert($message, array $context = array()) {Call to method `alert` from undeclared class `\Psr\Log\LoggerInterface` $this->getLog()->alert($message, $context); } protected function critical($message, array $context = array()) {Call to method `critical` from undeclared class `\Psr\Log\LoggerInterface` $this->getLog()->critical($message, $context); } protected function error($message, array $context = array()) {Call to method `error` from undeclared class `\Psr\Log\LoggerInterface` $this->getLog()->error($message, $context); } protected function warning($message, array $context = array()) {Call to method `warning` from undeclared class `\Psr\Log\LoggerInterface` $this->getLog()->warning($message, $context); } protected function notice($message, array $context = array()) {Call to method `notice` from undeclared class `\Psr\Log\LoggerInterface` $this->getLog()->notice($message, $context); } protected function info($message, array $context = array()) {Call to method `info` from undeclared class `\Psr\Log\LoggerInterface` $this->getLog()->info($message, $context); } protected function debug($message, array $context = array()) {Call to method `debug` from undeclared class `\Psr\Log\LoggerInterface` $this->getLog()->debug($message, $context); } protected function log($level, $message, array $context = array()) {Call to method `log` from undeclared class `\Psr\Log\LoggerInterface` $this->getLog()->log($level, $message, $context); }Expected 1 newline at end of file; 0 found}