Skip to content

Commit

Permalink
Update annotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Mar 17, 2024
1 parent d4ee56e commit 745ae9e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions plugins/Sandbox/src/Controller/CakeExamplesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,12 @@ public function enums() {
* @return \Cake\Http\Response|null|void
*/
public function enumValidation() {
/** @var \Sandbox\Model\Table\SandboxUsersTable $table */
$table = $this->fetchTable('Sandbox.SandboxUsers');
$table->getValidator()->add('status', 'validEnum', [
'rule' => ['enumOnly', [UserStatus::Active, UserStatus::Inactive]],
'message' => 'Invalid enum value.',
]);

/** @var \Sandbox\Model\Table\SandboxUsersTable $user */
$user = $table->newEmptyEntity();

if ($this->request->is(['post', 'put'])) {
Expand Down

0 comments on commit 745ae9e

Please sign in to comment.