Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
GromNaN committed Dec 2, 2024
1 parent aac05d3 commit d48c01f
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 32 deletions.
1 change: 0 additions & 1 deletion api/config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle::class => ['all' => true],

];
2 changes: 1 addition & 1 deletion api/src/Controller/RestaurantController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function create(Request $request): JsonResponse
$restaurant->setAddress($data['address']);
$restaurant->setBorough($data['borough']);
$restaurant->setcuisine($data['cuisine']);

$this->restaurantRepository->save($restaurant);

return new JsonResponse(['status' => 'Restaurant created!'], JsonResponse::HTTP_CREATED);
Expand Down
66 changes: 36 additions & 30 deletions api/src/Document/Restaurant.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,52 +25,58 @@ class Restaurant

#[Field]
public string $cuisine;

public function __construct()
{}
{
}

public function getId(): string
{
return $this->id;
}
public function getName(): string
{
return $this->name;
}
public function getAddress(): string
{
return $this->address;
public function getId(): string
{
return $this->id;
}

}
public function getborough(): string
{
return $this->borough;
}
public function getcuisine(): string
{
return $this->cuisine;
public function getName(): string
{
return $this->name;
}

}
public function setId($id): void {
$this->id = $id;
}
public function setName(string $name): void
public function getAddress(): string
{
return $this->address;
}

public function getBorough(): string
{
return $this->borough;
}

public function getCuisine(): string
{
return $this->cuisine;
}

public function setId($id): void
{
$this->id = $id;
}

public function setName(string $name): void
{
$this->name = $name;
}

public function setAddress(string $address): void
{
$this->address = $address;
}

public function setborough(string $borough): void
public function setBorough(string $borough): void
{
$this->borough = $borough;
}
public function setcuisine(string $cuisine): void

public function setCuisine(string $cuisine): void
{
$this->cuisine = $cuisine;
}

}

0 comments on commit d48c01f

Please sign in to comment.