private static function createSpyClassExtendingClass($spyClassName, $baseClassName)
    {
        $spyClassCode = self::getSpyBaseCode();
        $spyClassCode[self::CLASS_NAME_LINE_INDEX] = str_replace('SpyBase', "{$spyClassName} extends {$baseClassName}", $spyClassCode[self::CLASS_NAME_LINE_INDEX]);

        $spyClassCode = self::getSpyClassCodeLinesWithOverriddenMethodsForClassOrInterface($spyClassCode, $baseClassName);

        // return the full class definition, minute the PHP tag on the opening line
        return implode("\n", array_slice($spyClassCode, 1));
    }