Skip to content
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

Apply fixes from StyleCI #157

Merged
merged 1 commit into from
Jun 16, 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
4 changes: 2 additions & 2 deletions src/Console/Commands/MakeNotionModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ public function handle()
$propertyTitleMap .= " '$propName' => '{$propertyInfo->getTitle()}',\n";
}

$contents = "<?php
$contents = '<?php


";
';
File::ensureDirectoryExists('app/NotionModels');

File::put("app/NotionModels/$databaseName.php", $contents);
Expand Down
2 changes: 1 addition & 1 deletion src/Endpoints/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function getPostData(): array
}

/**
* @param $filter
* @param $filter
* @return Database $this
*
* @throws HandlingException
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Blocks/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function setRawContent($rawContent)
}

/**
* @param $rawContent
* @param $rawContent
* @return Block
*
* @throws HandlingException
Expand Down
60 changes: 30 additions & 30 deletions src/Entities/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ private function fillPageUrl(): void
}

/**
* @param $propertyTitle
* @param $property
* @param $propertyTitle
* @param $property
* @return Page
*/
public function set(string $propertyKey, Property $property): Page
Expand All @@ -204,8 +204,8 @@ public function set(string $propertyKey, Property $property): Page
}

/**
* @param $propertyTitle
* @param $number
* @param $propertyTitle
* @param $number
* @return Page
*/
public function setNumber(string $propertyTitle, float $number): Page
Expand All @@ -216,8 +216,8 @@ public function setNumber(string $propertyTitle, float $number): Page
}

/**
* @param $propertyTitle
* @param $text
* @param $propertyTitle
* @param $text
* @return Page
*/
public function setTitle(string $propertyTitle, string $text): Page
Expand All @@ -228,8 +228,8 @@ public function setTitle(string $propertyTitle, string $text): Page
}

/**
* @param $propertyTitle
* @param $text
* @param $propertyTitle
* @param $text
* @return Page
*/
public function setText(string $propertyTitle, string $text): Page
Expand All @@ -240,8 +240,8 @@ public function setText(string $propertyTitle, string $text): Page
}

/**
* @param $propertyTitle
* @param $name
* @param $propertyTitle
* @param $name
* @return Page
*/
public function setSelect(string $propertyTitle, string $name): Page
Expand All @@ -252,8 +252,8 @@ public function setSelect(string $propertyTitle, string $name): Page
}

/**
* @param $propertyTitle
* @param $url
* @param $propertyTitle
* @param $url
* @return Page
*/
public function setUrl(string $propertyTitle, string $url): Page
Expand All @@ -264,8 +264,8 @@ public function setUrl(string $propertyTitle, string $url): Page
}

/**
* @param $propertyTitle
* @param $phoneNumber
* @param $propertyTitle
* @param $phoneNumber
* @return Page
*/
public function setPhoneNumber(string $propertyTitle, string $phoneNumber): Page
Expand All @@ -276,8 +276,8 @@ public function setPhoneNumber(string $propertyTitle, string $phoneNumber): Page
}

/**
* @param $propertyTitle
* @param $email
* @param $propertyTitle
* @param $email
* @return Page
*/
public function setEmail(string $propertyTitle, string $email): Page
Expand All @@ -288,8 +288,8 @@ public function setEmail(string $propertyTitle, string $email): Page
}

/**
* @param $propertyTitle
* @param $names
* @param $propertyTitle
* @param $names
* @return Page
*/
public function setMultiSelect(string $propertyTitle, array $names): Page
Expand All @@ -300,8 +300,8 @@ public function setMultiSelect(string $propertyTitle, array $names): Page
}

/**
* @param $propertyTitle
* @param $checked
* @param $propertyTitle
* @param $checked
* @return Page
*/
public function setCheckbox(string $propertyTitle, bool $checked): Page
Expand All @@ -312,9 +312,9 @@ public function setCheckbox(string $propertyTitle, bool $checked): Page
}

/**
* @param $propertyTitle
* @param $start
* @param $end
* @param $propertyTitle
* @param $start
* @param $end
* @return Page
*/
public function setDate(string $propertyTitle, DateTime $start, ?DateTime $end = null): Page
Expand All @@ -325,9 +325,9 @@ public function setDate(string $propertyTitle, DateTime $start, ?DateTime $end =
}

