Skip to content
Snippets Groups Projects
Unverified Commit ee1e8537 authored by Tim van Dijen's avatar Tim van Dijen Committed by GitHub
Browse files

Coding-style: PSR-2

parent 6af770ab
No related branches found
No related tags found
No related merge requests found
......@@ -5,8 +5,8 @@
*
* @package SimpleSAMLphp
*/
class sspmod_core_Auth_Process_ScopeAttribute extends SimpleSAML_Auth_ProcessingFilter {
class sspmod_core_Auth_Process_ScopeAttribute extends SimpleSAML_Auth_ProcessingFilter
{
/**
* The attribute we extract the scope from.
*
......@@ -44,7 +44,8 @@ class sspmod_core_Auth_Process_ScopeAttribute extends SimpleSAML_Auth_Processing
* @param array $config Configuration information about this filter.
* @param mixed $reserved For future use.
*/
public function __construct($config, $reserved) {
public function __construct($config, $reserved)
{
parent::__construct($config, $reserved);
assert(is_array($config));
......@@ -62,7 +63,8 @@ class sspmod_core_Auth_Process_ScopeAttribute extends SimpleSAML_Auth_Processing
*
* @param array &$request The current request
*/
public function process(&$request) {
public function process(&$request)
{
assert(is_array($request));
assert(array_key_exists('Attributes', $request));
......@@ -85,8 +87,7 @@ class sspmod_core_Auth_Process_ScopeAttribute extends SimpleSAML_Auth_Processing
}
foreach ($attributes[$this->scopeAttribute] as $scope) {
if (strpos($scope, '@') !== FALSE) {
if (strpos($scope, '@') !== false) {
$scope = explode('@', $scope, 2);
$scope = $scope[1];
}
......@@ -94,7 +95,7 @@ class sspmod_core_Auth_Process_ScopeAttribute extends SimpleSAML_Auth_Processing
foreach ($attributes[$this->sourceAttribute] as $value) {
$value = $value . '@' . $scope;
if (in_array($value, $attributes[$this->targetAttribute], TRUE)) {
if (in_array($value, $attributes[$this->targetAttribute], true)) {
// Already present
continue;
}
......@@ -102,7 +103,5 @@ class sspmod_core_Auth_Process_ScopeAttribute extends SimpleSAML_Auth_Processing
$attributes[$this->targetAttribute][] = $value;
}
}
}
}
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