Skip to content

Commit

Permalink
move CIScripts to AnalyzerTool
Browse files Browse the repository at this point in the history
  • Loading branch information
Oscar Cabrera committed Aug 6, 2024
1 parent 56f9e50 commit f50c812
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 33 deletions.
2 changes: 1 addition & 1 deletion ci-scripts/Analyzer/Analyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Oscabrera\ModelRepository\CIScripts\Analyzer;
namespace Oscabrera\AnalyzerTool\CIScripts\Analyzer;

use Exception;
use RuntimeException;
Expand Down
6 changes: 3 additions & 3 deletions ci-scripts/Analyzer/AnalyzerSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

declare(strict_types=1);

namespace Oscabrera\ModelRepository\CIScripts\Analyzer;
namespace Oscabrera\AnalyzerTool\CIScripts\Analyzer;

use Exception;
use Oscabrera\ModelRepository\CIScripts\Analyzer\Constants\Color;
use Oscabrera\ModelRepository\CIScripts\Analyzer\Constants\Icon;
use Oscabrera\AnalyzerTool\CIScripts\Analyzer\Constants\Color;
use Oscabrera\AnalyzerTool\CIScripts\Analyzer\Constants\Icon;
use RuntimeException;

/**
Expand Down
2 changes: 1 addition & 1 deletion ci-scripts/Analyzer/ArgumentHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Oscabrera\ModelRepository\CIScripts\Analyzer;
namespace Oscabrera\AnalyzerTool\CIScripts\Analyzer;

class ArgumentHandler
{
Expand Down
2 changes: 1 addition & 1 deletion ci-scripts/Analyzer/CommandBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Oscabrera\ModelRepository\CIScripts\Analyzer;
namespace Oscabrera\AnalyzerTool\CIScripts\Analyzer;

class CommandBuilder
{
Expand Down
2 changes: 1 addition & 1 deletion ci-scripts/Analyzer/Constants/Color.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Oscabrera\ModelRepository\CIScripts\Analyzer\Constants;
namespace Oscabrera\AnalyzerTool\CIScripts\Analyzer\Constants;

class Color
{
Expand Down
2 changes: 1 addition & 1 deletion ci-scripts/Analyzer/Constants/Icon.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Oscabrera\ModelRepository\CIScripts\Analyzer\Constants;
namespace Oscabrera\AnalyzerTool\CIScripts\Analyzer\Constants;

class Icon
{
Expand Down
2 changes: 1 addition & 1 deletion ci-scripts/Analyzer/FileHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Oscabrera\ModelRepository\CIScripts\Analyzer;
namespace Oscabrera\AnalyzerTool\CIScripts\Analyzer;

use RuntimeException;

Expand Down
8 changes: 3 additions & 5 deletions ci-scripts/PhpMD/PhpMDAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Oscabrera\ModelRepository\CIScripts\PhpMD;
namespace Oscabrera\AnalyzerTool\CIScripts\PhpMD;

use Oscabrera\ModelRepository\CIScripts\Analyzer\Analyzer;
use Oscabrera\AnalyzerTool\CIScripts\Analyzer\Analyzer;

class PhpMDAnalyzer extends Analyzer
{
Expand All @@ -18,9 +18,7 @@ public function __construct(array $args)
parent::__construct(
'PHP Mess Detector',
<<<CMD
./vendor/bin/phpmd %FILES% ansi \\
cleancode,codesize,controversial,design,unusedcode \\
--exclude *vendor
./vendor/bin/phpmd %FILES% ansi cleancode,codesize,controversial,design,unusedcode --exclude *vendors
CMD,
$args
);
Expand Down
4 changes: 2 additions & 2 deletions ci-scripts/PhpMD/run.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

namespace Oscabrera\ModelRepository\CIScripts;
namespace Oscabrera\AnalyzerTool\CIScripts;

require_once __DIR__ . '/../../vendor/autoload.php';

use Oscabrera\ModelRepository\CIScripts\PhpMD\PhpMDAnalyzer as Analyzer;
use Oscabrera\AnalyzerTool\CIScripts\PhpMD\PhpMDAnalyzer as Analyzer;

exit((new Analyzer(array_slice($_SERVER['argv'], 1)))->analyze() ? 0 : 1);
9 changes: 3 additions & 6 deletions ci-scripts/PhpStan/PhpStanAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Oscabrera\ModelRepository\CIScripts\PhpStan;
namespace Oscabrera\AnalyzerTool\CIScripts\PhpStan;

use Oscabrera\ModelRepository\CIScripts\Analyzer\Analyzer;
use Oscabrera\AnalyzerTool\CIScripts\Analyzer\Analyzer;

class PhpStanAnalyzer extends Analyzer
{
Expand All @@ -17,10 +17,7 @@ public function __construct(array $args)
parent::__construct(
'PHPStan',
<<<CMD
./vendor/bin/phpstan analyse \\
--memory-limit=1G \\
-c ci-scripts/PhpStan/phpstan.neon \\
--ansi %FILES%
./vendor/bin/phpstan analyse --memory-limit=1G -c ci-scripts/PhpStan/phpstan.neon --ansi %FILES%
CMD,
$args
);
Expand Down
4 changes: 2 additions & 2 deletions ci-scripts/PhpStan/run.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

namespace Oscabrera\ModelRepository\CIScripts;
namespace Oscabrera\AnalyzerTool\CIScripts;

require_once __DIR__ . '/../../vendor/autoload.php';

use Oscabrera\ModelRepository\CIScripts\PhpStan\PhpStanAnalyzer as Analyzer;
use Oscabrera\AnalyzerTool\CIScripts\PhpStan\PhpStanAnalyzer as Analyzer;

exit((new Analyzer(array_slice($_SERVER['argv'], 1)))->analyze() ? 0 : 1);
8 changes: 3 additions & 5 deletions ci-scripts/Pint/PintAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Oscabrera\ModelRepository\CIScripts\Pint;
namespace Oscabrera\AnalyzerTool\CIScripts\Pint;

use Oscabrera\ModelRepository\CIScripts\Analyzer\Analyzer;
use Oscabrera\AnalyzerTool\CIScripts\Analyzer\Analyzer;

class PintAnalyzer extends Analyzer
{
Expand All @@ -17,9 +17,7 @@ public function __construct(array $args)
parent::__construct(
'Pint',
<<<CMD
./vendor/bin/pint --test --config \\
ci-scripts/Pint/pint.json \\
--ansi %FILES%
./vendor/bin/pint --test --config ci-scripts/Pint/pint.json --ansi %FILES%
CMD,
$args
);
Expand Down
4 changes: 2 additions & 2 deletions ci-scripts/Pint/run.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

namespace Oscabrera\ModelRepository\CIScripts;
namespace Oscabrera\AnalyzerTool\CIScripts;

require_once __DIR__ . '/../../vendor/autoload.php';

use Oscabrera\ModelRepository\CIScripts\Pint\PintAnalyzer as Analyzer;
use Oscabrera\AnalyzerTool\CIScripts\Pint\PintAnalyzer as Analyzer;

exit((new Analyzer(array_slice($_SERVER['argv'], 1)))->analyze() ? 0 : 1);
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"autoload": {
"psr-4": {
"Oscabrera\\ModelRepository\\": "src/",
"Oscabrera\\ModelRepository\\CIScripts\\": "ci-scripts/"
"Oscabrera\\AnalyzerTool\\CIScripts\\": "ci-scripts/"
}
},
"require": {
Expand Down Expand Up @@ -50,7 +50,6 @@
"phpstan": "php ci-scripts/PhpStan/run.php",
"pint": "php ci-scripts/Pint/run.php",
"phpmd": "php ci-scripts/PhpMD/run.php"

},
"config": {
"allow-plugins": {
Expand Down

0 comments on commit f50c812

Please sign in to comment.