Skip to content

Commit

Permalink
Clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
pitbulk committed Oct 14, 2016
1 parent 955697b commit 5e94388
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions lib/Saml2/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,8 @@ public function checkStatus()
*
* @return boolean true if the Conditions element exists and is unique
*/
public function checkOneCondition() {
public function checkOneCondition()
{
$entries = $this->_queryAssertion("/saml:Conditions");
if ($entries->length == 1) {
return true;
Expand All @@ -352,7 +353,8 @@ public function checkOneCondition() {
*
* @return boolean true if the AuthnStatement element exists and is unique
*/
public function checkOneAuthnStatement() {
public function checkOneAuthnStatement()
{
$entries = $this->_queryAssertion("/saml:AuthnStatement");
if ($entries->length == 1) {
return true;
Expand Down
6 changes: 4 additions & 2 deletions tests/src/OneLogin/Saml2/ResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ public function testGetNameIdData()
*
* @covers OneLogin_Saml2_Response::checkOneCondition
*/
public function testCheckOneCondition() {
public function testCheckOneCondition()
{
$xml = file_get_contents(TEST_ROOT . '/data/responses/invalids/no_conditions.xml.base64');
$response = new OneLogin_Saml2_Response($this->_settings, $xml);
$this->assertFalse($response->checkOneCondition());
Expand All @@ -249,7 +250,8 @@ public function testCheckOneCondition() {
*
* @covers OneLogin_Saml2_Response::checkOneAuthnStatement
*/
public function testCheckOneAuthNStatement() {
public function testCheckOneAuthNStatement()
{
$xml = file_get_contents(TEST_ROOT . '/data/responses/invalids/no_authnstatement.xml.base64');
$response = new OneLogin_Saml2_Response($this->_settings, $xml);
$this->assertFalse($response->checkOneAuthnStatement());
Expand Down

0 comments on commit 5e94388

Please # to comment.