Code Monkey home page Code Monkey logo

venus's Introduction

Logo

Valid a set of urls ๐ŸŒŒ

PHP

Dependencies

  • Docker ๐Ÿณ

Install

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

Run

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
)
*/

Bonus

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 

venus's People

Contributors

thiiagoms avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.