.. _dump-collectblocksize: .. _collect-block-size: Collect Block Size ++++++++++++++++++ Collect block size for instructions such as for, foreach, while, do...while, ifthen. This is a starting point for reviewing large blocks of code and extract methods. .. code-block:: php $value) { // This is a one line block for the foreach doSomething(); } if($a === $b) { $a++; // This is a two lines block for the ifthen doSomething($a, $b); } ?> Connex PHP features ------------------- + `inclusion `_ + `ifthen `_ + `foreach `_ + `while `_ + `dowhile `_ Specs _____ +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Short name | Dump/CollectBlockSize | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Changed Behavior `, :ref:`Dump ` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 2.2.0 | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Precision | Very high | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+-------------------------------------------------------------------------------------------------------------------------+