rafaelmonteiro/pokemon-battle-lumen

View on GitHub

Showing 3 of 3 total issues

Method hit has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function hit(Request $request)
    {
        $this->validate($request, [
            'player.name' => 'required',
            'player.attack' => 'required',
Severity: Minor
Found in app/Http/Controllers/PokemonController.php - About 1 hr to fix

    Method __construct has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public function __construct($name, $type, $avatar, $health, $agility, $attack, $defense, $attacks)
    Severity: Major
    Found in app/Pokemon.php - About 1 hr to fix

      Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function __construct($name, $power, $type, $accuracy, Pokemon $pokemon)
      Severity: Minor
      Found in app/Attack.php - About 35 mins to fix
        Severity
        Category
        Status
        Source
        Language