Skip to content

Commit

Permalink
Depreciation fixes.
Browse files Browse the repository at this point in the history
Bumped to require php 8.
  • Loading branch information
evotodi committed Mar 31, 2022
1 parent 3a50d76 commit 6df7b65
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
],
"require": {
"php": "^7.4|^8",
"php": "^8",
"jdorn/sql-formatter": "^1.2"
},
"require-dev": {
Expand Down
5 changes: 1 addition & 4 deletions src/Parser/LogParserInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,5 @@

interface LogParserInterface
{
/**
* @return mixed
*/
public function parse(string $log, string $dateFormat, bool $useChannel, bool $useLevel, int $days, string $pattern);
public function parse(string $log, string $dateFormat, bool $useChannel, bool $useLevel, int $days, string $pattern): mixed;
}
11 changes: 3 additions & 8 deletions src/Reader/LogReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ public function __construct(LogFile $logFile, string $pattern = 'default')
$this->parser = $this->getDefaultParser();
}

/**
* @return LineLogParser|LogParserInterface
*/
public function getParser()
public function getParser(): LogParserInterface|LineLogParser
{
/** @noinspection PhpUnnecessaryLocalVariableInspection */
$p = & $this->parser;
Expand All @@ -78,10 +75,9 @@ public function offsetExists($offset): bool

/**
* {@inheritdoc}
* @return mixed
* @throws Exception
*/
public function offsetGet($offset)
public function offsetGet($offset): mixed
{
$key = $this->file->key();
$this->file->seek($offset);
Expand Down Expand Up @@ -126,10 +122,9 @@ public function next(): void

/**
* {@inheritdoc}
* @return mixed
* @throws Exception
*/
public function current()
public function current(): mixed
{
return $this->parser->parse($this->file->current(), $this->dateFormat, $this->useChannel, $this->useLevel, $this->days, $this->pattern);
}
Expand Down

0 comments on commit 6df7b65

Please sign in to comment.