Skip to content

Commit 109c05a

Browse files
committed
Fix phpdoc
1 parent 1d00b82 commit 109c05a

6 files changed

Lines changed: 31 additions & 31 deletions

File tree

src/Saml2/Auth.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class Auth
122122
/**
123123
* Last error.
124124
*
125-
* @var String|null
125+
* @var string|null
126126
*/
127127
private $_lastError;
128128

@@ -146,7 +146,7 @@ class Auth
146146
* (SAMLResponse, LogoutResponse). If the SAMLResponse was
147147
* encrypted, by default tries to return the decrypted XML
148148
*
149-
* @var string
149+
* @var string|\DomDocument|null
150150
*/
151151
private $_lastResponse;
152152

@@ -236,10 +236,10 @@ public function processResponse($requestId = null)
236236
* @param bool $keepLocalSession When false will destroy the local session, otherwise will keep it
237237
* @param string|null $requestId The ID of the LogoutRequest sent by this SP to the IdP
238238
* @param bool $retrieveParametersFromServer True if we want to use parameters from $_SERVER to validate the signature
239-
* @param callable $cbDeleteSession Method name to be executed to delete session
239+
* @param callable $cbDeleteSession Callback to be executed to delete session
240240
* @param bool $stay True if we want to stay (returns the url string) False to redirect
241241
*
242-
* @return string|void
242+
* @return string|null
243243
*
244244
* @throws Error
245245
*/
@@ -397,7 +397,7 @@ public function getSessionIndex()
397397
/**
398398
* Returns the SessionNotOnOrAfter
399399
*
400-
* @return DateTime|null The SessionNotOnOrAfter of the assertion
400+
* @return int|null The SessionNotOnOrAfter of the assertion
401401
*/
402402
public function getSessionExpiration()
403403
{
@@ -428,7 +428,7 @@ public function getLastErrorReason()
428428
/**
429429
* Returns the last error
430430
*
431-
* @return Exception Error
431+
* @return Exception|null Error
432432
*/
433433
public function getLastErrorException()
434434
{
@@ -458,10 +458,10 @@ public function getAttribute($name)
458458
*
459459
* @param string|null $returnTo The target URL the user should be returned to after login.
460460
* @param array $parameters Extra parameters to be added to the GET
461-
* @param bool $forceAuthn When true the AuthNReuqest will set the ForceAuthn='true'
462-
* @param bool $isPassive When true the AuthNReuqest will set the Ispassive='true'
461+
* @param bool $forceAuthn When true the AuthNRequest will set the ForceAuthn='true'
462+
* @param bool $isPassive When true the AuthNRequest will set the Ispassive='true'
463463
* @param bool $stay True if we want to stay (returns the url string) False to redirect
464-
* @param bool $setNameIdPolicy When true the AuthNReuqest will set a nameIdPolicy element
464+
* @param bool $setNameIdPolicy When true the AuthNRequest will set a nameIdPolicy element
465465
*
466466
* @return string|null If $stay is True, it return a string with the SLO URL + LogoutRequest + parameters
467467
*/
@@ -560,7 +560,7 @@ public function getSSOurl()
560560
/**
561561
* Gets the SLO url.
562562
*
563-
* @return string The url of the Single Logout Service
563+
* @return string|null The url of the Single Logout Service
564564
*/
565565
public function getSLOurl()
566566
{

src/Saml2/AuthnRequest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ public function __construct(\OneLogin\Saml2\Settings $settings, $forceAuthn = fa
156156
* Returns deflated, base64 encoded, unsigned AuthnRequest.
157157
*
158158
* @param bool|null $deflate Whether or not we should 'gzdeflate' the request body before we return it.
159+
*
160+
* @return string
159161
*/
160162
public function getRequest($deflate = null)
161163
{

src/Saml2/LogoutResponse.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class LogoutResponse
5555
/**
5656
* After execute a validation process, if it fails, this var contains the cause
5757
*
58-
* @var string|null
58+
* @var Exception|null
5959
*/
6060
private $_error;
6161

@@ -129,8 +129,6 @@ public function getStatus()
129129
* @param bool $retrieveParametersFromServer True if we want to use parameters from $_SERVER to validate the signature
130130
*
131131
* @return bool Returns if the SAML LogoutResponse is or not valid
132-
*
133-
* @throws Exception
134132
*/
135133
public function isValid($requestId = null, $retrieveParametersFromServer = false)
136134
{
@@ -287,7 +285,7 @@ public function getResponse($deflate = null)
287285
/**
288286
* After execute a validation process, if fails this method returns the cause.
289287
*
290-
* @return Exception Cause
288+
* @return Exception|null Cause
291289
*/
292290
public function getErrorException()
293291
{

src/Saml2/Metadata.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class Metadata
3535
* @param array $sp The SP data
3636
* @param bool|string $authnsign authnRequestsSigned attribute
3737
* @param bool|string $wsign wantAssertionsSigned attribute
38-
* @param DateTime|null $validUntil Metadata's valid time
38+
* @param int|null $validUntil Metadata's valid time
3939
* @param int|null $cacheDuration Duration of the cache in seconds
4040
* @param array $contacts Contacts info
4141
* @param array $organization Organization ingo
@@ -207,7 +207,7 @@ public static function signMetadata($metadata, $key, $cert, $signAlgorithm = XML
207207
}
208208

209209
/**
210-
* Adds the x509 descriptors (sign/encriptation) to the metadata
210+
* Adds the x509 descriptors (sign/encryption) to the metadata
211211
* The same cert will be used for sign/encrypt
212212
*
213213
* @param string $metadata SAML Metadata XML

src/Saml2/Response.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Response
6666
/**
6767
* After validation, if it fail this var has the cause of the problem
6868
*
69-
* @var Exception
69+
* @var Exception|null
7070
*/
7171
private $_error;
7272

@@ -1023,7 +1023,7 @@ protected function _queryAssertion($assertionXpath)
10231023
/**
10241024
* Extracts nodes that match the query from the DOMDocument (Response Menssage)
10251025
*
1026-
* @param string $query Xpath Expresion
1026+
* @param string $query Xpath Expression
10271027
*
10281028
* @return DOMNodeList The queried nodes
10291029
*/
@@ -1125,7 +1125,7 @@ protected function decryptAssertion(\DomNode $dom)
11251125
/**
11261126
* After execute a validation process, if fails this method returns the cause
11271127
*
1128-
* @return Exception Cause
1128+
* @return Exception|null Cause
11291129
*/
11301130
public function getErrorException()
11311131
{

src/Saml2/Utils.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ public static function setBaseURLPath($baseurlpath)
399399
}
400400

401401
/**
402-
* return string The baseurlpath to be used when constructing URLs
402+
* @return string The baseurlpath to be used when constructing URLs
403403
*/
404404
public static function getBaseURLPath()
405405
{
@@ -712,7 +712,7 @@ public static function parseSAML2Time($time)
712712
* duration to. Optional, default to the
713713
* current time.
714714
*
715-
* @return int|null The new timestamp, after the duration is applied.
715+
* @return int The new timestamp, after the duration is applied.
716716
*
717717
* @throws Exception
718718
*/
@@ -796,8 +796,8 @@ public static function parseDuration($duration, $timestamp = null)
796796
/**
797797
* Compares 2 dates and returns the earliest.
798798
*
799-
* @param string $cacheDuration The duration, as a string.
800-
* @param string $validUntil The valid until date, as a string or as a timestamp
799+
* @param string|null $cacheDuration The duration, as a string.
800+
* @param string|int|null $validUntil The valid until date, as a string or as a timestamp
801801
*
802802
* @return int|null $expireTime The expiration time.
803803
*/
@@ -827,9 +827,9 @@ public static function getExpireTime($cacheDuration = null, $validUntil = null)
827827
/**
828828
* Extracts nodes from the DOMDocument.
829829
*
830-
* @param DOMDocument $dom The DOMDocument
831-
* @param string $query \Xpath Expresion
832-
* @param DOMElement $context Context Node (DOMElement)
830+
* @param DOMDocument $dom The DOMDocument
831+
* @param string $query \Xpath Expresion
832+
* @param DOMElement|null $context Context Node (DOMElement)
833833
*
834834
* @return DOMNodeList The queried nodes
835835
*/
@@ -950,7 +950,7 @@ public static function formatFingerPrint($fingerprint)
950950
*
951951
* @param string $value fingerprint
952952
* @param string $spnq SP Name Qualifier
953-
* @param string $format SP Format
953+
* @param string|null $format SP Format
954954
* @param string|null $cert IdP Public cert to encrypt the nameID
955955
* @param string|null $nq IdP Name Qualifier
956956
*
@@ -1382,10 +1382,10 @@ public static function validateSign($xml, $cert = null, $fingerprint = null, $fi
13821382
/**
13831383
* Validates a binary signature
13841384
*
1385-
* @param string $messageType Type of SAML Message
1386-
* @param array $getData HTTP GET array
1387-
* @param array $idpData IdP setting data
1388-
* @param string|null $retrieveParametersFromServer Indicates where to get the values in order to validate the Sign, from getData or from $_SERVER
1385+
* @param string $messageType Type of SAML Message
1386+
* @param array $getData HTTP GET array
1387+
* @param array $idpData IdP setting data
1388+
* @param bool $retrieveParametersFromServer Indicates where to get the values in order to validate the Sign, from getData or from $_SERVER
13891389
*
13901390
* @return bool
13911391
*

0 commit comments

Comments
 (0)