original_string: final protected function verify_protected_methods() {
          $properties = static::properties_definition();
  
          foreach ($properties as $property => $definition) {
              $method = 'get_' . $property;
              if (method_exists($this, $method)) {
                  $reflection = new ReflectionMethod($this, $method);
                  if (!$reflection->isProtected()) {
                      throw new coding_exception('The method ' . get_class($this) . '::'. $method . ' should be protected.');
                  }
              }
              $method = 'set_' . $property;
              if (method_exists($this, $method)) {
                  $reflection = new ReflectionMethod($this, $method);
                  if (!$reflection->isProtected()) {
                      throw new coding_exception('The method ' . get_class($this) . '::'. $method . ' should be protected.');
                  }
              }
          }
      }
code: final protected function verify_protected_methods() {
          $properties = static::properties_definition();
  
          foreach ($properties as $property => $definition) {
              $method = 'get_' . $property;
              if (method_exists($this, $method)) {
                  $reflection = new ReflectionMethod($this, $method);
                  if (!$reflection->isProtected()) {
                      throw new coding_exception('The method ' . get_class($this) . '::'. $method . ' should be protected.');
                  }
              }
              $method = 'set_' . $property;
              if (method_exists($this, $method)) {
                  $reflection = new ReflectionMethod($this, $method);
                  if (!$reflection->isProtected()) {
                      throw new coding_exception('The method ' . get_class($this) . '::'. $method . ' should be protected.');
                  }
              }
          }
      }
code_tokens: final protected function verify_protected_methods ( ) { $ properties = static :: properties_definition ( ) ; foreach ( $ properties as $ property => $ definition ) { $ method = 'get_' . $ property ; if ( method_exists ( $ this , $ method ) ) { $ reflection = new ReflectionMethod ( $ this , $ method ) ; if ( ! $ reflection -> isProtected ( ) ) { throw new coding_exception ( 'The method ' . get_class ( $ this ) . '::' . $ method . ' should be protected.' ) ; } } $ method = 'set_' . $ property ; if ( method_exists ( $ this , $ method ) ) { $ reflection = new ReflectionMethod ( $ this , $ method ) ; if ( ! $ reflection -> isProtected ( ) ) { throw new coding_exception ( 'The method ' . get_class ( $ this ) . '::' . $ method . ' should be protected.' ) ; } } } }
docstring: This function is used to verify that custom getters and setters are declared as protected.
  
  Persistent properties should always be accessed via get('property') and set('property', 'value') which
  will call the custom getter or setter if it exists. We do not want to allow inconsistent access to the properties.
docstring_tokens: This function is used to verify that custom getters and setters are declared as protected .