Passed
Push — master ( e93494...c85701 )
by Robin
04:03
created
programs/record.class.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
     {
192 192
         $App = $this->App();
193 193
 
194
-        $customFieldSet= $App->CustomFieldSet();
194
+        $customFieldSet = $App->CustomFieldSet();
195 195
         $object = mb_substr(get_class($this), mb_strlen($App->classPrefix), -mb_strlen('Set'));
196 196
 
197 197
         $customFields = $customFieldSet->select($customFieldSet->object->is($object));
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 
318 318
         $linkSet->hasOne('sourceId', get_class($this));
319 319
 
320
-        $criteria =	$linkSet->targetClass->is(get_class($target))
320
+        $criteria = $linkSet->targetClass->is(get_class($target))
321 321
             ->_AND_($linkSet->targetId->is($target->id))
322 322
             ->_AND_($linkSet->sourceClass->is($this->getRecordClassName()));
323 323
         if (isset($linkType)) {
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 
348 348
         $linkSet->hasOne('targetId', get_class($this));
349 349
 
350
-        $criteria =	$linkSet->sourceClass->is(get_class($source))
350
+        $criteria = $linkSet->sourceClass->is(get_class($source))
351 351
             ->_AND_($linkSet->sourceId->is($source->id))
352 352
             ->_AND_($linkSet->targetClass->is($this->getRecordClassName()));
353 353
         if (isset($linkType)) {
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
             $sourcesCriteria[] = $linkSet->sourceClass->is($sourceClass)->_AND_($linkSet->sourceId->in($sourceIds));
392 392
         }
393 393
 
394
-        $criteria =	$linkSet->all(
394
+        $criteria = $linkSet->all(
395 395
             $linkSet->targetClass->is($this->getRecordClassName()),
396 396
             $linkSet->any($sourcesCriteria)
397 397
         );
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
             $targetsCriteria[] = $linkSet->targetClass->is($targetClass)->_AND_($linkSet->targetId->in($targetIds));
437 437
         }
438 438
 
439
-        $criteria =	$linkSet->all(
439
+        $criteria = $linkSet->all(
440 440
             $linkSet->sourceClass->is($this->getRecordClassName()),
441 441
             $linkSet->any($targetsCriteria)
442 442
         );
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
         $App = $this->App();
674 674
         $rClass = new ReflectionClass(get_class($this));
675 675
         $component = $App->getComponentByName($rClass->getShortName());
676
-        if(isset($component)){
676
+        if (isset($component)) {
677 677
             return $component->getRecordClassName();
678 678
 //             list(, $classname) = explode('_', $component->getRecordClassName());
679 679
 //             return $classname;
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
             throw new app_Exception('Trying to get the reference string of a record without an id.');
695 695
         }
696 696
         $classname = $this->getClassName();
697
-        return $classname . ':' . $this->id;
697
+        return $classname.':'.$this->id;
698 698
     }
699 699
 
700 700
 
@@ -934,7 +934,7 @@  discard block
 block discarded – undo
934 934
     {
935 935
         $linkSet = $this->App()->LinkSet();
936 936
 
937
-        $criteria =	$linkSet->sourceClass->is(get_class($source))
937
+        $criteria = $linkSet->sourceClass->is(get_class($source))
938 938
         ->_AND_($linkSet->sourceId->is($source->id))
939 939
         ->_AND_($linkSet->targetClass->is(get_class($this)))
940 940
         ->_AND_($linkSet->targetId->is($this->id));
@@ -964,7 +964,7 @@  discard block
 block discarded – undo
964 964
     {
965 965
         $linkSet = $this->App()->LinkSet();
966 966
 
967
-        $criteria =	$linkSet->all(
967
+        $criteria = $linkSet->all(
968 968
             $linkSet->targetClass->is(get_class($target)),
969 969
             $linkSet->targetId->is($target->id),
970 970
             $linkSet->sourceClass->is(get_class($this)),
@@ -1059,13 +1059,13 @@  discard block
 block discarded – undo
1059 1059
      */
1060 1060
     protected function importDate($name, $value)
1061 1061
     {
1062
-        if (preg_match('/[0-9]{4}-[0-9]{2}-[0-9]{2}/',$value)) {
1062
+        if (preg_match('/[0-9]{4}-[0-9]{2}-[0-9]{2}/', $value)) {
1063 1063
             return $this->importProperty($name, $value);
1064 1064
         }
1065 1065
 
1066 1066
         // try in DD/MM/YYYY format
1067 1067
 
1068
-        if (preg_match('/(?P<day>[0-9]+)\/(?P<month>[0-9]+)\/(?P<year>[0-9]{2,4})/',$value, $matches)) {
1068
+        if (preg_match('/(?P<day>[0-9]+)\/(?P<month>[0-9]+)\/(?P<year>[0-9]{2,4})/', $value, $matches)) {
1069 1069
 
1070 1070
             $value = sprintf('%04d-%02d-%02d', (int) $matches['year'], (int) $matches['month'], (int) $matches['day']);
1071 1071
 
Please login to merge, or discard this patch.