original_string: private static function injectGrant(AclAuthorization $acl, $grantType, array $ruleSet)
      {
          // Add new resource to ACL
          $resource = $ruleSet['resource'];
          $acl->addResource($ruleSet['resource']);
  
          // Deny guest specified privileges to resource
          $privileges = isset($ruleSet['privileges']) ? $ruleSet['privileges'] : null;
  
          // null privileges means no permissions were setup; nothing to do
          if (null === $privileges) {
              return;
          }
  
          $acl->$grantType('guest', $resource, $privileges);
      }
code: private static function injectGrant(AclAuthorization $acl, $grantType, array $ruleSet)
      {
          // Add new resource to ACL
          $resource = $ruleSet['resource'];
          $acl->addResource($ruleSet['resource']);
  
          // Deny guest specified privileges to resource
          $privileges = isset($ruleSet['privileges']) ? $ruleSet['privileges'] : null;
  
          // null privileges means no permissions were setup; nothing to do
          if (null === $privileges) {
              return;
          }
  
          $acl->$grantType('guest', $resource, $privileges);
      }
code_tokens: private static function injectGrant ( AclAuthorization $ acl , $ grantType , array $ ruleSet ) { // Add new resource to ACL $ resource = $ ruleSet [ 'resource' ] ; $ acl -> addResource ( $ ruleSet [ 'resource' ] ) ; // Deny guest specified privileges to resource $ privileges = isset ( $ ruleSet [ 'privileges' ] ) ? $ ruleSet [ 'privileges' ] : null ; // null privileges means no permissions were setup; nothing to do if ( null === $ privileges ) { return ; } $ acl -> $ grantType ( 'guest' , $ resource , $ privileges ) ; }
docstring: Inject the ACL with the grant specified by a single rule set.
  
  @param AclAuthorization $acl
  @param string $grantType
  @param array $ruleSet
  @return void
docstring_tokens: Inject the ACL with the grant specified by a single rule set .