Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndr-w authored and github-actions[bot] committed Dec 16, 2023
1 parent 805d742 commit f3a3971
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 27 deletions.
42 changes: 21 additions & 21 deletions lib/neues_author.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Klasse neues_author
* Klasse neues_author.
*
* Diese Klasse repräsentiert einen Autor in der News-Verwaltung.
* Sie erbt von der rex_yform_manager_dataset Klasse.
Expand Down Expand Up @@ -30,9 +30,9 @@ class neues_author extends \rex_yform_manager_dataset
*
* @api
*/
public function getName() : ?string
public function getName(): ?string
{
return $this->getValue("name");
return $this->getValue('name');
}

/**
Expand All @@ -47,9 +47,9 @@ public function getName() : ?string
*
* @api
*/
public function setName(string $value) : self
public function setName(string $value): self
{
$this->setValue("name", $value);
$this->setValue('name', $value);
return $this;
}

Expand All @@ -65,9 +65,9 @@ public function setName(string $value) : self
*
* @api
*/
public function getNickname() : ?string
public function getNickname(): ?string
{
return $this->getValue("nickname");
return $this->getValue('nickname');
}

/**
Expand All @@ -82,9 +82,9 @@ public function getNickname() : ?string
*
* @api
*/
public function setNickname(string $value) : self
public function setNickname(string $value): self
{
$this->setValue("nickname", $value);
$this->setValue('nickname', $value);
return $this;
}

Expand All @@ -101,14 +101,14 @@ public function setNickname(string $value) : self
*
* @api
*/
public function getText(bool $asPlaintext = false) : ?string
public function getText(bool $asPlaintext = false): ?string
{
if($asPlaintext) {
return strip_tags($this->getValue("text"));
if ($asPlaintext) {
return strip_tags($this->getValue('text'));
}
return $this->getValue("text");
return $this->getValue('text');
}

/**
* Setzt den Text des Autors.
* Sets the text of the author.
Expand All @@ -121,9 +121,9 @@ public function getText(bool $asPlaintext = false) : ?string
*
* @api
*/
public function setText(string $value) : self
public function setText(string $value): self
{
$this->setValue("text", $value);
$this->setValue('text', $value);
return $this;
}

Expand All @@ -139,9 +139,9 @@ public function setText(string $value) : self
*
* @api
*/
public function getBeUserId() : ?int
public function getBeUserId(): ?int
{
return $this->getValue("be_user_id");
return $this->getValue('be_user_id');
}

/**
Expand All @@ -156,9 +156,9 @@ public function getBeUserId() : ?int
*
* @api
*/
public function setBeUserId(int $value) : self
public function setBeUserId(int $value): self
{
$this->setValue("be_user_id", $value);
$this->setValue('be_user_id', $value);
return $this;
}

Expand All @@ -171,7 +171,7 @@ public function setBeUserId(int $value) : self
* Beispiel / Example:
* $beUser = $author->getBeUser();
*/
public function getBeUser() : ?rex_user
public function getBeUser(): ?rex_user
{
return rex_user::get($this->getBeUserId());
}
Expand Down
5 changes: 4 additions & 1 deletion lib/neues_category.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Klasse neues_category
* Klasse neues_category.
*
* Diese Klasse repräsentiert eine Kategorie in der News-Verwaltung.
* Sie erbt von der rex_yform_manager_dataset Klasse.
Expand Down Expand Up @@ -31,6 +31,7 @@ public function getName(): string
{
return $this->getValue('name');
}

/**
* Setzt den Namen der Kategorie.
* Sets the name of the category.
Expand All @@ -45,6 +46,7 @@ public function setName(string $name): self
$this->setValue('name', $name);
return $this;
}

/**
* Gibt die Einträge der Kategorie zurück.
* Returns the entries of the category.
Expand All @@ -60,6 +62,7 @@ public function getEntries(): ?rex_yform_manager_collection
{
return $this->getRelatedDataset('entry_ids');
}

/**
* Gibt die URL der Kategorie zurück.
* Returns the URL of the category.
Expand Down
12 changes: 7 additions & 5 deletions lib/neues_entry.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Class neues_entry
* Class neues_entry.
*
* Diese Klasse repräsentiert einen neuen Eintrag.
* This class represents a new entry.
Expand Down Expand Up @@ -32,6 +32,7 @@ public function setName(string $name): self
$this->setValue('name', $name);
return $this;
}

/**
* @api
* @return string
Expand All @@ -52,6 +53,7 @@ public function setAuthor(string $author): self
$this->setValue('author', $author);
return $this;
}

/**
* @api
* @return string
Expand Down Expand Up @@ -117,7 +119,7 @@ public function setImages(?array $images): self
/** @api */
public function getMedia(): ?rex_media
{
if(rex_addon::get('media_manager_resposnive')->isAvailable()) {
if (rex_addon::get('media_manager_resposnive')->isAvailable()) {
return rex_media_plus::get($this->getImage());
}
return rex_media::get($this->getImage());
Expand Down Expand Up @@ -216,15 +218,15 @@ public function setStatus(int $status): self
return $this;
}

public static function findOnline(int $category_id = null): ?rex_yform_manager_collection
public static function findOnline(?int $category_id = null): ?rex_yform_manager_collection
{
if($category_id) {
if ($category_id) {
return self::findByCategory($category_id);
}
return self::query()->where('status', 1, '>=')->find();
}

public static function findByCategory(int $category_id = null, int $status = 1): ?rex_yform_manager_collection
public static function findByCategory(?int $category_id = null, int $status = 1): ?rex_yform_manager_collection
{
$query = self::query()->joinRelation('category_ids', 'c')->where('rex_neues_entry.status', $status, '>=')->where('c.id', $category_id);
return $query->find();
Expand Down

0 comments on commit f3a3971

Please sign in to comment.