Skip to content

Commit

Permalink
[TASK] Fix PHP CS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dkd-kaehm committed Oct 26, 2023
1 parent d0f6ed0 commit 4c93539
Show file tree
Hide file tree
Showing 33 changed files with 1,718 additions and 1,780 deletions.
15 changes: 7 additions & 8 deletions Classes/Domain/Result/Document/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@

class Collection extends ArrayObject
{

/**
* @param $offset
* @return Document
*/
public function getDocument($offset): Document
/**
* @param $offset
* @return Document
*/
public function getDocument($offset): Document
{
return $this->offsetGet($offset);
}
return $this->offsetGet($offset);
}
}
88 changes: 42 additions & 46 deletions Classes/Domain/Result/Document/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,63 +7,59 @@

class Document
{
/**
* @var Collection
*/
protected $fieldCollection;

/**
* @var Collection
*/
protected $fieldCollection;
/**
* @var string
*/
protected $rawExplainData;

/**
* @var string
*/
protected $rawExplainData;

/**
* @return void
*/
public function __construct()
public function __construct()
{
$this->fieldCollection = new Collection();
}
$this->fieldCollection = new Collection();
}

/**
* @param Field $field
*/
public function addField(Field $field)
/**
* @param Field $field
*/
public function addField(Field $field)
{
$this->fieldCollection->offsetSet($field->getName(),$field);
}
$this->fieldCollection->offsetSet($field->getName(), $field);
}

/**
* @return Collection
*/
public function getFields(): Collection
/**
* @return Collection
*/
public function getFields(): Collection
{
return $this->fieldCollection;
}
return $this->fieldCollection;
}

/**
* @param string
* @return Field
*/
public function getFieldByName(string $fieldName): Field
/**
* @param string
* @return Field
*/
public function getFieldByName(string $fieldName): Field
{
return $this->fieldCollection->offsetGet($fieldName);
}
return $this->fieldCollection->offsetGet($fieldName);
}

/**
* @param string $rawExplainData
*/
public function setRawExplainData(string $rawExplainData)
/**
* @param string $rawExplainData
*/
public function setRawExplainData(string $rawExplainData)
{
$this->rawExplainData = $rawExplainData;
}
$this->rawExplainData = $rawExplainData;
}

/**
* @return string
*/
public function getRawExplainData(): string
/**
* @return string
*/
public function getRawExplainData(): string
{
return $this->rawExplainData;
}
return $this->rawExplainData;
}
}
4 changes: 1 addition & 3 deletions Classes/Domain/Result/Document/Field/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use ArrayObject;

class Collection extends ArrayObject
{
}
class Collection extends ArrayObject {}
111 changes: 55 additions & 56 deletions Classes/Domain/Result/Document/Field/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,75 +4,74 @@

class Field
{
/**
* @var string
*/
protected $name;

/**
* @var string
*/
protected $name;
/**
* @var mixed
*/
protected $value;

/**
* @var mixed
*/
protected $value;
/**
* @var int
*/
protected $type;

/**
* @var int
*/
protected $type;

/**
* @param string $name
*/
public function setName(string $name)
/**
* @param string $name
*/
public function setName(string $name)
{
$this->name = $name;
}
$this->name = $name;
}

/**
* @return string
*/
public function getName(): string
/**
* @return string
*/
public function getName(): string
{
return $this->name;
}
return $this->name;
}

/**
* @param int $type
*/
public function setType(int $type)
/**
* @param int $type
*/
public function setType(int $type)
{
$this->type = $type;
}
$this->type = $type;
}

/**
* @return int
*/
public function getType(): int
/**
* @return int
*/
public function getType(): int
{
return $this->type;
}
return $this->type;
}

/**
* @param mixed $value
*/
public function setValue($value)
/**
* @param mixed $value
*/
public function setValue($value)
{
$this->value = $value;
}
$this->value = $value;
}

/**
* @return mixed
*/
public function getValue()
/**
* @return mixed
*/
public function getValue()
{
return $this->value;
}
return $this->value;
}

/**
* @boolean
*/
public function isMultiValue(): bool
/**
* @boolean
*/
public function isMultiValue(): bool
{
return is_array($this->value);
}
}
return is_array($this->value);
}
}
33 changes: 16 additions & 17 deletions Classes/Domain/Result/Explanation/Content.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,24 @@
*/
class Content
{
/**
* @var string
*/
protected $content;

/**
* @var string
*/
protected $content;

/**
* @param string $content
*/
public function __construct(string $content)
/**
* @param string $content
*/
public function __construct(string $content)
{
$this->content = $content;
}
$this->content = $content;
}

/**
* @return string
*/
public function getContent(): string
/**
* @return string
*/
public function getContent(): string
{
return $this->content;
}
return $this->content;
}
}
Loading

0 comments on commit 4c93539

Please sign in to comment.