Update the PHPDocs to modify the invalid types of parameters

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3272 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2016-12-08 15:33:26 +00:00
parent 1ddc03dcbb
commit 3a004fbdc0
7 changed files with 61 additions and 60 deletions

View File

@@ -61,8 +61,8 @@ class dbjson
} }
/** Store one document in database /** Store one document in database
* @param $collection string The collection name * @param string $collection The collection name
* @param $document array() * @param array $document The document to insert
* @return integer return The number of document inserted in the database * @return integer return The number of document inserted in the database
*/ */
public function insertOne ($collection, $document) public function insertOne ($collection, $document)
@@ -79,8 +79,8 @@ class dbjson
} }
/** Store multiple documents in database /** Store multiple documents in database
* @param $collection string The collection name * @param string $collection The collection name
* @param $documents array(array ()) * @param array documents array(array ())
* @return integer The number of documents inserted in the database * @return integer The number of documents inserted in the database
*/ */
public function insertMany ($collection, $documents) public function insertMany ($collection, $documents)
@@ -107,11 +107,11 @@ class dbjson
* Then return only the $fields (all by default). * Then return only the $fields (all by default).
* The field _id is always returned * The field _id is always returned
* Return $limit maximum documents (no limit by default) * Return $limit maximum documents (no limit by default)
* @param $collection string The collection name * @param string $collection The collection name
* @param $filter array The filter to apply to found the documents * @param array $filter The filter to apply to found the documents
* @param $fields array|string The fields to display (* for all, empty array * @param array|string $fields The fields to display (* for all, empty array
* for none) * for none)
* @param $limit integer The number of documents to display * @param integer $limit The number of documents to display
* @return array The documents matching the parameters * @return array The documents matching the parameters
*/ */
public function find ($collection, $filter = array (), $fields = "*", public function find ($collection, $filter = array (), $fields = "*",
@@ -152,9 +152,9 @@ class dbjson
} }
/** Update some existing documents. Do not change the _id keys /** Update some existing documents. Do not change the _id keys
* @param $collection string The collection name * @param string $collection The collection name
* @param $filter array The filter to apply to found the documents * @param array $filter The filter to apply to found the documents
* @param $document array The data to update * @param array $document The data to update
* @return integer The number of modified documents * @return integer The number of modified documents
* To unset a field, add in the document array a "_unset"=>array("field)" * To unset a field, add in the document array a "_unset"=>array("field)"
*/ */
@@ -204,9 +204,9 @@ class dbjson
} }
/** Replace some existing documents. Do not change the _id keys /** Replace some existing documents. Do not change the _id keys
* @param $collection string The collection name * @param string $collection The collection name
* @param $filter array The filter to apply to found the documents * @param array $filter The filter to apply to found the documents
* @param $document array The data to update * @param array $document The data to update
* @return integer The number of modified documents * @return integer The number of modified documents
*/ */
public function replace ($collection, $filter, $document) public function replace ($collection, $filter, $document)
@@ -230,8 +230,8 @@ class dbjson
} }
/** Delete the first document matching the filter /** Delete the first document matching the filter
* @param $collection string The collection name * @param string $collection The collection name
* @param $filter array The filter to found the documents * @param array $filter The filter to found the documents
* @return integer The number of deleted documents * @return integer The number of deleted documents
*/ */
public function deleteOne ($collection, $filter) public function deleteOne ($collection, $filter)
@@ -253,8 +253,8 @@ class dbjson
} }
/** Delete all the documents matching the filter /** Delete all the documents matching the filter
* @param $collection string The collection name * @param string $collection The collection name
* @param $filter array The filter to apply to found the documents * @param array $filter The filter to apply to found the documents
* @return integer The number of deleted documents * @return integer The number of deleted documents
*/ */
public function deleteMany ($collection, $filter) public function deleteMany ($collection, $filter)
@@ -273,8 +273,8 @@ class dbjson
/** Look for the keys corresponding to the filter in the collection /** Look for the keys corresponding to the filter in the collection
* Don't manage the locks ! * Don't manage the locks !
* @param $collection string The collection name * @param string $collection The collection name
* @param $filter array The filter to apply to found the documents * @param array $filter The filter to apply to found the documents
* - A filter is an array containing the fields and the values to found * - A filter is an array containing the fields and the values to found
* array () <== Look for all the documents (no * array () <== Look for all the documents (no
* filter) * filter)
@@ -414,7 +414,7 @@ class dbjson
} }
/** Write the dbfile with the provided data. This function don't do locks ! /** Write the dbfile with the provided data. This function don't do locks !
* @param $data array The database to store * @param array $data The database to store
* @return bool True if the recording is OK, false if there is a problem * @return bool True if the recording is OK, false if there is a problem
*/ */
private function writeDB () private function writeDB ()

