<commit_before><?php

namespace App\Http\Controllers\Api\V1;

use App\Http\Resources\V1\WorkTypePreUserAnalysisResource;
use App\Http\Controllers\Controller;
use App\User;

class WorkTypePreUserAnalysisController extends Controller
{
    /**
     * 担当者別に作業分類を取得
     * @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection
     */
    public function index()
    {
        $user = null;

        if ($userId = request('user_id')) {
            $user = User::where('id', $userId)->first();
        }

        try {
            return WorkTypePreUserAnalysisResource::collection($user->sumByWorkType);
        } catch (\Exception $exception) {
            return response()->json([
                'message' => 'ErrorException',
                'errors' => [
                    'project_id' => [
                        '該当するデータが存在しません。'
                    ]
                ]
            ], 422);
        }


    }
}<commit_msg>Apply fixes from StyleCI<commit_after><?php

namespace App\Http\Controllers\Api\V1;

use App\Http\Resources\V1\WorkTypePreUserAnalysisResource;
use App\Http\Controllers\Controller;
use App\User;

class WorkTypePreUserAnalysisController extends Controller
{
    /**
     * 担当者別に作業分類を取得
     * @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection
     */
    public function index()
    {
        $user = null;

        if ($userId = request('user_id')) {
            $user = User::where('id', $userId)->first();
        }

        try {
            return WorkTypePreUserAnalysisResource::collection($user->sumByWorkType);
        } catch (\Exception $exception) {
            return response()->json([
                'message' => 'ErrorException',
                'errors' => [
                    'project_id' => [
                        '該当するデータが存在しません。'
                    ]
                ]
            ], 422);
        }
    }
}
{'fraction_non_alphanumeric': 0.12242744063324539, 'fraction_numerical': 0.005277044854881266, 'mean_word_length': 1.8298507462686566, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '5711583', 'n_tokens_mistral': 560, 'n_tokens_neox': 547, 'n_words': 85}