original_string: protected function checkSpecificObject(array $acceptedTypes, $value)
      {
          if (is_object($value)) {
              foreach ($acceptedTypes as $type) {
                  $c = get_class($value);
                  if ($c == ltrim($type, '\\') || is_subclass_of($c, $type)) {
                      return $value;
                  }
              }
          }
  
          return null;
      }
code: protected function checkSpecificObject(array $acceptedTypes, $value)
      {
          if (is_object($value)) {
              foreach ($acceptedTypes as $type) {
                  $c = get_class($value);
                  if ($c == ltrim($type, '\\') || is_subclass_of($c, $type)) {
                      return $value;
                  }
              }
          }
  
          return null;
      }
code_tokens: protected function checkSpecificObject ( array $ acceptedTypes , $ value ) { if ( is_object ( $ value ) ) { foreach ( $ acceptedTypes as $ type ) { $ c = get_class ( $ value ) ; if ( $ c == ltrim ( $ type , '\\' ) || is_subclass_of ( $ c , $ type ) ) { return $ value ; } } } return null ; }
docstring: Will check to see if the value is an object and its class is listed in
  the accepted types.
  
  @param  array $acceptedTypes Accepted types.
  @param  mixed $value Value to test.
  @return null|object
docstring_tokens: Will check to see if the value is an object and its class is listed in the accepted types .