@@ -88,10 +88,10 @@ |
||
88 | 88 | final public function serialize(): array |
89 | 89 | { |
90 | 90 | return [ |
91 | - 'identity_id' => (string)$this->identityId, |
|
92 | - 'identity_institution' => (string)$this->identityInstitution, |
|
93 | - 'recovery_token_id' => (string)$this->recoveryTokenId, |
|
94 | - 'recovery_token_type' => (string)$this->recoveryTokenType, |
|
91 | + 'identity_id' => (string) $this->identityId, |
|
92 | + 'identity_institution' => (string) $this->identityInstitution, |
|
93 | + 'recovery_token_id' => (string) $this->recoveryTokenId, |
|
94 | + 'recovery_token_type' => (string) $this->recoveryTokenType, |
|
95 | 95 | ]; |
96 | 96 | } |
97 | 97 |
@@ -95,11 +95,11 @@ |
||
95 | 95 | final public function serialize(): array |
96 | 96 | { |
97 | 97 | return [ |
98 | - 'identity_id' => (string)$this->identityId, |
|
99 | - 'identity_institution' => (string)$this->identityInstitution, |
|
100 | - 'recovery_token_id' => (string)$this->recoveryTokenId, |
|
101 | - 'recovery_token_type' => (string)$this->recoveryTokenType, |
|
102 | - 'authority_id' => (string)$this->authorityId, |
|
98 | + 'identity_id' => (string) $this->identityId, |
|
99 | + 'identity_institution' => (string) $this->identityInstitution, |
|
100 | + 'recovery_token_id' => (string) $this->recoveryTokenId, |
|
101 | + 'recovery_token_type' => (string) $this->recoveryTokenType, |
|
102 | + 'authority_id' => (string) $this->authorityId, |
|
103 | 103 | ]; |
104 | 104 | } |
105 | 105 |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | )); |
87 | 87 | } |
88 | 88 | |
89 | - $elements = array_filter($this->elements, function ($inst) use ($institution) { |
|
89 | + $elements = array_filter($this->elements, function($inst) use ($institution) { |
|
90 | 90 | return !$institution->equals($inst); |
91 | 91 | }); |
92 | 92 | $this->elements = $elements; |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | public static function deserialize(array $data) |
113 | 113 | { |
114 | - $institutions = array_map(function ($institution) { |
|
114 | + $institutions = array_map(function($institution) { |
|
115 | 115 | return new Institution($institution); |
116 | 116 | }, $data); |
117 | 117 | |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | |
121 | 121 | public function serialize(): array |
122 | 122 | { |
123 | - return array_map(function (Institution $institution) { |
|
123 | + return array_map(function(Institution $institution) { |
|
124 | 124 | return (string) $institution; |
125 | 125 | }, $this->elements); |
126 | 126 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | )); |
57 | 57 | } |
58 | 58 | |
59 | - $elements = array_filter($this->elements, function ($inst) use ($hint) { |
|
59 | + $elements = array_filter($this->elements, function($inst) use ($hint) { |
|
60 | 60 | return !$hint->equals($inst); |
61 | 61 | }); |
62 | 62 | $this->elements = $elements; |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | public static function deserialize(array $data) |
71 | 71 | { |
72 | - $institutions = array_map(function ($hint) { |
|
72 | + $institutions = array_map(function($hint) { |
|
73 | 73 | return new VettingTypeHint($hint['locale'], $hint['hint']); |
74 | 74 | }, $data); |
75 | 75 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | public function serialize(): array |
85 | 85 | { |
86 | - return array_map(function (VettingTypeHint $hint) { |
|
86 | + return array_map(function(VettingTypeHint $hint) { |
|
87 | 87 | return $hint->jsonSerialize(); |
88 | 88 | }, $this->elements); |
89 | 89 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | // Verify only institutions are collected in the set |
51 | 51 | array_walk( |
52 | 52 | $institutions, |
53 | - function ($institution, $key) use ($institutions) { |
|
53 | + function($institution, $key) use ($institutions) { |
|
54 | 54 | if (!$institution instanceof Institution) { |
55 | 55 | throw InvalidArgumentException::invalidType( |
56 | 56 | Institution::class, |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | */ |
98 | 98 | private function sort(array $institutions) |
99 | 99 | { |
100 | - usort($institutions, function (Institution $a, Institution $b) { |
|
100 | + usort($institutions, function(Institution $a, Institution $b) { |
|
101 | 101 | return strcmp($a->getInstitution(), $b->getInstitution()); |
102 | 102 | }); |
103 | 103 |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | { |
51 | 51 | $this->institutionRole = $role; |
52 | 52 | $this->institutionSet = $institutionSet; |
53 | - $this->isDefault = (bool)$isDefault; |
|
53 | + $this->isDefault = (bool) $isDefault; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
@@ -74,8 +74,8 @@ discard block |
||
74 | 74 | |
75 | 75 | array_walk( |
76 | 76 | $institutions, |
77 | - function ($institution, $key) use ($institutions) { |
|
78 | - if (!is_string($institution) || strlen(trim($institution)) === 0) { |
|
77 | + function($institution, $key) use ($institutions) { |
|
78 | + if (!is_string($institution) || strlen(trim($institution)) === 0) { |
|
79 | 79 | throw InvalidArgumentException::invalidType( |
80 | 80 | 'string', |
81 | 81 | 'institutions', |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | { |
190 | 190 | $institutions = $this->getInstitutions($default); |
191 | 191 | $list = array_map( |
192 | - function (Institution $institution) { |
|
192 | + function(Institution $institution) { |
|
193 | 193 | return $institution->getInstitution(); |
194 | 194 | }, |
195 | 195 | $institutions |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | public static function deserialize(array $data) |
106 | 106 | { |
107 | 107 | $secondFactorTypes = array_map( |
108 | - function ($secondFactorString) { |
|
108 | + function($secondFactorString) { |
|
109 | 109 | return new SecondFactorType($secondFactorString); |
110 | 110 | }, |
111 | 111 | $data['allowed_second_factors'] |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | public function serialize(): array |
118 | 118 | { |
119 | 119 | $allowedSecondFactors = array_map( |
120 | - function (SecondFactorType $secondFactorType) { |
|
120 | + function(SecondFactorType $secondFactorType) { |
|
121 | 121 | return $secondFactorType->getSecondFactorType(); |
122 | 122 | }, |
123 | 123 | $this->allowedSecondFactors |
@@ -702,6 +702,6 @@ |
||
702 | 702 | $this->useRaaOption = InstitutionAuthorizationOption::getDefault(InstitutionRole::useRaa()); |
703 | 703 | $this->selectRaaOption = InstitutionAuthorizationOption::getDefault(InstitutionRole::selectRaa()); |
704 | 704 | |
705 | - $this->isMarkedAsDestroyed = true; |
|
705 | + $this->isMarkedAsDestroyed = true; |
|
706 | 706 | } |
707 | 707 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | public function registerBundles(): iterable |
19 | 19 | { |
20 | - $contents = require $this->getProjectDir().'/config/bundles.php'; |
|
20 | + $contents = require $this->getProjectDir() . '/config/bundles.php'; |
|
21 | 21 | foreach ($contents as $class => $envs) { |
22 | 22 | if ($envs[$this->environment] ?? $envs['all'] ?? false) { |
23 | 23 | yield new $class(); |
@@ -32,23 +32,23 @@ discard block |
||
32 | 32 | |
33 | 33 | protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void |
34 | 34 | { |
35 | - $container->addResource(new FileResource($this->getProjectDir().'/config/bundles.php')); |
|
35 | + $container->addResource(new FileResource($this->getProjectDir() . '/config/bundles.php')); |
|
36 | 36 | $container->setParameter('container.dumper.inline_class_loader', \PHP_VERSION_ID < 70400 || $this->debug); |
37 | 37 | $container->setParameter('container.dumper.inline_factories', true); |
38 | - $confDir = $this->getProjectDir().'/config'; |
|
38 | + $confDir = $this->getProjectDir() . '/config'; |
|
39 | 39 | |
40 | - $loader->load($confDir.'/{packages}/*'.self::CONFIG_EXTS, 'glob'); |
|
41 | - $loader->load($confDir.'/{packages}/'.$this->environment.'/*'.self::CONFIG_EXTS, 'glob'); |
|
42 | - $loader->load($confDir.'/{services}'.self::CONFIG_EXTS, 'glob'); |
|
43 | - $loader->load($confDir.'/{services}_'.$this->environment.self::CONFIG_EXTS, 'glob'); |
|
40 | + $loader->load($confDir . '/{packages}/*' . self::CONFIG_EXTS, 'glob'); |
|
41 | + $loader->load($confDir . '/{packages}/' . $this->environment . '/*' . self::CONFIG_EXTS, 'glob'); |
|
42 | + $loader->load($confDir . '/{services}' . self::CONFIG_EXTS, 'glob'); |
|
43 | + $loader->load($confDir . '/{services}_' . $this->environment . self::CONFIG_EXTS, 'glob'); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | protected function configureRoutes(RouteCollectionBuilder $routes): void |
47 | 47 | { |
48 | - $confDir = $this->getProjectDir().'/config'; |
|
48 | + $confDir = $this->getProjectDir() . '/config'; |
|
49 | 49 | |
50 | - $routes->import($confDir.'/{routes}/'.$this->environment.'/*'.self::CONFIG_EXTS, '/', 'glob'); |
|
51 | - $routes->import($confDir.'/{routes}/*'.self::CONFIG_EXTS, '/', 'glob'); |
|
52 | - $routes->import($confDir.'/{routes}'.self::CONFIG_EXTS, '/', 'glob'); |
|
50 | + $routes->import($confDir . '/{routes}/' . $this->environment . '/*' . self::CONFIG_EXTS, '/', 'glob'); |
|
51 | + $routes->import($confDir . '/{routes}/*' . self::CONFIG_EXTS, '/', 'glob'); |
|
52 | + $routes->import($confDir . '/{routes}' . self::CONFIG_EXTS, '/', 'glob'); |
|
53 | 53 | } |
54 | 54 | } |