Skip to content
Snippets Groups Projects
Commit 42133bf4 authored by Sergio Gómez's avatar Sergio Gómez
Browse files

Fixed phpdoc parameters type order.

parent b445283b
No related branches found
No related tags found
No related merge requests found
...@@ -16,13 +16,12 @@ class Errors ...@@ -16,13 +16,12 @@ class Errors
{ {
/** /**
* This is an stack of error logs. The topmost element is the one we are * @var array This is an stack of error logs. The topmost element is the one we are currently working on.
* currently working on.
*/ */
private static $errorStack = array(); private static $errorStack = array();
/** /**
* This is the xml error state we had before we began logging. * @var bool This is the xml error state we had before we began logging.
*/ */
private static $xmlErrorState; private static $xmlErrorState;
...@@ -104,7 +103,7 @@ class Errors ...@@ -104,7 +103,7 @@ class Errors
* *
* This function formats the given LibXMLError object as a string. * This function formats the given LibXMLError object as a string.
* *
* @param $error \LibXMLError The LibXMLError which should be formatted. * @param \LibXMLError $error The LibXMLError which should be formatted.
* @return string A string representing the given LibXMLError. * @return string A string representing the given LibXMLError.
*/ */
public static function formatError($error) public static function formatError($error)
...@@ -121,7 +120,7 @@ class Errors ...@@ -121,7 +120,7 @@ class Errors
* This fucntion takes an array of LibXMLError objects and creates a string with all the errors. * This fucntion takes an array of LibXMLError objects and creates a string with all the errors.
* Each error will be separated by a newline, and the string will end with a newline-character. * Each error will be separated by a newline, and the string will end with a newline-character.
* *
* @param $errors array An array of errors. * @param array $errors An array of errors.
* @return string A string representing the errors. An empty string will be returned if there were no * @return string A string representing the errors. An empty string will be returned if there were no
* errors in the array. * errors in the array.
*/ */
......
...@@ -20,15 +20,13 @@ class AuthnResponse ...@@ -20,15 +20,13 @@ class AuthnResponse
{ {
/** /**
* @var Validator This variable contains an XML validator for this message. * @var \SimpleSAML\XML\Validator This variable contains an XML validator for this message.
*/ */
private $validator = null; private $validator = null;
/** /**
* Whether this response was validated by some external means (e.g. SSL). * @var bool Whether this response was validated by some external means (e.g. SSL).
*
* @var bool
*/ */
private $messageValidated = false; private $messageValidated = false;
...@@ -38,16 +36,12 @@ class AuthnResponse ...@@ -38,16 +36,12 @@ class AuthnResponse
/** /**
* The DOMDocument which represents this message. * @var \DOMDocument The DOMDocument which represents this message.
*
* @var \DOMDocument
*/ */
private $dom; private $dom;
/** /**
* The relaystate which is associated with this response. * @var string|null The relaystate which is associated with this response.
*
* @var string|NULL
*/ */
private $relayState = null; private $relayState = null;
...@@ -131,10 +125,11 @@ class AuthnResponse ...@@ -131,10 +125,11 @@ class AuthnResponse
} }
/* Checks if the given node is validated by the signature on this response. /**
* Checks if the given node is validated by the signature on this response.
* *
* Returns: * @param \DOMElement Node to be validated.
* TRUE if the node is validated or FALSE if not. * @return bool TRUE if the node is validated or FALSE if not.
*/ */
private function isNodeValidated($node) private function isNodeValidated($node)
{ {
...@@ -161,8 +156,8 @@ class AuthnResponse ...@@ -161,8 +156,8 @@ class AuthnResponse
/** /**
* This function runs an xPath query on this authentication response. * This function runs an xPath query on this authentication response.
* *
* @param $query string The query which should be run. * @param string $query The query which should be run.
* @param $node \DOMNode The node which this query is relative to. If this node is NULL (the default) * @param \DOMNode $node The node which this query is relative to. If this node is NULL (the default)
* then the query will be relative to the root of the response. * then the query will be relative to the root of the response.
* @return \DOMNodeList * @return \DOMNodeList
*/ */
...@@ -187,7 +182,7 @@ class AuthnResponse ...@@ -187,7 +182,7 @@ class AuthnResponse
/** /**
* Retrieve the session index of this response. * Retrieve the session index of this response.
* *
* @return string|NULL The session index of this response. * @return string|null The session index of this response.
*/ */
public function getSessionIndex() public function getSessionIndex()
{ {
...@@ -303,10 +298,10 @@ class AuthnResponse ...@@ -303,10 +298,10 @@ class AuthnResponse
/** /**
* Build a authentication response. * Build a authentication response.
* *
* @param $idp \SimpleSAML_Configuration Metadata for the IdP the response is sent from. * @param \SimpleSAML_Configuration $idp Metadata for the IdP the response is sent from.
* @param $sp \SimpleSAML_Configuration Metadata for the SP the response is sent to. * @param \SimpleSAML_Configuration $sp Metadata for the SP the response is sent to.
* @param string $shire The endpoint on the SP the response is sent to. * @param string $shire The endpoint on the SP the response is sent to.
* @param array|NULL $attributes The attributes which should be included in the response. * @param array|null $attributes The attributes which should be included in the response.
* @return string The response. * @return string The response.
*/ */
public function generate(\SimpleSAML_Configuration $idp, \SimpleSAML_Configuration $sp, $shire, $attributes) public function generate(\SimpleSAML_Configuration $idp, \SimpleSAML_Configuration $sp, $shire, $attributes)
......
...@@ -55,7 +55,7 @@ class Signer ...@@ -55,7 +55,7 @@ class Signer
* - publickey_array The public key, as an array returned from SimpleSAML_Utilities::loadPublicKey. * - publickey_array The public key, as an array returned from SimpleSAML_Utilities::loadPublicKey.
* - id The name of the ID attribute. * - id The name of the ID attribute.
* *
* @param $options array Associative array with options for the constructor. Defaults to an empty array. * @param array $options Associative array with options for the constructor. Defaults to an empty array.
*/ */
public function __construct($options = array()) public function __construct($options = array())
{ {
...@@ -119,9 +119,9 @@ class Signer ...@@ -119,9 +119,9 @@ class Signer
* *
* Will throw an exception if unable to load the private key. * Will throw an exception if unable to load the private key.
* *
* @param $file string The file which contains the private key. The path is assumed to be relative * @param string $file The file which contains the private key. The path is assumed to be relative
* to the cert-directory. * to the cert-directory.
* @param $pass string|null The passphrase on the private key. Pass no value or NULL if the private * @param string|null $pass The passphrase on the private key. Pass no value or NULL if the private
* key is unencrypted. * key is unencrypted.
* @throws \Exception * @throws \Exception
*/ */
...@@ -176,7 +176,7 @@ class Signer ...@@ -176,7 +176,7 @@ class Signer
* If this function isn't called, no certificate will be included. * If this function isn't called, no certificate will be included.
* Will throw an exception if unable to load the certificate. * Will throw an exception if unable to load the certificate.
* *
* @param $file string The file which contains the certificate. The path is assumed to be relative to * @param string $file The file which contains the certificate. The path is assumed to be relative to
* the cert-directory. * the cert-directory.
* @throws \Exception * @throws \Exception
*/ */
...@@ -199,7 +199,7 @@ class Signer ...@@ -199,7 +199,7 @@ class Signer
/** /**
* Set the attribute name for the ID value. * Set the attribute name for the ID value.
* *
* @param $idAttrName string The name of the attribute which contains the id. * @param string $idAttrName The name of the attribute which contains the id.
*/ */
public function setIDAttribute($idAttrName) public function setIDAttribute($idAttrName)
{ {
...@@ -215,7 +215,7 @@ class Signer ...@@ -215,7 +215,7 @@ class Signer
* Extra certificates will be added to the certificate chain in the order they * Extra certificates will be added to the certificate chain in the order they
* are added. * are added.
* *
* @param $file string The file which contains the certificate, relative to the cert-directory. * @param string $file The file which contains the certificate, relative to the cert-directory.
* @throws \Exception * @throws \Exception
*/ */
public function addCertificate($file) public function addCertificate($file)
...@@ -241,9 +241,9 @@ class Signer ...@@ -241,9 +241,9 @@ class Signer
* *
* The private key must be set before calling this function. * The private key must be set before calling this function.
* *
* @param $node \DOMElement The DOMElement we should generate a signature for. * @param \DOMElement $node The DOMElement we should generate a signature for.
* @param $insertInto \DOMElement The DOMElement we should insert the signature element into. * @param \DOMElement $insertInto The DOMElement we should insert the signature element into.
* @param $insertBefore \DOMElement The element we should insert the signature element before. Defaults to NULL, * @param \DOMElement $insertBefore The element we should insert the signature element before. Defaults to NULL,
* in which case the signature will be appended to the element spesified in * in which case the signature will be appended to the element spesified in
* $insertInto. * $insertInto.
* @throws \Exception * @throws \Exception
......
...@@ -17,13 +17,13 @@ class Validator ...@@ -17,13 +17,13 @@ class Validator
{ {
/** /**
* This variable contains the X509 certificate the XML document * @var string This variable contains the X509 certificate the XML document
* was signed with, or NULL if it wasn't signed with an X509 certificate. * was signed with, or NULL if it wasn't signed with an X509 certificate.
*/ */
private $x509Certificate; private $x509Certificate;
/** /**
* This variable contains the nodes which are signed. * @var array This variable contains the nodes which are signed.
*/ */
private $validNodes = null; private $validNodes = null;
...@@ -155,7 +155,7 @@ class Validator ...@@ -155,7 +155,7 @@ class Validator
/** /**
* Calculates the fingerprint of an X509 certificate. * Calculates the fingerprint of an X509 certificate.
* *
* @param $x509cert string The certificate as a base64-encoded string. The string may optionally * @param string $x509cert The certificate as a base64-encoded string. The string may optionally
* be framed with '-----BEGIN CERTIFICATE-----' and '-----END CERTIFICATE-----'. * be framed with '-----BEGIN CERTIFICATE-----' and '-----END CERTIFICATE-----'.
* @return string The fingerprint as a 40-character lowercase hexadecimal number. NULL is returned if the * @return string The fingerprint as a 40-character lowercase hexadecimal number. NULL is returned if the
* argument isn't an X509 certificate. * argument isn't an X509 certificate.
...@@ -237,7 +237,7 @@ class Validator ...@@ -237,7 +237,7 @@ class Validator
* is an array, then any string (certificate) in the array can match. If this is a string, * is an array, then any string (certificate) in the array can match. If this is a string,
* then that string must match, * then that string must match,
* *
* @param $fingerprints string|array The fingerprints which should match. This can be a single string, * @param string|array $fingerprints The fingerprints which should match. This can be a single string,
* or an array of fingerprints. * or an array of fingerprints.
* @throws \Exception * @throws \Exception
*/ */
...@@ -268,7 +268,7 @@ class Validator ...@@ -268,7 +268,7 @@ class Validator
/** /**
* This function checks if the given XML node was signed. * This function checks if the given XML node was signed.
* *
* @param $node \DOMNode The XML node which we should verify that was signed. * @param \DOMNode $node The XML node which we should verify that was signed.
* *
* @return bool TRUE if this node (or a parent node) was signed. FALSE if not. * @return bool TRUE if this node (or a parent node) was signed. FALSE if not.
*/ */
...@@ -296,7 +296,7 @@ class Validator ...@@ -296,7 +296,7 @@ class Validator
* *
* This function throws an exception if unable to validate against the given CA file. * This function throws an exception if unable to validate against the given CA file.
* *
* @param $caFile string File with trusted certificates, in PEM-format. * @param string $caFile File with trusted certificates, in PEM-format.
* @throws \Exception * @throws \Exception
*/ */
public function validateCA($caFile) public function validateCA($caFile)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment