Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix coding style #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}

}