<commit_before><?php

namespace App\Http\Controllers\Api;

use App\LaraBin\Helpers\UserCache;
use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;

class UserController extends Controller
{
    public function __construct(UserCache $userCache)
    {
        $this->userCache = $userCache;
    }

    public function search(Request $request)
    {
        $query = $request->input('q');
        $users = $this->userCache->usernames();
        $found = array_filter($users, function($users) use ($query) {
            return ( strpos($users, $query) !== false );
        });
        $usernames = array_values($found);

        return response()->json($usernames, 200);
    }
}<commit_msg>Make usertagging in comments case insensitive<commit_after><?php

namespace App\Http\Controllers\Api;

use App\LaraBin\Helpers\UserCache;
use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;

class UserController extends Controller
{
    public function __construct(UserCache $userCache)
    {
        $this->userCache = $userCache;
    }

    public function search(Request $request)
    {
        $query = $request->input('q');
        $users = $this->userCache->usernames();
        $found = array_filter($users, function($users) use ($query) {
            return ( stripos($users, $query) !== false );
        });
        $usernames = array_values($found);

        return response()->json($usernames, 200);
    }
}
{'fraction_non_alphanumeric': 0.13793103448275862, 'fraction_numerical': 0.004056795131845842, 'mean_word_length': 3.1807909604519775, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '6529714', 'n_tokens_mistral': 444, 'n_tokens_neox': 444, 'n_words': 91}