Skip to content

Apply fixes from StyleCI #144

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

Merged
merged 1 commit into from
May 2, 2023
Merged
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
52 changes: 27 additions & 25 deletions src/Builder/DatabaseBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class DatabaseBuilder

/**
* DatabaseBuilder constructor.
* @param Databases $databasesEndpoint
*
* @param Databases $databasesEndpoint
*/
public function __construct(private Databases $databasesEndpoint)
{
Expand All @@ -38,8 +39,8 @@ public function __construct(private Databases $databasesEndpoint)

/**
* Creates database within given page.
*
* @param string $pageId
*
* @param string $pageId
* @return Database
*/
public function createInPage($pageId): Database
Expand All @@ -58,8 +59,8 @@ public function createInPage($pageId): Database

/**
* Sets the title for the database creation.
*
* @param string $title
*
* @param string $title
* @return DatabaseBuilder
*/
public function title(string $title): DatabaseBuilder
Expand All @@ -77,8 +78,8 @@ public function title(string $title): DatabaseBuilder

/**
* Sets the description for the database creation.
*
* @param string $description
*
* @param string $description
* @return DatabaseBuilder
*/
public function description(string $description): DatabaseBuilder
Expand All @@ -96,8 +97,9 @@ public function description(string $description): DatabaseBuilder

/**
* Sets the created database as inline (currently not supported).
*
* @todo increase Notion API Version, to make this work
*
*
* @return DatabaseBuilder
*/
public function inline(): DatabaseBuilder
Expand All @@ -109,8 +111,8 @@ public function inline(): DatabaseBuilder

/**
* Sets the icon for the database creation.
*
* @param string $icon
*
* @param string $icon
* @return DatabaseBuilder
*/
public function iconEmoji(string $icon): DatabaseBuilder
Expand All @@ -125,8 +127,8 @@ public function iconEmoji(string $icon): DatabaseBuilder

/**
* Sets the icon for the database creation.
*
* @param string $url
*
* @param string $url
* @return DatabaseBuilder
*/
public function iconExternal(string $url): DatabaseBuilder
Expand All @@ -143,8 +145,8 @@ public function iconExternal(string $url): DatabaseBuilder

/**
* Sets the cover for the database creation.
*
* @param string $url
*
* @param string $url
* @return DatabaseBuilder
*/
public function coverExternal(string $url): DatabaseBuilder
Expand All @@ -161,8 +163,8 @@ public function coverExternal(string $url): DatabaseBuilder

/**
* Adds the property `title` database creation.
*
* @param string $name
*
* @param string $name
* @return DatabaseBuilder
*/
public function addTitle(string $name = 'Name')
Expand All @@ -174,8 +176,8 @@ public function addTitle(string $name = 'Name')

/**
* Adds one or multiple properties to the database creation.
*
* @param PropertyBuilder|Collection|DatabaseSchemeBuilder $properties
*
* @param PropertyBuilder|Collection|DatabaseSchemeBuilder $properties
* @return DatabaseBuilder
*/
public function add(PropertyBuilder|Collection|DatabaseSchemeBuilder $properties): DatabaseBuilder
Expand All @@ -197,8 +199,8 @@ public function add(PropertyBuilder|Collection|DatabaseSchemeBuilder $properties

/**
* Adds multiple properties to the database creation, similar to a Laravel migration.
*
* @param callable $callback
*
* @param callable $callback
* @return DatabaseBuilder
*/
public function scheme(callable $callback): DatabaseBuilder
Expand All @@ -211,10 +213,10 @@ public function scheme(callable $callback): DatabaseBuilder

/**
* Adds a raw property to the database creation.
*
* @param string $title
* @param string $propertyType
* @param array|null $content
*
* @param string $title
* @param string $propertyType
* @param array|null $content
* @return DatabaseBuilder
*/
public function addRaw(string $title, string $propertyType, array $content = null): DatabaseBuilder
Expand All @@ -227,7 +229,7 @@ public function addRaw(string $title, string $propertyType, array $content = nul

/**
* Returns the payload for the database creation.
*
*
* @return array
*/
public function payload(): array
Expand Down
Loading