first commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace KupShop\GraphQLBundle\Inspections\Compile;
|
||||
|
||||
use KupShop\SystemInspectionBundle\Inspections\Compile\CompileInspectionInterface;
|
||||
use KupShop\SystemInspectionBundle\Inspections\Inspection;
|
||||
use KupShop\SystemInspectionBundle\InspectionWriters\MessageTypes\SimpleMessage;
|
||||
|
||||
class GraphQLInspection extends Inspection implements CompileInspectionInterface
|
||||
{
|
||||
public function runInspection(): ?array
|
||||
{
|
||||
$errors = [];
|
||||
|
||||
$composer = json_decode(file_get_contents('composer.json'));
|
||||
|
||||
if (!isset($composer->autoload->{'psr-4'}->{'KupShop\\'})) {
|
||||
$errors[] = new SimpleMessage('Upravte v composer.json hodnotu "autoload.psr-4" na:
|
||||
"psr-4": {
|
||||
"Shop\\\\": ["bundles"],
|
||||
"KupShop\\\\": ["../engine/bundles/KupShop"]
|
||||
}');
|
||||
}
|
||||
|
||||
return $errors;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user