Show
Ignore:
Timestamp:
04/28/08 16:04:22 (2 weeks ago)
Author:
Geert
Message:

CodingStyle maintenance!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/modules/forge/libraries/Forge.php

    r2460 r2593  
    8888 
    8989                // Create the input 
    90                 switch(count($args)) 
     90                switch (count($args)) 
    9191                { 
    9292                        case 1: 
     
    155155        { 
    156156                $status = TRUE; 
    157                 foreach($this->inputs as $input) 
     157                foreach ($this->inputs as $input) 
    158158                { 
    159159                        if ($input->validate() == FALSE) 
     
    174174        { 
    175175                $data = array(); 
    176                 foreach(array_merge($this->hidden, $this->inputs) as $input) 
     176                foreach (array_merge($this->hidden, $this->inputs) as $input) 
    177177                { 
    178178                        if (is_object($input->name)) // It's a Forge_Group object (hopefully) 
     
    251251                                if (is_array($errors) AND ! empty($errors)) 
    252252                                { 
    253                                         foreach($errors as $error) 
     253                                        foreach ($errors as $error) 
    254254                                        { 
    255255                                                // Replace the message with the error in the html error string 
     
    271271                        if ( ! empty($this->hidden)) 
    272272                        { 
    273                                 foreach($this->hidden as $input) 
     273                                foreach ($this->hidden as $input) 
    274274                                { 
    275275                                        $hidden[$input->name] = $input->value; 
  • trunk/modules/forge/libraries/Form_Checklist.php

    r2022 r2593  
    3333                        // Return the currently checked values 
    3434                        $array = array(); 
    35                         foreach($this->data['options'] as $id => $opt) 
     35                        foreach ($this->data['options'] as $id => $opt) 
    3636                        { 
    3737                                // Return the options that are checked 
     
    5656 
    5757                $checklist = '<ul class="'.arr::remove('class', $base_data).'">'.$nl; 
    58                 foreach(arr::remove('options', $base_data) as $val => $opt) 
     58                foreach (arr::remove('options', $base_data) as $val => $opt) 
    5959                { 
    6060                        // New set of input data 
     
    7777        protected function load_value() 
    7878        { 
    79                 foreach($this->data['options'] as $val => $checked) 
     79                foreach ($this->data['options'] as $val => $checked) 
    8080                { 
    8181                        if ($input = $this->input_value($this->data['name'])) 
  • trunk/modules/forge/libraries/Form_Dateselect.php

    r1923 r2593  
    6666 
    6767                $input = ''; 
    68                 foreach($this->parts as $type => $val) 
     68                foreach ($this->parts as $type => $val) 
    6969                { 
    7070                        if (is_int($type)) 
  • trunk/modules/forge/libraries/Form_Input.php

    r2362 r2593  
    221221                } 
    222222 
    223                 foreach($rules as $rule) 
     223                foreach ($rules as $rule) 
    224224                { 
    225225                        if ($action === '-') 
     
    306306 
    307307                $messages = array(); 
    308                 foreach($this->errors as $func => $args) 
     308                foreach ($this->errors as $func => $args) 
    309309                { 
    310310                        if (is_string($args)) 
     
    328328                                { 
    329329                                        // Get the proper i18n entry, very hacky but it works 
    330                                         switch($func) 
     330                                        switch ($func) 
    331331                                        { 
    332332                                                case 'valid_url': 
     
    428428                if ( ! empty($this->rules)) 
    429429                { 
    430                         foreach($this->rules as $rule) 
     430                        foreach ($this->rules as $rule) 
    431431                        { 
    432432                                if (($offset = strpos($rule, '[')) !== FALSE) 
     
    456456                                        { 
    457457                                                // Manually call up to 2 args for speed 
    458                                                 switch(count($args)) 
     458                                                switch (count($args)) 
    459459                                                { 
    460460                                                        case 1: 
     
    491491                if ( ! empty($this->matches)) 
    492492                { 
    493                         foreach($this->matches as $input) 
     493                        foreach ($this->matches as $input) 
    494494                        { 
    495495                                if ($this->value != $input->value) 
     
    504504                if ( ! empty($this->callbacks)) 
    505505                { 
    506                         foreach($this->callbacks as $callback) 
     506                        foreach ($this->callbacks as $callback) 
    507507                        { 
    508508                                call_user_func($callback, $this); 
     
    551551                                $this->errors['min_length'] = array($min); 
    552552                        } 
    553                         elseif($length > $max) 
     553                        elseif ($length > $max) 
    554554                        { 
    555555                                $this->errors['max_length'] = array($max); 
  • trunk/modules/forge/libraries/Form_Phonenumber.php

    r2222 r2593  
    5252 
    5353                $input = ''; 
    54                 foreach($this->parts as $type => $val) 
     54                foreach ($this->parts as $type => $val) 
    5555                { 
    5656                        isset($data['value']) OR $data['value'] = ''; 
  • trunk/modules/forge/models/user_edit.php

    r2580 r2593  
    3636                //  
    3737                // $options = array(); 
    38                 // foreach($roles as $role) 
     38                // foreach ($roles as $role) 
    3939                // { 
    4040                //      // Add each role to the options 
     
    7979                        isset($data['roles']) and $roles = arr::remove('roles', $data); 
    8080 
    81                         foreach($data as $field => $val) 
     81                        foreach ($data as $field => $val) 
    8282                        { 
    8383                                // Set object data from the form 
     
    8989                                // if ($new_user) 
    9090                                // { 
    91                                 //      foreach($roles as $role) 
     91                                //      foreach ($roles as $role) 
    9292                                //      { 
    9393                                //              // Add the user roles 
     
    9797                                // else 
    9898                                // { 
    99                                 //      foreach(array_diff($this->roles, $roles) as $role) 
     99                                //      foreach (array_diff($this->roles, $roles) as $role) 
    100100                                //      { 
    101101                                //              // Remove roles that were deactivated 
     
    103103                                //      } 
    104104                                //  
    105                                 //      foreach(array_diff($roles, $this->roles) as $role) 
     105                                //      foreach (array_diff($roles, $this->roles) as $role) 
    106106                                //      { 
    107107                                //              // Add new roles 
  • trunk/modules/forge/views/forge_template.php

    r2027 r2593  
    55<?php endif ?> 
    66<?php 
    7 foreach($inputs as $input): 
     7foreach ($inputs as $input): 
    88 
    99$sub_inputs = array(); 
     
    3131endif; 
    3232 
    33 foreach($sub_inputs as $input): 
     33foreach ($sub_inputs as $input): 
    3434 
    3535?>