Add some comments to Phone.
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Mon, 13 Jun 2011 23:28:49 +0000 (01:28 +0200)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Sat, 23 Jul 2011 15:05:37 +0000 (17:05 +0200)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
classes/phone.php

index 29449e7..4a16ca9 100644 (file)
@@ -332,6 +332,7 @@ class Phone
             $phone = new Phone($item);
             $success = (!$phone->error && ($phone->format() || $phone->isEmpty()) && $success);
             if (!$phone->isEmpty()) {
+                // Restrict phone visibility to $maxPublicity
                 if (!is_null($maxPublicity) && $maxPublicity->isVisible($phone->pub)) {
                     $phone->pub = $maxPublicity->level();
                 }
@@ -341,6 +342,7 @@ class Phone
         if (count($phones) == 0 && $requiresEmptyPhone) {
             $phone = new Phone();
             if (!is_null($maxPublicity) && $maxPublicity->isVisible($phone->pub)) {
+                // Restrict phone visibility to $maxPublicity
                 $phone->pub = $maxPublicity->level();
             }
             $phones[] = call_user_func(array($phone, $function));