View File

@@ -291,8 +291,8 @@ class dblayer
} }
/** Verify if the provided data can be inserted/updated in the database. /** Verify if the provided data can be inserted/updated in the database.
@param $data An array containing the data to verify with keys @param array $data An array containing the data to verify with keys
@param $updatekey the key to update @param mixed|null $updatekey the key to update
@return an array with the errors in array($key=>array($priority,$message)) @return an array with the errors in array($key=>array($priority,$message))
*/ */
public function verify ($data, $updatekey=false) public function verify ($data, $updatekey=false)
@@ -972,7 +972,7 @@ class dblayer
/** Delete a tuple identified by its primary key /** Delete a tuple identified by its primary key
Return the number of deleted rows (can be 0 !) Return the number of deleted rows (can be 0 !)
@param strin|integer $deletekey The key of primary key to be deleted */ @param string|integer $deletekey The key of primary key to be deleted */
public function delete ($deletekey) public function delete ($deletekey)
{ {
if ($this->debug) echo "== Entering delete\n"; if ($this->debug) echo "== Entering delete\n";

View File

@@ -42,8 +42,8 @@ class file
} }
/** Change the group for a file/dir... /** Change the group for a file/dir...
* @param $filename string The file/directory to change * @param string $filename The file/directory to change
* @param $group mixed The group name or group GID * @param mixed $group The group name or group GID
* @throws If filename not exists, or the directory is not RW * @throws If filename not exists, or the directory is not RW
*/ */
public function chgrp ($filename, $group) public function chgrp ($filename, $group)
@@ -65,7 +65,7 @@ class file
} }
/** Change the rights mode for a file/dir... /** Change the rights mode for a file/dir...
* @param $filename string The file/directory to change * @param string $filename The file/directory to change
* @throws If filename not exists, or the directory is not RW * @throws If filename not exists, or the directory is not RW
*/ */
public function chmod ($filename, $mode) public function chmod ($filename, $mode)
@@ -87,8 +87,8 @@ class file
} }
/** Change the owner for a file/dir... /** Change the owner for a file/dir...
* @param $filename string The file/directory to change * @param string $filename The file/directory to change
* @param $user mixed The user name or user UID * @param mixed $user The user name or user UID
* @throws If filename not exists, or the directory is not RW * @throws If filename not exists, or the directory is not RW
*/ */
public function chown ($filename, $user) public function chown ($filename, $user)
@@ -116,7 +116,7 @@ class file
} }
/** Chroot in the provided directory /** Chroot in the provided directory
* @param $directory string The directory to chroot * @param string $directory The directory to chroot
* @return true if the chroot is done, false if there is a failure * @return true if the chroot is done, false if there is a failure
* @throws If directory not exists, or the directory is not executable * @throws If directory not exists, or the directory is not executable
*/ */
@@ -184,7 +184,7 @@ class file
/** Write a string to a file /** Write a string to a file
* @param string $filename Path to the file where to write the data * @param string $filename Path to the file where to write the data
* @param string $data The data to write * @param string $data The data to write
* @param int|null $flags The optional flags * @param integer|null $flags The optional flags
* @return the length of the data stored * @return the length of the data stored
* @throws If parent directory not exists, is not writeable, or the file * @throws If parent directory not exists, is not writeable, or the file
* exists and is not writeable * exists and is not writeable
@@ -265,7 +265,7 @@ class file
/** Lock a file exclusively /** Lock a file exclusively
* @param $filename The file to lock * @param string $filename The file to lock
* @return bool true if the lock is acquired, false otherwise * @return bool true if the lock is acquired, false otherwise
* @throws If parent directory not exists, or is not writeable * @throws If parent directory not exists, or is not writeable
*/ */
@@ -287,7 +287,7 @@ class file
} }
/** Lock a file shared (allow multiple read) /** Lock a file shared (allow multiple read)
* @param $filename The file to lock * @param string $filename The file to lock
* @return bool true if the lock is acquired, false otherwise * @return bool true if the lock is acquired, false otherwise
* @throws If parent directory not exists, or is not writeable * @throws If parent directory not exists, or is not writeable
*/ */
@@ -309,7 +309,7 @@ class file
} }
/** Unlock a file previously locked /** Unlock a file previously locked
* @param $filename The file to lock * @param string $filename The file to lock
* @return bool true if the lock is acquired, false otherwise * @return bool true if the lock is acquired, false otherwise
* @throws If parent directory not exists, or is not writeable * @throws If parent directory not exists, or is not writeable
*/ */
@@ -328,7 +328,7 @@ class file
} }
/** Calculate the md5 sum of a file /** Calculate the md5 sum of a file
* @param $filename The file to hash * @param string $filename The file to hash
* @return the calulated hash * @return the calulated hash
* @throws If the file doesn't exists * @throws If the file doesn't exists
*/ */
@@ -349,9 +349,9 @@ class file
} }
/** Create a new directory /** Create a new directory
* @param $pathname The directory to create * @param string $pathname The directory to create
* @param $mode The mode to create (0777 by default) * @param integer $mode The mode to create (0777 by default)
* @param $recursive (false by default) * @param boolean $recursive (false by default)
* @return bool true if the directory is correctely created, false if the * @return bool true if the directory is correctely created, false if the
* directory already exists * directory already exists
* @throws If parent directory not exists, is not writeable * @throws If parent directory not exists, is not writeable
@@ -576,7 +576,7 @@ class file
} }
/** Calculate the sha1 sum of a file /** Calculate the sha1 sum of a file
* @param $filename The file to hash * @param string $filename The file to hash
* @return the calulated hash * @return the calulated hash
* @throws If the file doesn't exists * @throws If the file doesn't exists
*/ */
@@ -598,7 +598,8 @@ class file
/** Create a new file or update the timestamp if the file exists /** Create a new file or update the timestamp if the file exists
* @param string $filename the filename * @param string $filename the filename
* @param int $time the timestamp to use (actual timestamp if not defined) * @param integer|null $time the timestamp to use (actual timestamp if not
* defined)
* @return bool true or false on failure * @return bool true or false on failure
* @throws If parent directory not exists, is not writeable * @throws If parent directory not exists, is not writeable
*/ */
@@ -635,7 +636,7 @@ class file
* executable. The path must exists. * executable. The path must exists.
* Must use the filesystem path (complete) and not the version in chroot. * Must use the filesystem path (complete) and not the version in chroot.
* The last directoy must be executable and readable (no test for writeable) * The last directoy must be executable and readable (no test for writeable)
* @param $path string The directory path to check * @param string $path The directory path to check
* @return true if the path is executable for all the parents and for the * @return true if the path is executable for all the parents and for the
* last directory * last directory
* @throws if there is a missing part, or a parent is not executable * @throws if there is a missing part, or a parent is not executable
@@ -716,7 +717,7 @@ class file
* executable. The path must exists. * executable. The path must exists.
* Must use the filesystem path (complete) and not the version in chroot. * Must use the filesystem path (complete) and not the version in chroot.
* The last directoy must be executable and readable and writeable * The last directoy must be executable and readable and writeable
* @param $path string The directory path to check * @param string $path The directory path to check
* @return true if the path is executable for all the parents and for the * @return true if the path is executable for all the parents and for the
* last directory * last directory
* @throws if there is a missing part, or a parent is not executable * @throws if there is a missing part, or a parent is not executable
@@ -747,9 +748,9 @@ class file
} }
/** Save a debug log /** Save a debug log
* @param $prio The message priority. Should be higher than $this->debug to * @param integer $prio The message priority. Should be higher than
* save the message * $this->debug to save the message
* @param $message The message to save * @param string $message The message to save
* @return null; * @return null;
*/ */
private function debug ($prio, $message) private function debug ($prio, $message)

