Search
 
SCRIPT & CODE EXAMPLE
 

HTML

laravel phpcs.xml

<!--
composer global require squizlabs/php_codesniffer
export PATH="$PATH:$HOME/.config/composer/vendor/bin"

//To check
phpcs

//To fix
phpcbf
-->

<!-- phpcs.xml file -->
<?xml version="1.0"?>
<ruleset name="Laravel Standards">

    <!--
        The name attribute of the ruleset tag is displayed
        when running PHP_CodeSniffer with the -v command line
        argument. The description tag below is not displayed anywhere
        except in this file, so it can contain information for
        developers who may change this file in the future.
    -->
    <description>The Laravel Coding Standards</description>

    <!--
    If no files or directories are specified on the command line
    your custom standard can specify what files should be checked
    instead.

    Note that specifying any file or directory path
    on the command line will ignore all file tags.
    -->
    <file>app</file>
    <file>config</file>
    <file>public</file>
    <file>resources</file>
    <file>routes</file>
    <file>tests</file>

    <!--
        You can hard-code ignore patterns directly into your
        custom standard so you don't have to specify the
        patterns on the command line.

    -->
    <exclude-pattern>*/database/*</exclude-pattern>
    <exclude-pattern>*/cache/*</exclude-pattern>
    <exclude-pattern>*/*.js</exclude-pattern>
    <exclude-pattern>*/*.css</exclude-pattern>
    <exclude-pattern>*/*.xml</exclude-pattern>
    <exclude-pattern>*/*.blade.php</exclude-pattern>
    <exclude-pattern>*/autoload.php</exclude-pattern>
    <exclude-pattern>*/storage/*</exclude-pattern>
    <exclude-pattern>*/docs/*</exclude-pattern>
    <exclude-pattern>*/vendor/*</exclude-pattern>
    <exclude-pattern>*/migrations/*</exclude-pattern>
    <exclude-pattern>./_ide_helper.php</exclude-pattern>

    <!--
        You can hard-code command line values into your custom standard.
        Note that this does not work for the command line values:
        -v[v][v], -l, -d, -sniffs and -standard

        The following tags are equivalent to the command line arguments:
        -p
    -->

    <!--
        Print either the "full", "xml", "checkstyle", "csv"
        "json", "junit", "emacs", "source", "summary", "diff"
        "svnblame", "gitblame", "hgblame" or "notifysend" report,
        or specify the path to a custom report class
        (the "full" report is printed by default)
    -->
    <!-- <arg name="report" value="summary" /> -->
    <!-- <arg name="report" value="gitblame" /> -->
    <arg name="report" value="diff" />
    <arg name="colors" />
    <!-- <arg name="severity"/> -->
    <arg value="p" />

    <!--
        You can hard-code custom php.ini settings into your custom standard.
        The following tag sets the memory limit to 64M.
    -->
    <ini name="memory_limit" value="128M" />

    <!--
        Include all sniffs in the PEAR standard. Note that the
        path to the standard does not have to be specified as the
        PEAR standard exists inside the PHP_CodeSniffer install
        directory.
    -->
    <rule ref="PSR2">
        <exclude name="PSR1.Methods.CamelCapsMethodName" />
        <exclude name="PSR1.Files.SideEffects" />
    </rule>

    <rule ref="Generic.PHP.LowerCaseConstant" />
    <rule ref="Generic.Files.LineEndings" />
    <rule ref="Squiz.PHP.GlobalKeyword" />
    <rule ref="PSR2.Files.EndFileNewline" />
    <rule ref="Generic.WhiteSpace.DisallowTabIndent" />

</ruleset>
Comment

laravel phpcs.xml

<?xml version="1.0"?>
<ruleset name="Laravel Standards">

    <!--
       The name attribute of the ruleset tag is displayed
       when running PHP_CodeSniffer with the -v command line
       argument. The description tag below is not displayed anywhere
       except in this file, so it can contain information for
       developers who may change this file in the future.
    -->
    <description>The Laravel Coding Standards</description>

    <!--
    If no files or directories are specified on the command line
    your custom standard can specify what files should be checked
    instead.

    Note that specifying any file or directory path
    on the command line will ignore all file tags.
    -->
    <file>app</file>
    <file>config</file>
    <file>public</file>
    <file>resources</file>
    <file>routes</file>
    <file>tests</file>

    <!--
       You can hard-code ignore patterns directly into your
       custom standard so you don't have to specify the
       patterns on the command line.

    -->
    <exclude-pattern>*/database/*</exclude-pattern>
    <exclude-pattern>*/cache/*</exclude-pattern>
    <exclude-pattern>*/*.js</exclude-pattern>
    <exclude-pattern>*/*.css</exclude-pattern>
    <exclude-pattern>*/*.xml</exclude-pattern>
    <exclude-pattern>*/*.blade.php</exclude-pattern>
    <exclude-pattern>*/autoload.php</exclude-pattern>
    <exclude-pattern>*/storage/*</exclude-pattern>
    <exclude-pattern>*/docs/*</exclude-pattern>
    <exclude-pattern>*/vendor/*</exclude-pattern>
    <exclude-pattern>*/migrations/*</exclude-pattern>
    <exclude-pattern>./_ide_helper.php</exclude-pattern>

    <!--
       You can hard-code command line values into your custom standard.
       Note that this does not work for the command line values:
       -v[v][v], -l, -d, -sniffs and -standard

       The following tags are equivalent to the command line arguments:
       -p
    -->
    <arg name="report" value="summary"/>
    <arg name="colors"/>
    <arg value="p"/>

    <!--
       You can hard-code custom php.ini settings into your custom standard.
       The following tag sets the memory limit to 64M.
    -->
    <ini name="memory_limit" value="128M"/>

    <!--
       Include all sniffs in the PEAR standard. Note that the
       path to the standard does not have to be specified as the
       PEAR standard exists inside the PHP_CodeSniffer install
       directory.
    -->
    <rule ref="PSR2">
        <exclude name="PSR1.Methods.CamelCapsMethodName"/>
        <exclude name="PSR1.Files.SideEffects"/>
    </rule>

</ruleset>
Comment

PREVIOUS NEXT
Code Example
Html :: text limit in html 
Html :: jQuery script tag to include into HTML 
Html :: side by side tables in bootstrap 
Html :: iframe responsive 
Html :: twig check variables type 
Html :: tailwind css checkbox 
Html :: how to program a button to work in javascript 
Html :: input field in dropdown 
Html :: how to write python in html 
Html :: predefine data list in input tag html 
Html :: auto refresh 
Html :: disabled input fields vue 
Html :: check if javascript is enabled 
Html :: html input date validation 
Html :: html add a delay to link 
Html :: how to select all text when input box is clicked 
Html :: copyright html 
Html :: how to embed a website in another website 
Html :: best html coding software 
Html :: how add float input type in html 
Html :: check if select option is selected javascript 
Html :: html samp 
Html :: how to add jquery to shopify 
Html :: translate html text in magento 2 
Html :: input disable autocomplete 
Html :: html remove space after paragraph 
Html :: html target 
Html :: v-select key 
Html :: Resize the image in jupyter notebook 
Html :: tailwind css dropdown 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =