src/Helper/ToolboxFile.php
protected function addClasses(&$arrSource)
    {
        $countFiles = count($arrSource);
        foreach (array_keys($arrSource) as $k) {
            $arrSource[$k]['class'] = (($k == 0) ? ' first' : '') .
                (($k == ($countFiles - 1)) ? ' last' : '') .
                ((($k % 2) == 0) ? ' even' : ' odd');
        }
    }
protected function addClasses(&$arrSource)
    {
        $countFiles = count($arrSource);
        foreach (array_keys($arrSource) as $k) {
            $arrSource[$k]['class'] = (($k == 0) ? ' first' : '') .
                (($k == ($countFiles - 1)) ? ' last' : '') .
                ((($k % 2) == 0) ? ' even' : ' odd');
        }
    }
protected function addClasses ( & $ arrSource ) { $ countFiles = count ( $ arrSource ) ; foreach ( array_keys ( $ arrSource ) as $ k ) { $ arrSource [ $ k ] [ 'class' ] = ( ( $ k == 0 ) ? ' first' : '' ) . ( ( $ k == ( $ countFiles - 1 ) ) ? ' last' : '' ) . ( ( ( $ k % 2 ) == 0 ) ? ' even' : ' odd' ) ; } }
Attach first, last and even/odd classes to the given array.

@param array $arrSource The array reference of the array to which the classes shall be added to.

@return void
Attach first last and even / odd classes to the given array .