eugene-matvejev/battleship-game-api

View on GitHub

Showing 153 of 153 total issues

Line exceeds 120 characters; contains 140 characters
Open

            && $this->validatePlayerName($data->playerName) // will be replaced by Authorization header which will reflect Player.id content

Line exceeds 120 characters; contains 137 characters
Open

                    $this->assertContains((string)$cell->flags, [CellModel::FLAG_NONE, CellModel::FLAG_SHIP, CellModel::FLAG_DEAD_SHIP]);

Line exceeds 120 characters; contains 129 characters
Open

                $expected = $battlefield->player->flags == PlayerModel::FLAG_AI_CONTROLLED ? CellModel::FLAG_NONE : $cell->flags;

Line exceeds 120 characters; contains 121 characters
Open

            throw new HttpException(Response::HTTP_BAD_REQUEST, 'request validation failed, please check documentation');

Line exceeds 120 characters; contains 139 characters
Open

            foreach ($processor->reset($cell->getCoordinate())->getAdjacentCells($battlefield, 1, 0, CellModel::FLAG_SHIP) as $waterCell) {

Line exceeds 120 characters; contains 166 characters
Open

            /** if path is HORIZONTAL, strategy should be HORIZONTAL otherwise VERTICAL @see AIStrategyService::$strategyMap contains only UP|DOWN|LEFT|RIGHT paths */

Line exceeds 120 characters; contains 126 characters
Open

        return $this->prepareSerializedResponse(new GameInitiationResponse($game->getBattlefields()), Response::HTTP_CREATED);

Line exceeds 120 characters; contains 160 characters
Open

    public function getAdjacentCells(string $initCoordinate, array $expectedCoordinates, Battlefield $battlefield, int $levels, int $onlyFlag, int $excludeFlag)

Line exceeds 120 characters; contains 137 characters
Open

     * @ORM\OneToMany(targetEntity="EM\GameBundle\Entity\Battlefield", mappedBy="game", cascade={"persist"}, fetch="EAGER", indexBy="id")

Line exceeds 120 characters; contains 128 characters
Open

        $game = $this->get('em.game_bundle.service.game_builder')->buildGame(new GameInitiationRequest($request->getContent()));

The method successfulInitAction_XML is not named in camelCase.
Open

    public function successfulInitAction_XML()
    {
        $client = static::$client;
        $client->request(
            Request::METHOD_POST,

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method successfulInitAction_JSON is not named in camelCase.
Open

    public function successfulInitAction_JSON()
    {
        $client = static::$client;
        $client->request(
            Request::METHOD_POST,

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method AdjacentCellsProvider is not named in camelCase.
Open

    public function AdjacentCellsProvider() : array
    {

        $battlefield = MockFactory::getBattlefieldMock();
        $battlefield->getCellByCoordinate('A2')->setFlags(CellModel::FLAG_DEAD);

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

Severity
Category
Status
Source
Language