View File

@@ -417,9 +417,9 @@ class mail
/** Define a HTML body. If the HTML body already exists, overwrite it /** Define a HTML body. If the HTML body already exists, overwrite it
* If there is an text body, manage the boundary in alternative mode * If there is an text body, manage the boundary in alternative mode
* @param $htmlContent in UTF-8 * @param string $htmlContent in UTF-8
* @param $charset to be stored in the mail * @param string $charset to be stored in the mail
* @param $encoding the encoding in the mail * @param string $encoding the encoding in the mail
*/ */
public function setBodyHTML ($htmlContent, $charset="utf-8", public function setBodyHTML ($htmlContent, $charset="utf-8",
$encoding="quoted-printable") $encoding="quoted-printable")
@@ -520,9 +520,9 @@ class mail
/** Add a Text body. If the text body already exists, overwrite it /** Add a Text body. If the text body already exists, overwrite it
* If there is an HTML body, manage the boundary in alternative mode * If there is an HTML body, manage the boundary in alternative mode
* @param $textContent in UTF-8 * @param string $textContent in UTF-8
* @param $charset to be stored in the mail * @param string $charset to be stored in the mail
* @param $encoding the encoding in the mail * @param string $encoding the encoding in the mail
*/ */
public function setBodyText ($textContent, $charset="utf-8", public function setBodyText ($textContent, $charset="utf-8",
$encoding="quoted-printable") $encoding="quoted-printable")

