- Docker 🐳
01 -) Clone:
$ git clone https://github.com/thiiagoms/venus
02 -) Change to venus
directory:
$ cd venus
venus $
03 -) Stand up containers and Install dependencies with composer
package manager:
venus $ docker-compose up -d
venus $ docker-compose exec venus composer install
01 -) You can execute the example.php
about how to work with venus
:
venus $ docker exec venus php example.php
<?php
declare(strict_types=1);
require_once __DIR__ . '/bootstrap.php';
$urls = [
'https://google.com',
'https://www.exampleurlthatdoesnotexist.com',
'https://github.com'
];
/** @var \Venus\Venus $app */
$app->scan($urls);
echo '[*] valid urls' . PHP_EOL;
print_r($app->getValidUrls());
/**
Array
(
[0] => https://google.com
[1] => https://github.com
)
*/
echo '[*] invalid urls' . PHP_EOL;
print_r($app->getInvalidUrls());
/**
Array
(
[0] => https://www.exampleurlthatdoesnotexist.com
)
*/
01 -) Run tests:
venus $ docker exec venus composer tests
02 -) Run lint and run lint finx:
venus $ docker exec venus composer phpcs src
venus $ docker exec venus composer phpcbf src
03 -) Run phpstan
(default with level 9) for code analyze:
venus $ docker exec venus composer phpstan