1 | <?php |
||
26 | class LeagueController extends Controller |
||
27 | { |
||
28 | /** |
||
29 | * @SWG\Get( |
||
30 | * tags={"League"}, |
||
31 | * path="/api/v1/leagues", |
||
32 | * description="Returns all leagues from the database", |
||
33 | * operationId="catalogue", |
||
34 | * produces={"application/json"}, |
||
35 | * @SWG\Response( |
||
36 | * response="200", |
||
37 | * description="Successfully get list of leagues" |
||
38 | * ) |
||
39 | * ) |
||
40 | */ |
||
41 | public function catalogue() |
||
45 | |||
46 | /** |
||
47 | * @SWG\Post( |
||
48 | * tags={"League"}, |
||
49 | * path="/api/v1/leagues", |
||
50 | * description="Add new league to database", |
||
51 | * operationId="store", |
||
52 | * produces={"application/json"}, |
||
53 | * @SWG\Parameter( |
||
54 | * description="League name", |
||
55 | * in="formData", |
||
56 | * name="league[name]", |
||
57 | * required=true, |
||
58 | * type="string" |
||
59 | * ), |
||
60 | * @SWG\Parameter( |
||
61 | * description="Path to league logo", |
||
62 | * in="formData", |
||
63 | * name="league[logoPath]", |
||
64 | * required=false, |
||
65 | * type="file" |
||
66 | * ), |
||
67 | * @SWG\Response( |
||
68 | * response="200", |
||
69 | * description="Successfully add new league" |
||
70 | * ) |
||
71 | * ) |
||
72 | * @param CreateLeague $request |
||
73 | * @return array |
||
74 | */ |
||
75 | public function store(CreateLeague $request) |
||
82 | |||
83 | /** |
||
84 | * @SWG\Get( |
||
85 | * tags={"League"}, |
||
86 | * path="/api/v1/leagueTeams", |
||
87 | * description="Returns all teams from the specified league", |
||
88 | * operationId="teams", |
||
89 | * produces={"application/json"}, |
||
90 | * @SWG\Parameter( |
||
91 | * description="ID of league which teams we need", |
||
92 | * in="query", |
||
93 | * name="leagueId", |
||
94 | * required=true, |
||
95 | * type="integer" |
||
96 | * ), |
||
97 | * @SWG\Response( |
||
98 | * response="200", |
||
99 | * description="Successfully get list of leagues" |
||
100 | * ) |
||
101 | * ) |
||
102 | */ |
||
103 | public function teams() |
||
109 | } |
||
110 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.