public function getRulesAsArray($iGroupId)
    {
        $aRules = $this->getRules($iGroupId);
        $aOut   = [];

        if (!empty($aRules['min'])) {
            $aOut[] = 'Have at least ' . $aRules['min'] . ' characters';
        }

        if (!empty($aRules['max'])) {
            $aOut[] = 'Have at most ' . $aRules['max'] . ' characters';
        }

        if (!empty($aRules['requirements'])) {
            foreach ($aRules['requirements'] as $sKey => $bValue) {
                switch ($sKey) {
                    case 'symbol':
                        $aOut[] = 'Contain a symbol';
                        break;

                    case 'lower_alpha':
                        $aOut[] = 'Contain a lowercase letter';
                        break;

                    case 'upper_alpha':
                        $aOut[] = 'Contain an upper case letter';
                        break;

                    case 'number':
                        $aOut[] = 'Contain a number';
                        break;
                }
            }
        }

        return $aOut;
    }
public function getRulesAsArray($iGroupId)
    {
        $aRules = $this->getRules($iGroupId);
        $aOut   = [];

        if (!empty($aRules['min'])) {
            $aOut[] = 'Have at least ' . $aRules['min'] . ' characters';
        }

        if (!empty($aRules['max'])) {
            $aOut[] = 'Have at most ' . $aRules['max'] . ' characters';
        }

        if (!empty($aRules['requirements'])) {
            foreach ($aRules['requirements'] as $sKey => $bValue) {
                switch ($sKey) {
                    case 'symbol':
                        $aOut[] = 'Contain a symbol';
                        break;

                    case 'lower_alpha':
                        $aOut[] = 'Contain a lowercase letter';
                        break;

                    case 'upper_alpha':
                        $aOut[] = 'Contain an upper case letter';
                        break;

                    case 'number':
                        $aOut[] = 'Contain a number';
                        break;
                }
            }
        }

        return $aOut;
    }
public function getRulesAsArray ( $ iGroupId ) { $ aRules = $ this -> getRules ( $ iGroupId ) ; $ aOut = [ ] ; if ( ! empty ( $ aRules [ 'min' ] ) ) { $ aOut [ ] = 'Have at least ' . $ aRules [ 'min' ] . ' characters' ; } if ( ! empty ( $ aRules [ 'max' ] ) ) { $ aOut [ ] = 'Have at most ' . $ aRules [ 'max' ] . ' characters' ; } if ( ! empty ( $ aRules [ 'requirements' ] ) ) { foreach ( $ aRules [ 'requirements' ] as $ sKey => $ bValue ) { switch ( $ sKey ) { case 'symbol' : $ aOut [ ] = 'Contain a symbol' ; break ; case 'lower_alpha' : $ aOut [ ] = 'Contain a lowercase letter' ; break ; case 'upper_alpha' : $ aOut [ ] = 'Contain an upper case letter' ; break ; case 'number' : $ aOut [ ] = 'Contain a number' ; break ; } } } return $ aOut ; }
Returns the app's password rules as an array of human friendly strings

@param integer $iGroupId The group who's rules to fetch

@return array
Returns the app s password rules as an array of human friendly strings