json_encode

Supported Versions: PHP 5 >= 5.2.0, PHP 7, PHP 8, PECL json >= 1.2.0
Returns the JSON representation of a value
<?php json_encode(mixed $value, int $flags = 0, int $depth = 512): string|false
<?php             return false;

        }



        return (bool) file_put_contents($filePath, json_encode([

            ...match (true) {

                class_exists('\Illuminate\Support\Str') => [

                    'preset' => 'laravel',

                ],

                default => [

                    'preset' => 'base',

                ],

            },

            'ignore' => [

                'words' => [

                    'php',

                ],

                'paths' => [],

            ],

        ], JSON_PRETTY_PRINT));

    }
<?php     {

        $filePath = ProjectPath::get().'/'.self::JSON_CONFIGURATION_NAME;



        file_put_contents($filePath, json_encode([

            ...$this->preset !== null ? ['preset' => $this->preset] : [],

            'ignore' => [

                'words' => $this->whitelistedWords,

                'paths' => $this->whitelistedPaths,

            ],

        ], JSON_PRETTY_PRINT));

    }

}