Skip to content

Commit

Permalink
Merge pull request #26 from jian-wu/patch-1
Browse files Browse the repository at this point in the history
Fixed IO param types for proper type hinting.
  • Loading branch information
rantonmattei committed Jul 29, 2015
2 parents ef63545 + 3576720 commit 151441c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
30 changes: 17 additions & 13 deletions src/Cascade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,27 @@
*/
namespace Cascade;

use Monolog\Logger;
use Monolog\Registry;

use Cascade\Config;
use Cascade\Config\ConfigLoader;
use Monolog\Handler\HandlerInterface;
use Monolog\Logger;
use Monolog\Registry;

/**
* Module class that manages Monolog Logger object
* @see Monolog\Logger
* @see Monolog\Registry
*
* @author Raphael Antonmattei <[email protected]>
*
* @see \Monolog\Logger
* @see \Monolog\Registry
*
*/
class Cascade
{
/**
* Config class that holds options for all registered loggers
* This is optional, you can set up your loggers programmatically
* @var Cascade\Config
* @var Config
*/
protected static $config = null;

Expand All @@ -37,14 +39,14 @@ class Cascade
*
* @see Monolog\Logger::__construct
*
* @param string $name The logging channel
* @param HandlerInterface[] $handlers Optional stack of handlers,
* the first one in the array is called first, etc.
* @param callable[] $processors Optional array of processors
* @param string $name The logging channel
* @param HandlerInterface[] $handlers Optional stack of handlers, the first one in the array is called first,
* etc.
* @param callable[] $processors Optional array of processors
*
* @throws \InvalidArgumentException: if no name is given
*
* @return Monolog\Logger newly created Logger
* @return Logger newly created Logger
*/
public static function createLogger(
$name,
Expand All @@ -67,7 +69,8 @@ public static function createLogger(
* provided name does not exist
*
* @param string $name Name of the requested Logger instance
* @return Monolog\Logger Requested instance of Logger or new instance
*
* @return Logger Requested instance of Logger or new instance
*/
public static function getLogger($name)
{
Expand All @@ -79,7 +82,8 @@ public static function getLogger($name)
* @see getLogger
*
* @param string $name Name of the requested Logger instance
* @return Monolog\Logger Requested instance of Logger or new instance
*
* @return Logger Requested instance of Logger or new instance
*/
public static function logger($name)
{
Expand Down
13 changes: 5 additions & 8 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@
*/
namespace Cascade;

use Cascade\Config\Loader\ClassLoader\ProcessorLoader;
use Monolog\Formatter\FormatterInterface;
use Monolog\Handler\HandlerInterface;
use Monolog\Registry;
use Symfony\Component\Config\Loader\DelegatingLoader;
use Symfony\Component\Config\Loader\LoaderResolver;

use Cascade\Config\ConfigLoader;
use Cascade\Config\Loader\ClassLoader\FormatterLoader;
use Cascade\Config\Loader\ClassLoader\HandlerLoader;
use Cascade\Config\Loader\ClassLoader\LoggerLoader;
use Cascade\Config\Loader\ClassLoader\ProcessorLoader;
use Monolog\Formatter\FormatterInterface;
use Monolog\Handler\HandlerInterface;
use Monolog\Registry;

/**
* Config class that takes a config resource (file, JSON, Yaml, etc.) and configure Loggers with
Expand Down Expand Up @@ -62,7 +59,7 @@ class Config

/**
* Array of logger objects
* @var Monolog\Logger[]
* @var \Monolog\Logger[]
*/
protected $loggers = array();

Expand Down

0 comments on commit 151441c

Please sign in to comment.