View File

@@ -338,7 +338,7 @@ class markdown
} }
/** Return the depth of the provided line /** Return the depth of the provided line
@param $line Line to analyze @param string $line Line to analyze
@return the depth of the line */ @return the depth of the line */
private function depth ($line) private function depth ($line)
{ {

View File

@@ -48,7 +48,7 @@ class module
/** List all the enable modules coming from the configuration and available /** List all the enable modules coming from the configuration and available
in the system in the system
@param $confModules array the list of the available modules coming from @param array $confModules the list of the available modules coming from
the configuration. Can have some non available modules. the configuration. Can have some non available modules.
@return array the list of the available modules names with the path */ @return array the list of the available modules names with the path */
public function listEnable ($confModules) public function listEnable ($confModules)

View File

@@ -310,7 +310,7 @@ class route
* echo "Hello, $name"; * echo "Hello, $name";
* }); * });
* @param string $route Route to check with the URL * @param string $route Route to check with the URL
* @param function $function Function to be executed if the route match * @param callable $function Function to be executed if the route match
* @return Exit of the PHP after displaying the page if match, or return the * @return Exit of the PHP after displaying the page if match, or return the
* route object to chain it whith the next test * route object to chain it whith the next test
*/ */
@@ -335,7 +335,7 @@ class route
* echo "Hello, $name"; * echo "Hello, $name";
* }); * });
* @param string $route Route to check with the URL * @param string $route Route to check with the URL
* @param function $function Function to be executed if the route match * @param callable $function Function to be executed if the route match
* @return Exit of the PHP after displaying the page if match, or return the * @return Exit of the PHP after displaying the page if match, or return the
* route object to chain it whith the next test * route object to chain it whith the next test
*/ */
@@ -360,7 +360,7 @@ class route
* echo "Hello, $name"; * echo "Hello, $name";
* }); * });
* @param string $route Route to check with the URL * @param string $route Route to check with the URL
* @param function $function Function to be executed if the route match * @param callable $function Function to be executed if the route match
* @return Exit of the PHP after displaying the page if match, or return the * @return Exit of the PHP after displaying the page if match, or return the
* route object to chain it whith the next test * route object to chain it whith the next test
*/ */
@@ -385,7 +385,7 @@ class route
* echo "Hello, $name"; * echo "Hello, $name";
* }); * });
* @param string $route Route to check with the URL * @param string $route Route to check with the URL
* @param function $function Function to be executed if the route match * @param callable $function Function to be executed if the route match
* @return Exit of the PHP after displaying the page if match, or return the * @return Exit of the PHP after displaying the page if match, or return the
* route object to chain it whith the next test * route object to chain it whith the next test
*/ */
@@ -412,7 +412,7 @@ class route
* }); * });
* @param string $methods The allowed methods, separated by commas (,) * @param string $methods The allowed methods, separated by commas (,)
* @param string $route Route to check with the URL * @param string $route Route to check with the URL
* @param function $function Function to be executed if the route match * @param callable $function Function to be executed if the route match
* @return Exit of the PHP after displaying the page if match, or return the * @return Exit of the PHP after displaying the page if match, or return the
* route object to chain it whith the next test * route object to chain it whith the next test
*/ */
@@ -428,7 +428,7 @@ class route
/** Do the mapping between the url and the route : call the function if /** Do the mapping between the url and the route : call the function if
* thereis a match * thereis a match
* @param string $route Route to check with the URL * @param string $route Route to check with the URL
* @param function $function Function to be executed if the route match * @param callable $function Function to be executed if the route match
* @return Exit of the PHP after displaying the page if match, or return the * @return Exit of the PHP after displaying the page if match, or return the
* route object to chain it whith the next test * route object to chain it whith the next test
*/ */
@@ -521,7 +521,7 @@ class route
} }
/** Print an error page. If a custom page exists, use it /** Print an error page. If a custom page exists, use it
* @param $e Exception to print * @param object $e Exception to print
* @return bool true after the error is displayed * @return bool true after the error is displayed
*/ */
public function error ($e) public function error ($e)