Merge branch 'master' of git://github.com/civicrm/civicrm-core into codingstandards-12
[civicrm-core.git] / CRM / Mailing / MailStore / Mbox.php
index 01e566843a5ae3b2380ba7eef231e7f66484acd3..71f8c27c0a0c23c4b0990dac4588f1893819d57f 100644 (file)
@@ -44,18 +44,29 @@ class CRM_Mailing_MailStore_Mbox extends CRM_Mailing_MailStore {
   /**
    * Connect to and lock the supplied file and make sure the two mail dirs exist
    *
-   * @param string $file mbox to operate upon
+   * @param string $file
+   *   Mbox to operate upon.
    *
    * @return \CRM_Mailing_MailStore_Mbox
    */
-  function __construct($file) {
+  public function __construct($file) {
     $this->_transport = new ezcMailMboxTransport($file);
     flock($this->_transport->fh, LOCK_EX);
 
     $this->_leftToProcess = count($this->_transport->listMessages());
 
-    $this->_ignored = $this->maildir(implode(DIRECTORY_SEPARATOR, array('CiviMail.ignored', date('Y'), date('m'), date('d'))));
-    $this->_processed = $this->maildir(implode(DIRECTORY_SEPARATOR, array('CiviMail.processed', date('Y'), date('m'), date('d'))));
+    $this->_ignored = $this->maildir(implode(DIRECTORY_SEPARATOR, array(
+          'CiviMail.ignored',
+          date('Y'),
+          date('m'),
+          date('d'),
+        )));
+    $this->_processed = $this->maildir(implode(DIRECTORY_SEPARATOR, array(
+          'CiviMail.processed',
+          date('Y'),
+          date('m'),
+          date('d'),
+        )));
   }
 
   /**
@@ -63,7 +74,7 @@ class CRM_Mailing_MailStore_Mbox extends CRM_Mailing_MailStore {
    *
    * @return void
    */
-  function __destruct() {
+  public function __destruct() {
     if ($this->_leftToProcess === 0) {
       // FIXME: the ftruncate() call does not work for some reason
       if ($this->_debug) {
@@ -77,16 +88,17 @@ class CRM_Mailing_MailStore_Mbox extends CRM_Mailing_MailStore {
   /**
    * Fetch the specified message to the local ignore folder
    *
-   * @param integer $nr  number of the message to fetch
+   * @param int $nr
+   *   Number of the message to fetch.
    *
    * @return void
    */
-  function markIgnored($nr) {
+  public function markIgnored($nr) {
     if ($this->_debug) {
       print "copying message $nr to ignored folder\n";
     }
     $set = new ezcMailStorageSet($this->_transport->fetchByMessageNr($nr), $this->_ignored);
-    $parser = new ezcMailParser;
+    $parser = new ezcMailParser();
     $parser->parseMail($set);
     $this->_leftToProcess--;
   }
@@ -94,18 +106,18 @@ class CRM_Mailing_MailStore_Mbox extends CRM_Mailing_MailStore {
   /**
    * Fetch the specified message to the local processed folder
    *
-   * @param integer $nr  number of the message to fetch
+   * @param int $nr
+   *   Number of the message to fetch.
    *
    * @return void
    */
-  function markProcessed($nr) {
+  public function markProcessed($nr) {
     if ($this->_debug) {
       print "copying message $nr to processed folder\n";
     }
     $set = new ezcMailStorageSet($this->_transport->fetchByMessageNr($nr), $this->_processed);
-    $parser = new ezcMailParser;
+    $parser = new ezcMailParser();
     $parser->parseMail($set);
     $this->_leftToProcess--;
   }
 }
-