Skip to content

Commit

Permalink
Dont return method call on void.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark authored Nov 19, 2024
1 parent a3a27b1 commit 7801045
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions en/orm/database-basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -476,12 +476,14 @@ Enum Type
Maps a `BackedEnum <https://www.php.net/manual/en/language.enumerations.backed.php>`_ to a string or integer column.
To use this type you need to specify which column is associated to which BackedEnum inside the table class::

use \Cake\Database\Type\EnumType;
use \App\Model\Enum\ArticleStatus;
use App\Model\Enum\ArticleStatus;
use Cake\Database\Type\EnumType;

// in src/Model/Table/ArticlesTable.php
public function initialize(array $config): void
{
parent::initialize($config);

$this->getSchema()->setColumnType('status', EnumType::from(ArticleStatus::class));
}

Expand Down Expand Up @@ -608,7 +610,7 @@ following::
{
parent::initialize($config);

return $this->getSchema()->setColumnType('widget_prefs', 'json');
$this->getSchema()->setColumnType('widget_prefs', 'json');
}
}

Expand Down

0 comments on commit 7801045

Please sign in to comment.