@@ -216,7 +216,7 @@ public function process(&$request)
216216
217217 $ groups = $ this ->adapter ->getUsersGroupsOnFacility ($ this ->spEntityId , $ user ->getId ());
218218
219- if ($ this ->checkGroupMembership && (is_null ( $ groups) || empty ($ groups ))) {
219+ if ($ this ->checkGroupMembership && ($ groups === null || empty ($ groups ))) {
220220 if ($ this ->allowRegistrationToGroups ) {
221221 $ vosForRegistration = $ this ->getVosForRegistration ($ user );
222222
@@ -262,11 +262,11 @@ public function process(&$request)
262262 */
263263 public function register ($ request , $ vosForRegistration , $ registerUrL = null , $ dynamicRegistration = null )
264264 {
265- if (is_null ( $ registerUrL) ) {
265+ if ($ registerUrL === null ) {
266266 $ registerUrL = $ this ->registerUrl ;
267267 }
268268
269- if (is_null ( $ dynamicRegistration) ) {
269+ if ($ dynamicRegistration === null ) {
270270 $ dynamicRegistration = $ this ->dynamicRegistration ;
271271 }
272272
@@ -305,9 +305,9 @@ public function register($request, $vosForRegistration, $registerUrL = null, $dy
305305 protected function registerDirectly ($ request , $ callback , $ registerUrL , $ vo = null , $ group = null )
306306 {
307307 $ params = [];
308- if (! is_null ( $ vo) ) {
308+ if ($ vo !== null ) {
309309 $ params ['vo ' ] = $ vo ->getShortName ();
310- if (! is_null ( $ group) ) {
310+ if ($ group !== null ) {
311311 $ params ['group ' ] = $ group ->getName ();
312312 }
313313 }
@@ -441,7 +441,7 @@ protected function getSPAttributes($spEntityID)
441441 $ facilities [0 ],
442442 $ this ->facilityCheckGroupMembershipAttr
443443 );
444- if (! is_null ( $ checkGroupMembership) ) {
444+ if ($ checkGroupMembership !== null ) {
445445 $ this ->checkGroupMembership = $ checkGroupMembership ;
446446 }
447447
@@ -457,23 +457,23 @@ protected function getSPAttributes($spEntityID)
457457 $ facilities [0 ],
458458 $ this ->facilityDynamicRegistrationAttr
459459 );
460- if (! is_null ( $ dynamicRegistration) ) {
460+ if ($ dynamicRegistration !== null ) {
461461 $ this ->dynamicRegistration = $ dynamicRegistration ;
462462 }
463463
464464 $ this ->registerUrl = $ this ->rpcAdapter ->getFacilityAttribute (
465465 $ facilities [0 ],
466466 $ this ->facilityRegisterUrlAttr
467467 );
468- if (is_null ( $ this ->registerUrl ) ) {
468+ if ($ this ->registerUrl === null ) {
469469 $ this ->registerUrl = $ this ->defaultRegisterUrl ;
470470 }
471471
472472 $ allowRegistartionToGroups = $ this ->rpcAdapter ->getFacilityAttribute (
473473 $ facilities [0 ],
474474 $ this ->facilityAllowRegistrationToGroupsAttr
475475 );
476- if (! is_null ( $ allowRegistartionToGroups) ) {
476+ if ($ allowRegistartionToGroups !== null ) {
477477 $ this ->allowRegistrationToGroups = $ allowRegistartionToGroups ;
478478 }
479479 } catch (\Exception $ ex ) {
@@ -491,14 +491,14 @@ protected function checkMemberStateDefaultVo($request, $user, $uids)
491491 $ status = null ;
492492 try {
493493 $ vo = $ this ->adapter ->getVoByShortName ($ this ->voShortName );
494- if (! is_null ( $ user) ) {
494+ if ($ user !== null ) {
495495 $ status = $ this ->adapter ->getMemberStatusByUserAndVo ($ user , $ vo );
496496 }
497497 } catch (\Exception $ ex ) {
498498 throw new Exception ('perun:PerunIdentity: ' . $ ex );
499499 }
500500
501- if (is_null ( $ vo) ) {
501+ if ($ vo === null ) {
502502 throw new Exception (
503503 'perun:PerunIdentity: Vo with short name ' . $ this ->voShortName . ' does not exist. '
504504 );
@@ -516,13 +516,13 @@ protected function checkMemberStateDefaultVo($request, $user, $uids)
516516 }
517517 }
518518
519- if (is_null ( $ user) || is_null ( $ status) || $ status === Member::EXPIRED ) {
520- if (is_null ( $ user) ) {
519+ if ($ user === null || $ status === null || $ status === Member::EXPIRED ) {
520+ if ($ user === null ) {
521521 Logger::info (
522522 'Perun user with identity/ies: ' . implode (', ' , $ uids ) . ' ' .
523523 'has NOT been found. He is being redirected to register. '
524524 );
525- } elseif (is_null ( $ status) ) {
525+ } elseif ($ status === null ) {
526526 Logger::info (
527527 'Perun user with identity/ies: ' . implode (', ' , $ uids ) . ' ' .
528528 'is NOT member in vo with short name ' . $ this ->voShortName .
0 commit comments