PHP Classes

File: .php-cs-fixer.php

Recommend this page to a friend!
  Packages of Aby Dahana   Aksara   .php-cs-fixer.php   Download  
File: .php-cs-fixer.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Aksara
A CodeIgniter based API and CRUD generator
Author: By
Last change: chore: synchronize remaining assets and core configurations

- Updated global JS and translations to support new Page Builder phrases.
- Updated Page migration and controller to align with the latest CMS structure.
- Included SortableJS dependency in CMS assets.
- Refined README and project configurations.
Refine subscriber dashboard UI, update technical dashboard with videos, and change WhatsApp link to GitHub
Date: 3 days ago
Size: 2,025 bytes
 

Contents

Class file image Download
<?php

declare(strict_types=1);

$finder = PhpCsFixer\Finder::create()
    ->
in([
       
__DIR__ . '/aksara',
       
__DIR__ . '/install',
       
__DIR__ . '/modules'
   
])
    ->
notPath([
       
'Views',
       
'views'
   
]);

$config = new PhpCsFixer\Config();
$header = <<<EOF
This file is part of Aksara CMS, both framework and publishing
    platform.

    @author Aby Dahana <abydahana@gmail.com>
    @copyright (c) Aksara Laboratory <https://aksaracms.com>
    @license MIT License

    This source file is subject to the MIT license that is bundled
    with this source code in the LICENSE.txt file.

    When the signs come, those who don't believe at "that time"
    will have only two choices, commit suicide or become brutal.
EOF;
return
$config->setRules
([
   
'@PSR12' => true,
   
'header_comment' => [
       
'header' => $header,
       
'location' => 'after_open',
       
'comment_type' => 'PHPDoc'
   
],
   
'array_syntax' => ['syntax' => 'short'],
   
'assign_null_coalescing_to_coalesce_equal' => false,
   
'braces' => [
       
'allow_single_line_anonymous_class_with_empty_body' => true,
       
'allow_single_line_closure' => true,
       
'position_after_anonymous_constructs' => 'next',
       
'position_after_control_structures' => 'next',
       
'position_after_functions_and_oop_constructs' => 'next',
    ],
   
'binary_operator_spaces' => [
       
'default' => 'single_space'
   
],
   
'whitespace_after_comma_in_array' => [
       
'ensure_single_space' => true
   
],
   
'not_operator_with_successor_space' => true,
   
'method_chaining_indentation' => false,
   
'phpdoc_indent' => true,
   
'phpdoc_trim' => true,
   
'no_blank_lines_after_phpdoc' => true,
   
'no_superfluous_phpdoc_tags' => [
       
'remove_inheritdoc' => true
   
],
   
'phpdoc_add_missing_param_annotation' => [
       
'only_untyped' => false
   
],
   
'yoda_style' => [
       
'always_move_variable' => true
   
]
])
->
setFinder($finder)
->
setIndent(" ")
->
setLineEnding("\n");