$excluded_folders = [
'bootstrap',
'config',
'database',
'node_modules',
'public',
'resources',
'storage',
'vendor'
<?xml version="1.0"?>
<ruleset name="Laravel Standards">
<description>The Laravel Coding Standards</description>
<rule ref="Generic.Classes.DuplicateClassName"/>
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/>
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
{
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
"phpunit.php": "C:\\xampp\\php\\php.exe",
"phpunit.phpunit": "C:/xampp/htdocs/talentsuite/htdocs/vendor/phpunit/phpunit/phpunit",
"phpunit.args": [
"--configuration", "C:\\xampp\\htdocs\\talentsuite\\htdocs\\phpunit.xml",
"--testdox"
]
}
Click Start > All Programs > Accessories > Notepad. Click File > Open. (Open as administrator) In the File name field, type C:\Windows\System32\Drivers\etc\hosts. Click Open. Make the necessary changes to the file. Click File > Save to save your changes.
After that, put on this code below:
127.0.0.1 .
Open the cmd (Ctrl + Alt + T) and do the following command
sudo nano /etc/hosts
and add
127.0.0.1 .
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->name('*.php')
->notName('_ide_helper.php')
->notName('*.blade.php')
->notPath('bootstrap')
->notPath('node_modules')
->notPath('storage')
Sometimes can occoured an error just like this:
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required 'C:\xampp\htdocs\NC World\ProjectName\server.php'
(include_path='C:\xampp\php\PEAR') in Unknown on line 0
To fix this, must create a file called index.php and put on public/ dir
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="pcsg-generated-ruleset"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>
My custom rule set that checks my code...
</description>
//AppServiceProvider
$this->app->singleton('FooBar', function ($app) {
return $app;
});
//Anywhere
$this->app->instance('FooBar', ['name' => 'Maikon', 'age' => 15]);
$arr1 = [
1 => [
'mes' => null,
'valor' => null,
'consumo' => null,
],
2 => [