<commit_before><?php

namespace App\Repositories;

use App\Models\Layer;
use App\Models\Map;
use App\Models\Source;

class LayerRepository
{
    public function getAll()
    {
        $layers = Layer::all();

        return $layers;
    }


    public function getById($id)
    {
        $layer = Layer::with('source', 'map')->findOrFail($id);

        return $layer;
    }

    public function storeLayer($request)
    {
        $layer = new Layer();

        $layer->name = $request->name;
        $layer->visible = $request->visible;
        $layer->opacity = $request->opacity;

        $layer->type = $request->type;
        $layer->interactive = $request->interactive;
        $layer->minzoom = $request->minzoom;
        $layer->maxzoom = $request->maxzoom;
        $layer->paint = $request->paint;
        $layer->filter = $request->filter;

<commit_msg>Deprecated<commit_after><?php

namespace App\Repositories;

use App\Models\Layer;
use App\Models\Map;
use App\Models\Source;

class LayerRepository
{
    public function getAll()
    {
        $layers = Layer::all();

        return $layers;
    }


    public function getById($id)
    {
        $layer = Layer::with('source', 'map')->findOrFail($id);

        return $layer;
    }

    public function storeLayer($request)
    {
        $layer = new Layer();

        $layer->name = $request->name;
        $layer->visible = $request->visible;
        $layer->opacity = $request->opacity;

        $layer->type = $request->type;
        $layer->interactive = $request->interactive;
        $layer->minzoom = $request->minzoom;
        $layer->maxzoom = $request->maxzoom;

{'fraction_non_alphanumeric': 0.1552567237163814, 'fraction_numerical': 0.0, 'mean_word_length': 2.468220338983051, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 37, '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': '5697909', 'n_tokens_mistral': 511, 'n_tokens_neox': 489, 'n_words': 96}