Passed
Push — 25073_inscricao_massa ( 84c564...947b27 )
by
unknown
49s
created
classes/mass_assign_processor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 namespace local_relationship;
25 25
 defined('MOODLE_INTERNAL') || die();
26 26
 
27
-require_once($CFG->dirroot.'/cohort/lib.php');
28
-require($CFG->dirroot.'/local/relationship/lib.php');
27
+require_once($CFG->dirroot . '/cohort/lib.php');
28
+require($CFG->dirroot . '/local/relationship/lib.php');
29 29
 
30 30
 class mass_assign_processor {
31 31
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     private $relationshipgroup;
35 35
     private $authtype;
36 36
 
37
-    public function __construct($relationshipcohortid, $relationshipgroupid, $authtype='') {
37
+    public function __construct($relationshipcohortid, $relationshipgroupid, $authtype = '') {
38 38
         global $DB;
39 39
 
40 40
         $this->relationshipcohort = relationship_get_cohort($relationshipcohortid, false);
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             $this->tracker->total++;
78 78
 
79 79
             $moodleuserid = $this->process_user($value);
80
-            if($moodleuserid) {
80
+            if ($moodleuserid) {
81 81
                 $this->process_relationship($moodleuserid, $allowallusers);
82 82
             }
83 83
         }
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
                         $this->tracker->track('status', get_string('morethanoneusersccp', 'local_relationship'), 'info');
111 111
                         $this->tracker->invalid++;
112 112
                         return;
113
-                    } else if(count($pessoas) == 1) {
113
+                    } else if (count($pessoas) == 1) {
114 114
                         $pessoa = reset($pessoas);
115 115
                         $moodleuser = $this->find_user('idnumber', $cpf);
116 116
                         if (empty($moodleuser)) {
@@ -248,9 +248,9 @@  discard block
 block discarded – undo
248 248
         } else {
249 249
             for ($t = 9; $t < 11; $t++) {
250 250
                 for ($d = 0, $c = 0; $c < $t; $c++) {
251
-                    $d += $cpf{$c} * (($t + 1) - $c);
251
+                    $d += $cpf{$c}*(($t+1)-$c);
252 252
                 }
253
-                $d = ((10 * $d) % 11) % 10;
253
+                $d = ((10*$d)%11)%10;
254 254
                 if ($cpf{$c} != $d) {
255 255
                     return false;
256 256
                 }
Please login to merge, or discard this patch.