diff --git a/src/Support/Expression.php b/src/Support/Expression.php index 68f23c6..f48a774 100644 --- a/src/Support/Expression.php +++ b/src/Support/Expression.php @@ -12,7 +12,7 @@ class Expression /** * Create a new expression instance. * - * @param string $value + * @param string $value */ public function __construct($value) { diff --git a/src/Support/Manager.php b/src/Support/Manager.php index b4262d4..2012e3a 100644 --- a/src/Support/Manager.php +++ b/src/Support/Manager.php @@ -16,7 +16,6 @@ abstract class Manager extends \Illuminate\Support\Manager * * @param string $driver * @return object - * @see Manager::driver() */ public function make($driver = null) { @@ -26,7 +25,7 @@ public function make($driver = null) /** * Create a new driver instance. * - * @param string $driverName + * @param string $driverName * @return object */ protected function createDriver($driverName) @@ -51,7 +50,7 @@ protected function createDriver($driverName) /** * Call a custom driver creator. * - * @param string $driverName + * @param string $driverName * @return object */ protected function callCustomCreator($driverName) diff --git a/src/Support/Morph.php b/src/Support/Morph.php index cd256e0..6cdb41b 100644 --- a/src/Support/Morph.php +++ b/src/Support/Morph.php @@ -32,7 +32,7 @@ public static function __callStatic($method, $parameters) * Determine if method is callable. * * @param string $method - * @return boolean + * @return bool */ public static function isCallable($method) { diff --git a/src/Support/Nesty.php b/src/Support/Nesty.php index df865ab..1f4da26 100644 --- a/src/Support/Nesty.php +++ b/src/Support/Nesty.php @@ -1,5 +1,6 @@ config = $config; } @@ -35,18 +35,17 @@ public function __construct(array $config = array()) /** * Create a new Fluent instance while appending default config. * - * @param integer $id + * @param int $id * @return \Illuminate\Support\Fluent */ protected function toFluent($id) { - $defaults = isset($this->config['defaults']) ? - $this->config['defaults'] : array(); + $defaults = Arr::get($this->config, 'defaults', []); - return new Fluent(array_merge($defaults, array( + return new Fluent(array_merge($defaults, [ 'id' => $id, - 'childs' => array(), - ))); + 'childs' => [], + ])); } /** @@ -58,7 +57,7 @@ protected function toFluent($id) */ protected function addBefore($id, $before) { - $items = array(); + $items = []; $item = $this->toFluent($id); $keys = array_keys($this->items); $position = array_search($before, $keys); @@ -129,7 +128,7 @@ protected function addChild($id, $parent) return null; } - $item = $node->childs; + $item = $node->get('childs'); $item[$id] = $this->toFluent($id); $node->childs($item); @@ -149,10 +148,10 @@ protected function addParent($id) } /** - * Add a new item, prepending or appending + * Add a new item, by prepend or append. * - * @param string $id - * @param string $location + * @param string $id + * @param string $location * @return \Illuminate\Support\Fluent */ public function add($id, $location = '#') @@ -169,18 +168,18 @@ public function add($id, $location = '#') /** * Pick traverse from matched expression. * - * @param string $id - * @param string $key - * @param string $location + * @param string $id + * @param string $key + * @param string $location * @return \Illuminate\Support\Fluent */ protected function pickTraverseFromMatchedExpression($id, $key, $location) { - $matching = array( + $matching = [ '<' => 'addBefore', '>' => 'addAfter', '^' => 'addChild', - ); + ]; $method = $matching[$key]; diff --git a/src/Support/Traits/ControllerResponseTrait.php b/src/Support/Traits/ControllerResponseTrait.php index 98c2693..6a1834f 100644 --- a/src/Support/Traits/ControllerResponseTrait.php +++ b/src/Support/Traits/ControllerResponseTrait.php @@ -11,9 +11,9 @@ trait ControllerResponseTrait /** * Queue notification and redirect. * - * @param string $to - * @param string $message - * @param string $type + * @param string $to + * @param string $message + * @param string $type * @return mixed */ public function redirectWithMessage($to, $message = null, $type = 'success') @@ -26,8 +26,8 @@ public function redirectWithMessage($to, $message = null, $type = 'success') /** * Queue notification and redirect. * - * @param string $to - * @param mixed $errors + * @param string $to + * @param mixed $errors * @return mixed */ public function redirectWithErrors($to, $errors) @@ -38,7 +38,7 @@ public function redirectWithErrors($to, $errors) /** * Redirect. * - * @param string $to + * @param string $to * @return mixed */ public function redirect($to) @@ -49,7 +49,7 @@ public function redirect($to) /** * Halt current request using App::abort(). * - * @param int $code + * @param int $code * @return void * @throws \Symfony\Component\HttpKernel\Exception\HttpException * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException diff --git a/src/Support/Traits/DataContainerTrait.php b/src/Support/Traits/DataContainerTrait.php index 5f787e9..2071d62 100644 --- a/src/Support/Traits/DataContainerTrait.php +++ b/src/Support/Traits/DataContainerTrait.php @@ -45,7 +45,7 @@ public function set($key, $value = null) * Check if item key has a value. * * @param string $key - * @return boolean + * @return bool */ public function has($key) { diff --git a/src/Support/Traits/DescendibleTrait.php b/src/Support/Traits/DescendibleTrait.php index c7b8b77..243c93c 100644 --- a/src/Support/Traits/DescendibleTrait.php +++ b/src/Support/Traits/DescendibleTrait.php @@ -28,8 +28,8 @@ protected function descendants(array $array, $key = null) /** * Resolve last descendant node from items. * - * @param array $array - * @param array $key + * @param array $array + * @param array $keys * @return \Illuminate\Support\Fluent */ protected function resolveLastDecendant($array, $keys) diff --git a/src/Support/Traits/MacroableTrait.php b/src/Support/Traits/MacroableTrait.php index 2a25379..0bfea8e 100644 --- a/src/Support/Traits/MacroableTrait.php +++ b/src/Support/Traits/MacroableTrait.php @@ -12,7 +12,7 @@ trait MacroableTrait /** * Register a custom HTML macro. * - * @param string $name + * @param string $name * @param callable $macro * @return void */ @@ -24,8 +24,8 @@ public function macro($name, $macro) /** * Dynamically handle calls to the html class. * - * @param string $method - * @param array $parameters + * @param string $method + * @param array $parameters * @return mixed * @throws \BadMethodCallException */ diff --git a/src/Support/Traits/ObservableTrait.php b/src/Support/Traits/ObservableTrait.php index 22cb533..0368efb 100644 --- a/src/Support/Traits/ObservableTrait.php +++ b/src/Support/Traits/ObservableTrait.php @@ -1,13 +1,13 @@