original_string: public function getProtectedProperty(...$params)
      {
          if (is_string($params[0])) {
              list($className, $object, $name) = $params;
          } elseif (is_object($params[0])) {
              list($object, $name) = $params;
              $className = get_class($object);
          }
  
          /** @var string $className */
          /** @var object $object */
          /** @var string $name */
  
          $this->checkOnObject($object);
          $this->checkOnMemberName($name);
  
          $reflector = new \ReflectionProperty($className, $name);
          $isProtected = $reflector->isProtected() || $reflector->isPrivate();
  
          if ($isProtected) {
              $reflector->setAccessible(true);
          }
          $value = $reflector->getValue($object);
          if ($isProtected) {
              $reflector->setAccessible(false);
          }
  
          return $value;
      }
code: public function getProtectedProperty(...$params)
      {
          if (is_string($params[0])) {
              list($className, $object, $name) = $params;
          } elseif (is_object($params[0])) {
              list($object, $name) = $params;
              $className = get_class($object);
          }
  
          /** @var string $className */
          /** @var object $object */
          /** @var string $name */
  
          $this->checkOnObject($object);
          $this->checkOnMemberName($name);
  
          $reflector = new \ReflectionProperty($className, $name);
          $isProtected = $reflector->isProtected() || $reflector->isPrivate();
  
          if ($isProtected) {
              $reflector->setAccessible(true);
          }
          $value = $reflector->getValue($object);
          if ($isProtected) {
              $reflector->setAccessible(false);
          }
  
          return $value;
      }
code_tokens: public function getProtectedProperty ( ... $ params ) { if ( is_string ( $ params [ 0 ] ) ) { list ( $ className , $ object , $ name ) = $ params ; } elseif ( is_object ( $ params [ 0 ] ) ) { list ( $ object , $ name ) = $ params ; $ className = get_class ( $ object ) ; } /** @var string $className */ /** @var object $object */ /** @var string $name */ $ this -> checkOnObject ( $ object ) ; $ this -> checkOnMemberName ( $ name ) ; $ reflector = new \ ReflectionProperty ( $ className , $ name ) ; $ isProtected = $ reflector -> isProtected ( ) || $ reflector -> isPrivate ( ) ; if ( $ isProtected ) { $ reflector -> setAccessible ( true ) ; } $ value = $ reflector -> getValue ( $ object ) ; if ( $ isProtected ) { $ reflector -> setAccessible ( false ) ; } return $ value ; }
docstring: Returns a value of a protected property of the object
  
  @param array ...$params
  
  @return mixed
  @throws ProtectedMembersAccessException
docstring_tokens: Returns a value of a protected property of the object