Skip to content

Commit 381d5a6

Browse files
author
Jérôme Deuchnord
committed
Fix code style
1 parent 5a510e1 commit 381d5a6

File tree

1 file changed

+30
-25
lines changed

1 file changed

+30
-25
lines changed

core/operations.md

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -971,8 +971,8 @@ namespace App\Entity;
971971
use Doctrine\ORM\Mapping as ORM;
972972
973973
/**
974-
* @ORM\Entity
975-
*/
974+
* @ORM\Entity
975+
*/
976976
class Place
977977
{
978978
/**
@@ -1041,24 +1041,25 @@ Because we want to get the weather for a known place, it is more reasonable to q
10411041
10421042
namespace App\Entity;
10431043
1044+
use ApiPlatform\Core\Annotation\ApiResource;
10441045
use App\Controller\GetWeather;
10451046
use Doctrine\ORM\Mapping as ORM;
10461047
10471048
/**
1048-
* @ORM\Entity
1049-
*
1050-
* @ApiResource(
1051-
* itemOperations={
1052-
* "get",
1053-
* "put",
1054-
* "delete",
1055-
* "get_weather": {
1056-
* "method": "GET",
1057-
* "path": "/places/{id}/weather",
1058-
* "controller": GetWeather::class
1059-
* }
1060-
* }, collectionOperations={"get", "post"})
1061-
*/
1049+
* @ORM\Entity
1050+
*
1051+
* @ApiResource(
1052+
* itemOperations={
1053+
* "get",
1054+
* "put",
1055+
* "delete",
1056+
* "get_weather": {
1057+
* "method": "GET",
1058+
* "path": "/places/{id}/weather",
1059+
* "controller": GetWeather::class
1060+
* }
1061+
* }, collectionOperations={"get", "post"})
1062+
*/
10621063
class Place
10631064
{
10641065
// ...
@@ -1074,9 +1075,11 @@ This implies that API Platform has to know about this entity, so we will need to
10741075
10751076
namespace App\Entity;
10761077
1078+
use ApiPlatform\Core\Annotation\ApiResource;
1079+
10771080
/**
1078-
* @ApiResource
1079-
*/
1081+
* @ApiResource
1082+
*/
10801083
class Weather
10811084
{
10821085
// ...
@@ -1092,14 +1095,16 @@ Since we are required to expose at least one route, let's expose just one and di
10921095
10931096
namespace App\Entity;
10941097
1098+
use ApiPlatform\Core\Annotation\ApiResource;
1099+
10951100
/**
1096-
* @ApiResource(itemOperations={
1097-
* "get": {
1098-
* "method": "GET",
1099-
* "controller": SomeRandomController::class
1100-
* }
1101-
* })
1102-
*/
1101+
* @ApiResource(itemOperations={
1102+
* "get": {
1103+
* "method": "GET",
1104+
* "controller": SomeRandomController::class
1105+
* }
1106+
* })
1107+
*/
11031108
class Weather
11041109
{
11051110
// ...

0 commit comments

Comments
 (0)