/**
* @param $propertyTitle
* @param $start
* @param $end
* @param $propertyTitle
* @param $start
* @param $end
* @return Page
*/
public function setDateTime(string $propertyTitle, DateTime $start, ?DateTime $end = null): Page
Expand All @@ -338,8 +338,8 @@ public function setDateTime(string $propertyTitle, DateTime $start, ?DateTime $e
}

/**
* @param $propertyTitle
* @param $relationIds
* @param $propertyTitle
* @param $relationIds
* @return Page
*/
public function setRelation(string $propertyTitle, array $relationIds): Page
Expand All @@ -350,8 +350,8 @@ public function setRelation(string $propertyTitle, array $relationIds): Page
}

/**
* @param $propertyTitle
* @param $userIds
* @param $propertyTitle
* @param $userIds
* @return Page
*/
public function setPeople(string $propertyTitle, array $userIds): Page
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Properties/Checkbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class Checkbox extends Property implements Modifiable
{
/**
* @param $checked
* @param $checked
* @return Checkbox
*/
public static function value(bool $checked): Checkbox
Expand Down
8 changes: 4 additions & 4 deletions src/Entities/Properties/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
class Date extends Property implements Modifiable
{
/**
* @param $start
* @param $end
* @param $start
* @param $end
* @return Date
*/
public static function value(?DateTime $start, ?DateTime $end = null): Date
Expand Down Expand Up @@ -46,8 +46,8 @@ public static function value(?DateTime $start, ?DateTime $end = null): Date
}

/**
* @param $start
* @param $end
* @param $start
* @param $end
* @return Date
*/
public static function valueWithTime(?DateTime $start, ?DateTime $end = null): Date
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Properties/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class Email extends Property implements Modifiable
{
/**
* @param $email
* @param $email
* @return Email
*/
public static function value(string $email): Email
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Properties/MultiSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class MultiSelect extends Property implements Modifiable
private Collection $options;

/**
* @param $names
* @param $names
* @return MultiSelect
*/
public static function value(array $names): MultiSelect
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Properties/People.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class People extends Property implements Modifiable
{
/**
* @param $userIds
* @param $userIds
* @return People
*/
public static function value(array $userIds): People
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Properties/PhoneNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class PhoneNumber extends Property implements Modifiable
{
/**
* @param $phoneNumber
* @param $phoneNumber
* @return PhoneNumber
*/
public static function value(string $phoneNumber): PhoneNumber
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Properties/Property.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public function getContent()

/**
* @param string $propertyKey
* @param $rawContent
* @param $rawContent
* @return Property
*
* @throws HandlingException
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Properties/Relation.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class Relation extends Property implements Modifiable
{
/**
* @param $relationIds
* @param $relationIds
* @return Relation
*/
public static function value(array $relationIds): Relation
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Properties/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Select extends Property implements Modifiable
private Collection $options;

/**
* @param $name
* @param $name
* @return Select
*/
public static function value(string $name): Select
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Properties/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Text extends Property implements Modifiable
protected string $plainText = '';

/**
* @param $text
* @param $text
* @return Text
*/
public static function value($text): Text
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Properties/Title.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Title extends Property implements Modifiable
protected string $plainText = '';

/**
* @param $text
* @param $text
* @return Title
*/
public static function value($text): Title
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Properties/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class Url extends Property implements Modifiable
{
/**
* @param $url
* @param $url
* @return Url
*/
public static function value(string $url): Url
Expand Down
4 changes: 2 additions & 2 deletions src/Entities/PropertyItems/SelectItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ public function getName(): string
}

/**
* @param $color
* @param $color
*/
public function setColor($color): void
{
$this->color = $color;
}

/**
* @param $name
* @param $name
*/
public function setName($name): void
{
Expand Down
6 changes: 3 additions & 3 deletions src/Query/Filters/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __construct(
*
* @param string $property
* @param string $comparisonOperator
* @param $value
* @param $value
* @return Filter
*/
public static function textFilter(string $property, string $comparisonOperator, string $value): Filter
Expand Down Expand Up @@ -160,8 +160,8 @@ public static function filterQuery(Collection $filter): array
/**
* Checks if the given comparison operator is valid for the given filter type.
*
* @param $filterType
* @param $operator
* @param $filterType
* @param $operator
*
* @throws HandlingException
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/EndpointBlocksTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public function classProvider(): array
*
* @dataProvider classProvider
*
* @param $entityClass
* @param $entityClass
*/
public function it_throws_an_handling_exception_for_wrong_type($entityClass)
{
Expand Down