<commit_before>--TEST--
ReflectionClass::getName()
--FILE--
<?php
require 'vendor/autoload.php';

class TrickClass {
	function __toString() {
		//Return the name of another class
		return "Exception";
	}
}


$r3 = (new \BetterReflection\Reflector\ClassReflector(
    new \BetterReflection\SourceLocator\SingleFileSourceLocator(__FILE__)
))->reflect('TrickClass');

var_dump($r3->getName());

?> 
--EXPECTF--
string(10) "TrickClass"<commit_msg>Tidy up phpt file a little<commit_after>--TEST--
ReflectionClass::getName()
--FILE--
<?php
require 'vendor/autoload.php';
use BetterReflection\Reflector\ClassReflector;
use BetterReflection\SourceLocator\SingleFileSourceLocator;
$reflector = new ClassReflector(new SingleFileSourceLocator(__FILE__));

class TrickClass {
	function __toString() {
		//Return the name of another class
		return "Exception";
	}
}


$r3 = $reflector->reflect('TrickClass');

var_dump($r3->getName());

?> 
--EXPECTF--
string(10) "TrickClass"
{'fraction_non_alphanumeric': 0.15160955347871236, 'fraction_numerical': 0.008307372793354102, 'mean_word_length': 5.3841059602649, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5518377', 'n_tokens_mistral': 326, 'n_tokens_neox': 322, 'n_words': 64}