Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
kamshory committed Oct 12, 2024
1 parent 05543e2 commit f65492f
Show file tree
Hide file tree
Showing 26 changed files with 120 additions and 120 deletions.
22 changes: 11 additions & 11 deletions src/ComplexNumber/ComplexNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public function __construct($real, $imaginary) {
/**
* Add another complex number to this one.
*
* @param ComplexNumber $self The complex number to add.
* @return ComplexNumber The sum of the two complex numbers.
* @param self $self The complex number to add.
* @return self The sum of the two complex numbers.
*/
public function add($self) {
return new self(
Expand All @@ -45,8 +45,8 @@ public function add($self) {
/**
* Subtract another complex number from this one.
*
* @param ComplexNumber $self The complex number to subtract.
* @return ComplexNumber The result of the subtraction.
* @param self $self The complex number to subtract.
* @return self The result of the subtraction.
*/
public function subtract($self) {
return new self(
Expand All @@ -58,8 +58,8 @@ public function subtract($self) {
/**
* Multiply this complex number by another.
*
* @param ComplexNumber $self The complex number to multiply.
* @return ComplexNumber The product of the two complex numbers.
* @param self $self The complex number to multiply.
* @return self The product of the two complex numbers.
*/
public function multiply($self) {
$real = $this->real * $self->getReal()
Expand All @@ -74,8 +74,8 @@ public function multiply($self) {
/**
* Divide this complex number by another.
*
* @param ComplexNumber $self The complex number to divide by.
* @return ComplexNumber The result of the division.
* @param self $self The complex number to divide by.
* @return self The result of the division.
*/
public function divide($self) {
$denominator = $self->getReal() ** 2
Expand Down Expand Up @@ -104,7 +104,7 @@ public function magnitude() {
/**
* Get the conjugate of the complex number.
*
* @return ComplexNumber The conjugate of the complex number.
* @return self The conjugate of the complex number.
*/
public function conjugate() {
return new self($this->real, -$this->imaginary);
Expand Down Expand Up @@ -132,7 +132,7 @@ public function getReal() {
* Set the real part of the complex number.
*
* @param float $real The real part.
* @return ComplexNumber The current instance for method chaining.
* @return self The current instance for method chaining.
*/
public function setReal($real) {
$this->real = $real;
Expand All @@ -153,7 +153,7 @@ public function getImaginary() {
* Set the imaginary part of the complex number.
*
* @param float $imaginary The imaginary part.
* @return ComplexNumber The current instance for method chaining.
* @return self The current instance for method chaining.
*/
public function setImaginary($imaginary) {
$this->imaginary = $imaginary;
Expand Down
10 changes: 5 additions & 5 deletions src/Database/PicoDatabasePersistence.php
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,7 @@ protected function createWhereFromSpecification($sqlQuery, $specification, $info
* Join array string with maximum length. If max is reached, it will create new line
*
* @param string[] $arr Array string to be joined
* @param integer $max Threshold to split line
* @param int $max Threshold to split line
* @param string $normalSplit Normal splitter
* @param string $maxSplit Overflow splitter
* @return string
Expand Down Expand Up @@ -1487,7 +1487,7 @@ private function joinStringArray($arr, $max = 0, $normalSplit = " ", $maxSplit =
* Split chunk query
*
* @param string[] $arr Array string to be joined
* @param integer $max Threshold to split line
* @param int $max Threshold to split line
* @param string $normalSplit Normal splitter
* @return array
*/
Expand Down Expand Up @@ -2574,7 +2574,7 @@ public function existsBy($propertyName, $propertyValue)
* @param PicoSpecification|null $specification Specification
* @param PicoPageable $pageable Pagable
* @param PicoSortable $sortable Sortable
* @return integer
* @return int
* @throws EntityException|EmptyResultException
*/
public function countAll($specification = null, $pageable = null, $sortable = null)
Expand Down Expand Up @@ -2625,7 +2625,7 @@ public function countAll($specification = null, $pageable = null, $sortable = nu
*
* @param string $propertyName Property name
* @param mixed $propertyValue Property value
* @return integer
* @return int
* @throws EntityException|InvalidFilterException|PDOException|EmptyResultException
*/
public function countBy($propertyName, $propertyValue)
Expand Down Expand Up @@ -2673,7 +2673,7 @@ public function countBy($propertyName, $propertyValue)
*
* @param string $propertyName Property name
* @param mixed $propertyValue Property value
* @return integer
* @return int
* @throws EntityException|InvalidFilterException|PDOException|EmptyResultException
*/
public function deleteBy($propertyName, $propertyValue)
Expand Down
6 changes: 3 additions & 3 deletions src/Database/PicoDatabaseQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ public function groupBy($query)
/**
* Set a limit on the number of results returned.
*
* @param integer $limit The maximum number of results.
* @param int $limit The maximum number of results.
* @return self The current instance for method chaining.
*/
public function limit($limit)
Expand All @@ -565,7 +565,7 @@ public function limit($limit)
/**
* Set an offset for the results returned.
*
* @param integer $offset The offset from the start of the result set.
* @param int $offset The offset from the start of the result set.
* @return self The current instance for method chaining.
*/
public function offset($offset)
Expand Down Expand Up @@ -732,7 +732,7 @@ public function currentTimestamp()
/**
* Create a NOW statement for the current time with optional precision.
*
* @param integer $precision The decimal precision of seconds (default is 0).
* @param int $precision The decimal precision of seconds (default is 0).
* @return string The NOW statement with the specified precision.
*/
public function now($precision = 0)
Expand Down
8 changes: 4 additions & 4 deletions src/Database/PicoLimit.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class PicoLimit
/**
* Constructor
*
* @param integer $offset Offset
* @param integer $limit Limit
* @param int $offset Offset
* @param int $limit Limit
*/
public function __construct($offset = 0, $limit = 0)
{
Expand Down Expand Up @@ -73,7 +73,7 @@ public function getLimit()
/**
* Set the limit value.
*
* @param integer $limit Limit
* @param int $limit Limit
* @return self
*/
public function setLimit($limit)
Expand All @@ -95,7 +95,7 @@ public function getOffset()
/**
* Set the offset value.
*
* @param integer $offset Offset
* @param int $offset Offset
* @return self
*/
public function setOffset($offset)
Expand Down
8 changes: 4 additions & 4 deletions src/Database/PicoPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class PicoPage
/**
* Constructor.
*
* @param integer $pageNumber Page number.
* @param integer $pageSize Page size.
* @param int $pageNumber Page number.
* @param int $pageSize Page size.
*/
public function __construct($pageNumber = 1, $pageSize = 1)
{
Expand Down Expand Up @@ -75,7 +75,7 @@ public function getPageNumber()
/**
* Set the page number.
*
* @param integer $pageNumber Page number.
* @param int $pageNumber Page number.
* @return self
*/
public function setPageNumber($pageNumber)
Expand All @@ -97,7 +97,7 @@ public function getPageSize()
/**
* Set the page size.
*
* @param integer $pageSize Page size.
* @param int $pageSize Page size.
* @return self
*/
public function setPageSize($pageSize)
Expand Down
2 changes: 1 addition & 1 deletion src/Database/PicoPageControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function __construct($pageData, $parameterName = 'page', $path = null)
/**
* Set margin to pagination
*
* @param integer $margin Margin (previous and next) from current page
* @param int $margin Margin (previous and next) from current page
* @return self
*/
public function setMargin($margin)
Expand Down
8 changes: 4 additions & 4 deletions src/Database/PicoPageData.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class PicoPageData
*
* @param MagicObject[]|null $result Array of MagicObject or null.
* @param float $startTime Timestamp when the query was sent.
* @param integer $totalResult Total result count.
* @param int $totalResult Total result count.
* @param PicoPageable|null $pageable Pageable object.
* @param PDOStatement|null $stmt PDO statement.
* @param MagicObject|null $entity Entity.
Expand Down Expand Up @@ -228,7 +228,7 @@ public function calculateContent()
/**
* Initialize default pagination settings.
*
* @param integer $countResult Count of results.
* @param int $countResult Count of results.
*/
private function initializeDefaultPagination($countResult)
{
Expand All @@ -241,7 +241,7 @@ private function initializeDefaultPagination($countResult)
/**
* Generate pagination details.
*
* @param integer $margin Number of pages to show before and after the current page.
* @param int $margin Number of pages to show before and after the current page.
* @return self
*/
public function generatePagination($margin = 3)
Expand Down Expand Up @@ -469,7 +469,7 @@ public function getFindOption()
/**
* Set find option flags.
*
* @param integer $findOption Find option.
* @param int $findOption Find option.
* @return self
*/
public function setFindOption($findOption)
Expand Down
2 changes: 1 addition & 1 deletion src/Database/PicoSortable.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct()
/**
* Initialize sortable criteria.
*
* @param integer $argc Number of arguments passed to the constructor.
* @param int $argc Number of arguments passed to the constructor.
* @param array $params Parameters for sorting.
* @return self
*/
Expand Down
6 changes: 3 additions & 3 deletions src/File/PicoUploadFileContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function isMultiple()
/**
* Checks if a specific file exists in the upload.
*
* @param integer $index The index of the uploaded file.
* @param int $index The index of the uploaded file.
* @return boolean True if the file exists; otherwise, false.
*/
public function isExists($index)
Expand All @@ -57,7 +57,7 @@ public function isExists($index)
/**
* Gets the total number of uploaded files.
*
* @return integer The number of files uploaded.
* @return int The number of files uploaded.
*/
public function getFileCount()
{
Expand Down Expand Up @@ -93,7 +93,7 @@ public function getAll()
/**
* Gets information about a specific uploaded file.
*
* @param integer $index The index of the uploaded file.
* @param int $index The index of the uploaded file.
* @return array An associative array containing information about the uploaded file.
*/
public function getItem($index)
Expand Down
2 changes: 1 addition & 1 deletion src/File/PicoUploadFileItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function getError()
/**
* Gets the size of the uploaded file.
*
* @return integer The file size in bytes; returns 0 if not set.
* @return int The file size in bytes; returns 0 if not set.
*/
public function getSize()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Generator/PicoEntityGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ protected function getDataType($typeMap, $columnType)
* Get the length of the column based on its definition.
*
* @param string $str Column definition containing length
* @return integer Length of the column
* @return int Length of the column
*/
protected function getDataLength($str)
{
Expand Down
22 changes: 11 additions & 11 deletions src/MagicObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -1278,9 +1278,9 @@ private function _databaseConnected()
* @param PicoSpecification|null $specification The specification for filtering
* @param PicoPageable|string|null $pageable The pagination information
* @param PicoSortable|string|null $sortable The sorting criteria
* @param integer $findOption The find option
* @param int $findOption The find option
* @param array|null $result The result set
* @return integer The count of matching records
* @return int The count of matching records
*/
private function countData($persist, $specification, $pageable, $sortable, $findOption = 0, $result = null)
{
Expand Down Expand Up @@ -1357,7 +1357,7 @@ public function findOne($specification = null, $sortable = null, $subqueryMap =
* @param PicoSortable|string|null $sortable The sorting criteria
* @param boolean $passive Flag indicating whether the object is passive
* @param array|null $subqueryMap An optional map of subqueries
* @param integer $findOption The find option
* @param int $findOption The find option
* @return PicoPageData The paginated data
* @throws NoRecordFoundException if no records are found
* @throws NoDatabaseConnectionException if no database connection is established
Expand Down Expand Up @@ -1448,7 +1448,7 @@ public function findAllDesc()
* @param PicoSortable|string|null $sortable The sorting criteria
* @param boolean $passive Flag indicating whether the object is passive
* @param array|null $subqueryMap An optional map of subqueries
* @param integer $findOption The find option
* @param int $findOption The find option
* @return PicoPageData The paginated data
* @throws NoRecordFoundException if no records are found
* @throws NoDatabaseConnectionException if no database connection is established
Expand Down Expand Up @@ -1509,7 +1509,7 @@ public function findSpecific($selected, $specification = null, $pageable = null,
* @param PicoSpecification|null $specification The specification for filtering
* @param PicoPageable|null $pageable The pagination information
* @param PicoSortable|null $sortable The sorting criteria
* @return integer|false The count of records or false on error
* @return int|false The count of records or false on error
* @throws NoRecordFoundException if no records are found
* @throws NoDatabaseConnectionException if no database connection is established
*/
Expand Down Expand Up @@ -1639,7 +1639,7 @@ public function findIfExists($params)
* @param PicoSortable|string|null $sortable The sorting criteria
* @param boolean $passive Flag indicating whether the object is passive
* @param array|null $subqueryMap An optional map of subqueries
* @param integer $findOption The find option
* @param int $findOption The find option
* @return PicoPageData The paginated data
* @throws NoRecordFoundException if no records are found
* @throws NoDatabaseConnectionException if no database connection is established
Expand Down Expand Up @@ -1681,7 +1681,7 @@ private function findBy($method, $params, $pageable = null, $sortable = null, $p
*
* @param string $method The method used for finding.
* @param mixed $params The parameters to use for the count.
* @return integer The count of matching records.
* @return int The count of matching records.
* @throws NoDatabaseConnectionException If there is no database connection.
*/
private function countBy($method, $params)
Expand All @@ -1702,7 +1702,7 @@ private function countBy($method, $params)
*
* @param string $method The method used for finding.
* @param mixed $params The parameters to use for the deletion.
* @return integer The number of deleted records.
* @return int The number of deleted records.
* @throws NoDatabaseConnectionException If there is no database connection.
*/
private function deleteBy($method, $params)
Expand Down Expand Up @@ -1907,7 +1907,7 @@ private function toArrayObject($result, $passive = false)
/**
* Get the number of properties of the object.
*
* @return integer The number of properties.
* @return int The number of properties.
*/
public function size()
{
Expand Down Expand Up @@ -2302,8 +2302,8 @@ private function stringifyObject($value, $snake)
* The dump method, when supplied with an array, converts it into a friendly YAML format.
*
* @param int|null $inline The level at which to switch to inline YAML. If NULL, the maximum depth will be used.
* @param integer $indent The number of spaces to use for indentation of nested nodes.
* @param integer $flags A bit field of DUMP_* constants to customize the dumped YAML string.
* @param int $indent The number of spaces to use for indentation of nested nodes.
* @param int $flags A bit field of DUMP_* constants to customize the dumped YAML string.
*
* @return string A YAML string representing the original PHP value.
*/
Expand Down
Loading

0 comments on commit f65492f

Please sign in to comment.