src/storage/storage/BricksStorage.php
public function addBrick($postValues)
    {
        $brickObject = BrickFactory::createBrickFromPostValues($postValues);

        $bricks = $this->repository->bricks;
        $bricks[] = $brickObject;
        $this->repository->bricks = $bricks;

        $this->save();
    }
public function addBrick($postValues)
    {
        $brickObject = BrickFactory::createBrickFromPostValues($postValues);

        $bricks = $this->repository->bricks;
        $bricks[] = $brickObject;
        $this->repository->bricks = $bricks;

        $this->save();
    }
public function addBrick ( $ postValues ) { $ brickObject = BrickFactory :: createBrickFromPostValues ( $ postValues ) ; $ bricks = $ this -> repository -> bricks ; $ bricks [ ] = $ brickObject ; $ this -> repository -> bricks = $ bricks ; $ this -> save ( ) ; }
Add a brick

@param $postValues

@throws \Exception
Add a brick