Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald committed Feb 4, 2021
1 parent 0bae58b commit 785d74a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/ChannelFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public function __construct($log, $name)
/**
* @param mixed $level
* @param string $message
*
* @return void
*/
public function log($level, $message, array $context = [])
Expand Down
19 changes: 15 additions & 4 deletions src/LogFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@
use function collect;
use function config;

use Illuminate\Contracts\Container\BindingResolutionException;
use Illuminate\Support\Collection;
use function is_callable;
use PHPUnit\Framework\Assert as PHPUnit;
use PHPUnit\Framework\ExpectationFailedException;
use Psr\Log\LoggerInterface;
use SebastianBergmann\RecursionContext\InvalidArgumentException;

class LogFake implements LoggerInterface
{
Expand All @@ -32,6 +29,7 @@ class LogFake implements LoggerInterface
/**
* @param mixed $level
* @param callable|int|null $callback
*
* @return void
*/
public function assertLogged($level, $callback = null)
Expand All @@ -52,6 +50,7 @@ public function assertLogged($level, $callback = null)
* @param mixed $level
* @param int $times
* @param callable|null $callback
*
* @return void
*/
public function assertLoggedTimes($level, $times = 1, $callback = null)
Expand All @@ -65,6 +64,7 @@ public function assertLoggedTimes($level, $times = 1, $callback = null)
/**
* @param mixed $level
* @param callable|null $callback
*
* @return void
*/
public function assertNotLogged($level, $callback = null)
Expand All @@ -86,6 +86,7 @@ public function assertNothingLogged()
/**
* @param mixed $level
* @param string $message
*
* @return void
*/
public function assertLoggedMessage($level, $message)
Expand All @@ -98,6 +99,7 @@ public function assertLoggedMessage($level, $message)
/**
* @param mixed $level
* @param callable|null $callback
*
* @return \Illuminate\Support\Collection
*/
public function logged($level, $callback = null)
Expand All @@ -115,6 +117,7 @@ public function logged($level, $callback = null)

/**
* @param mixed $level
*
* @return bool
*/
public function hasLogged($level)
Expand All @@ -124,6 +127,7 @@ public function hasLogged($level)

/**
* @param mixed $level
*
* @return bool
*/
public function hasNotLogged($level)
Expand All @@ -133,6 +137,7 @@ public function hasNotLogged($level)

/**
* @param mixed $level
*
* @return \Illuminate\Support\Collection
*/
protected function logsOfLevel($level)
Expand All @@ -155,6 +160,7 @@ protected function logsInCurrentChannel()
/**
* @param mixed $level
* @param string $message
*
* @return void
*/
public function log($level, $message, array $context = [])
Expand All @@ -170,6 +176,7 @@ public function log($level, $message, array $context = [])
/**
* @param mixed $level
* @param string $message
*
* @return void
*/
public function write($level, $message, array $context = [])
Expand Down Expand Up @@ -210,6 +217,7 @@ public function stack(array $channels, $channel = null)
/**
* @param array $channels
* @param mixed $channel
*
* @return string
*/
protected function createStackChannelName($channels, $channel)
Expand All @@ -219,6 +227,7 @@ protected function createStackChannelName($channels, $channel)

/**
* @param mixed $name
*
* @return void
*/
public function setCurrentChannel($name)
Expand All @@ -236,6 +245,7 @@ public function currentChannel()

/**
* @param mixed $channel
*
* @return bool
*/
protected function currentChannelIs($channel)
Expand All @@ -253,6 +263,7 @@ public function getDefaultDriver()

/**
* @param string $name
*
* @return void
*/
public function setDefaultDriver($name)
Expand All @@ -261,7 +272,7 @@ public function setDefaultDriver($name)
}

/**
* @return self
* @return self
*/
public function getLogger()
{
Expand Down
8 changes: 8 additions & 0 deletions src/LogHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ trait LogHelpers
* Log an emergency message to the logs.
*
* @param string $message
*
* @return void
*/
public function emergency($message, array $context = [])
Expand All @@ -21,6 +22,7 @@ public function emergency($message, array $context = [])
* Log an alert message to the logs.
*
* @param string $message
*
* @return void
*/
public function alert($message, array $context = [])
Expand All @@ -32,6 +34,7 @@ public function alert($message, array $context = [])
* Log a critical message to the logs.
*
* @param string $message
*
* @return void
*/
public function critical($message, array $context = [])
Expand All @@ -43,6 +46,7 @@ public function critical($message, array $context = [])
* Log an error message to the logs.
*
* @param string $message
*
* @return void
*/
public function error($message, array $context = [])
Expand All @@ -54,6 +58,7 @@ public function error($message, array $context = [])
* Log a warning message to the logs.
*
* @param string $message
*
* @return void
*/
public function warning($message, array $context = [])
Expand All @@ -65,6 +70,7 @@ public function warning($message, array $context = [])
* Log a notice to the logs.
*
* @param string $message
*
* @return void
*/
public function notice($message, array $context = [])
Expand All @@ -76,6 +82,7 @@ public function notice($message, array $context = [])
* Log an informational message to the logs.
*
* @param string $message
*
* @return void
*/
public function info($message, array $context = [])
Expand All @@ -87,6 +94,7 @@ public function info($message, array $context = [])
* Log a debug message to the logs.
*
* @param string $message
*
* @return void
*/
public function debug($message, array $context = [])
Expand Down

0 comments on commit 785d74a

Please sign in to comment.