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