From 357672012db167cc081986ba238cb768b884069f Mon Sep 17 00:00:00 2001 From: Jian Wu Date: Mon, 27 Jul 2015 09:13:45 -0400 Subject: [PATCH] Fixed IO param types for proper type hinting. --- src/Cascade.php | 30 +++++++++++++++++------------- src/Config.php | 13 +++++-------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/Cascade.php b/src/Cascade.php index 545814c..4153d23 100644 --- a/src/Cascade.php +++ b/src/Cascade.php @@ -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 + * + * @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; @@ -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, @@ -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) { @@ -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) { diff --git a/src/Config.php b/src/Config.php index 9ea4b03..93dc83f 100644 --- a/src/Config.php +++ b/src/Config.php @@ -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 @@ -62,7 +59,7 @@ class Config /** * Array of logger objects - * @var Monolog\Logger[] + * @var \Monolog\Logger[] */ protected $loggers = array();