ソースを参照

more macro->helper + CS

antograssiot 11 年 前
コミット
213aa6592e

+ 6 - 6
src/Console/ConsoleIo.php

@@ -52,7 +52,7 @@ class ConsoleIo
     protected $_in;
 
     /**
-     * The macro registry.
+     * The helper registry.
      *
      * @var \Cake\Console\HelperRegistry
      */
@@ -377,10 +377,10 @@ class ConsoleIo
     /**
      * Render a Console Helper
      *
-     * Create and render the output for a macro object. If the macro
+     * Create and render the output for a helper object. If the helper
      * object has not already been loaded, it will be loaded and constructed.
      *
-     * @param string $name The name of the macro to render
+     * @param string $name The name of the helper to render
      * @return Cake\Console\Helper The created helper instance.
      */
     public function helper($name)
@@ -390,10 +390,10 @@ class ConsoleIo
     }
 
     /**
-     * Convenience wrapper around macro()
+     * Convenience wrapper around helper()
      *
-     * @param string $method The macro to invoke.
-     * @param array $args The arguments for the macro.
+     * @param string $method The helper to invoke.
+     * @param array $args The arguments for the helper.
      * @return mixed
      */
     public function __call($method, $args)

+ 6 - 1
src/Console/Helper.php

@@ -25,6 +25,11 @@ use Cake\Console\ConsoleIo;
  */
 abstract class Helper
 {
+    /**
+     * Constructor
+     *
+     * @param \Cake\Console\ConsoleIo $io An io instance.
+     */
     public function __construct(ConsoleIo $io)
     {
         $this->_io = $io;
@@ -33,7 +38,7 @@ abstract class Helper
     /**
      * This method should output content using `$this->_io`.
      *
-     * @param array $args The arguments for the macro.
+     * @param array $args The arguments for the helper.
      * @return void
      */
     abstract public function output($args);

+ 2 - 2
src/Console/HelperRegistry.php

@@ -14,10 +14,10 @@
  */
 namespace Cake\Console;
 
+use Cake\Console\ConsoleIo;
 use Cake\Console\Exception\MissingHelperException;
 use Cake\Core\App;
 use Cake\Core\ObjectRegistry;
-use Cake\Console\ConsoleIo;
 
 /**
  * Registry for Helpers. Provides features
@@ -36,7 +36,7 @@ class HelperRegistry extends ObjectRegistry
     /**
      * Constructor
      *
-     * @param Shell $Shell Shell instance
+     * @param \Cake\Console\ConsoleIo $io An io instance.
      */
     public function __construct(ConsoleIo $io)
     {

+ 3 - 1
src/Shell/Helper/TableHelper.php

@@ -25,6 +25,7 @@ class TableHelper extends Helper
     /**
      * Calculate the column widths
      *
+     * @param array $rows The rows on which the columns width will be calculated on.
      * @return array
      */
     protected function _calculateWidths($rows)
@@ -60,6 +61,7 @@ class TableHelper extends Helper
     /**
      * Output a row.
      *
+     * @param array $row The row to ouptut.
      * @param array $widths The widths of each column to output.
      * @return void
      */
@@ -76,7 +78,7 @@ class TableHelper extends Helper
     /**
      * Output a table.
      *
-     * @param array $args The data to render out.
+     * @param array $rows The data to render out.
      * @return void
      */
     public function output($rows)