Passed
Push — 25073_inscricao_massa ( 4492d7...054479 )
by
unknown
06:29
created
classes/mass_assign_processor.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
 defined('MOODLE_INTERNAL') || die();
27 27
 
28
-require_once($CFG->dirroot.'/cohort/lib.php');
28
+require_once($CFG->dirroot . '/cohort/lib.php');
29 29
 
30 30
 class mass_assign_processor {
31 31
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     private $authtype;
35 35
     private $registerpendencies;
36 36
 
37
-    public function __construct($relationshipcohortid, $relationshipgroupid, $registerpendencies=false, $authtype='') {
37
+    public function __construct($relationshipcohortid, $relationshipgroupid, $registerpendencies = false, $authtype = '') {
38 38
         global $DB;
39 39
 
40 40
         $this->relationshipcohort = relationship_get_cohort($relationshipcohortid, false);
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
                             'desc' => get_string('morethanoneusersccp', 'local_relationship'),
130 130
                             'level' => 'error'
131 131
                         ];
132
-                    } else if(count($pessoas) == 1) {
132
+                    } else if (count($pessoas) == 1) {
133 133
                         $pessoa = reset($pessoas);
134 134
                         $moodleuser = $this->find_user('idnumber', $pessoa->idpessoa);
135 135
                         if (empty($moodleuser)) {
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
         }
319 319
 
320 320
         if (empty($result->summary)) {
321
-            $data = (object)$params;
321
+            $data = (object) $params;
322 322
             $data->timecreated = time();
323 323
             $DB->insert_record('relationship_pendencies', $data);
324 324
             $result->summary = 'registeredaspending';
@@ -345,9 +345,9 @@  discard block
 block discarded – undo
345 345
         } else {
346 346
             for ($t = 9; $t < 11; $t++) {
347 347
                 for ($d = 0, $c = 0; $c < $t; $c++) {
348
-                    $d += $cpf{$c} * (($t + 1) - $c);
348
+                    $d += $cpf{$c}*(($t+1)-$c);
349 349
                 }
350
-                $d = ((10 * $d) % 11) % 10;
350
+                $d = ((10*$d)%11)%10;
351 351
                 if ($cpf{$c} != $d) {
352 352
                     return false;
353 353
                 }
Please login to merge, or discard this patch.