<commit_before><?php

namespace Orchid\Foundation\Filters\Transformer;

use Illuminate\Support\Facades\App;

class PlaceListTransformer extends Transformer
{
    private $locales = [];

    /**
     * PlaceListTransformer constructor.
     */
    public function __construct()
    {
        $this->locales = config('content.locales');
    }

    public static function transform($collect)
    {
        $locale = App::getLocale();

        if ($locale == null) {
            $locale = 'en';
        }

        return $collect->reject(function ($item) use ($locale) {
            $content_locale = $item['content'][$locale];


            $exists = !isset($content_locale['place']);

            if($exists) {
                return
                    $content_locale['place']['name'] != '' &&
                    $content_locale['place']['lat'] != '' &&
                    $content_locale['place']['lng'] != '';
            }

            return false;
        })->map(function ($item) use ($locale) {
            $content_locale = $item['content'][$locale];
<commit_msg>Apply fixes from StyleCI (#142)<commit_after><?php

namespace Orchid\Foundation\Filters\Transformer;

use Illuminate\Support\Facades\App;

class PlaceListTransformer extends Transformer
{
    private $locales = [];

    /**
     * PlaceListTransformer constructor.
     */
    public function __construct()
    {
        $this->locales = config('content.locales');
    }

    public static function transform($collect)
    {
        $locale = App::getLocale();

        if ($locale == null) {
            $locale = 'en';
        }

        return $collect->reject(function ($item) use ($locale) {
            $content_locale = $item['content'][$locale];

            $exists = !isset($content_locale['place']);

            if ($exists) {
                return
                    $content_locale['place']['name'] != '' &&
                    $content_locale['place']['lat'] != '' &&
                    $content_locale['place']['lng'] != '';
            }

            return false;
        })->map(function ($item) use ($locale) {
            $content_locale = $item['content'][$locale];

{'fraction_non_alphanumeric': 0.15757855822550831, 'fraction_numerical': 0.0013863216266173752, 'mean_word_length': 2.062234794908062, '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': '2558550', 'n_tokens_mistral': 589, 'n_tokens_neox': 566, 'n_words': 107}