1212class KnownUser
1313{
1414 //used for unittest
15- private static $ userInQueueService = NULL ;
15+ private static $ userInQueueService = null ;
1616 private static function getUserInQueueService () {
17- if (KnownUser::$ userInQueueService == NULL )
17+ if (KnownUser::$ userInQueueService == null )
1818 {
1919 return new UserInQueueService (new UserInQueueStateCookieRepository (KnownUser::getHttpRequestProvider ()->getCookieManager ()));
2020 }
2121 return KnownUser::$ userInQueueService ;
2222 }
2323
2424 //used for unittest
25- private static $ httpRequestProvider = NULL ;
25+ private static $ httpRequestProvider = null ;
2626 private static function getHttpRequestProvider () {
27- if (KnownUser::$ httpRequestProvider == NULL )
27+ if (KnownUser::$ httpRequestProvider == null )
2828 {
2929 return new HttpRequestProvider ();
3030 }
3131 return KnownUser::$ httpRequestProvider ;
3232 }
33- private static $ debugInfoArray =NULL ;
33+ private static $ debugInfoArray =null ;
3434 public static function extendQueueCookie ($ eventId , $ cookieValidityMinute , $ cookieDomain , $ secretKey ) {
3535 if (empty ($ eventId )) {
3636 throw new KnownUserException ("eventId can not be null or empty. " );
@@ -151,14 +151,13 @@ public static function validateRequestByIntegrationConfig($currentUrlWithoutQueu
151151
152152 if ($ isDebug )
153153 {
154- $ dic = array ("MatchedConfig " =>(($ matchedConfig !=NULL ) ? $ matchedConfig ["Name " ]:"NULL " ));
154+ $ dic = array ("MatchedConfig " =>(($ matchedConfig !=null ) ? $ matchedConfig ["Name " ]:"NULL " ));
155155 KnownUser::doCookieLog ($ dic );
156156 }
157157
158- if ($ matchedConfig == NULL ) {
159- return new RequestValidationResult (NULL ,NULL , NULL , NULL );
160- }
161-
158+ if ($ matchedConfig == null ) {
159+ return new RequestValidationResult (null , null , null , null , null );
160+ }
162161
163162 if (!array_key_exists ("ActionType " ,$ matchedConfig ) || $ matchedConfig ["ActionType " ]== ActionTypes::QueueAction)
164163 {
@@ -245,7 +244,7 @@ private static function logMoreRequestDetails(array &$debugInfos)
245244
246245 private static function doCookieLog (array $ debugInfos )
247246 {
248- if (KnownUser::$ debugInfoArray !=NULL )
247+ if (KnownUser::$ debugInfoArray !=null )
249248 {
250249 foreach (KnownUser::$ debugInfoArray as $ key => $ value )
251250 {
@@ -261,7 +260,7 @@ private static function doCookieLog(array $debugInfos)
261260 array_push ( $ cookieNameValues , $ key .'= ' .$ value );
262261 }
263262
264- KnownUser::getHttpRequestProvider ()->getCookieManager ()->setCookie ("queueitdebug " , implode ('| ' , $ cookieNameValues ), 0 , NULL );
263+ KnownUser::getHttpRequestProvider ()->getCookieManager ()->setCookie ("queueitdebug " , implode ('| ' , $ cookieNameValues ), 0 , null );
265264 KnownUser::$ debugInfoArray = $ debugInfos ;
266265 }
267266
@@ -290,10 +289,10 @@ public function getCookie($cookieName) {
290289 }
291290
292291 public function setCookie ($ name , $ value , $ expire , $ domain ) {
293- if ($ domain == NULL ) {
292+ if ($ domain == null ) {
294293 $ domain = "" ;
295294 }
296- setcookie ($ name , $ value , $ expire , "/ " , $ domain , false , true );
295+ setcookie ($ name , $ value , $ expire , "/ " , $ domain , false , false );
297296 }
298297 public function getCookieArray () {
299298 $ arryCookie = array ();
@@ -329,7 +328,7 @@ function getUserHostAddress()
329328
330329 function getCookieManager ()
331330 {
332- if ($ this ->cookieManager ==NULL )
331+ if ($ this ->cookieManager ==null )
333332 {
334333 $ this ->cookieManager = new CookieManager ();
335334 }
@@ -351,7 +350,7 @@ function getAbsoluteUri()
351350 }
352351 function getHeaderArray ()
353352 {
354- if ($ this ->allHeadersLowerCaseKeyArray == NULL )
353+ if ($ this ->allHeadersLowerCaseKeyArray == null )
355354 {
356355 $ tempArray =array ();
357356 foreach ( getallheaders () as $ key =>$ value )
0 commit comments