Skip to content

Commit

Permalink
Enhance debugging and docblock
Browse files Browse the repository at this point in the history
  • Loading branch information
kamshory committed Nov 3, 2024
1 parent 1fb52bf commit e07f9b1
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 21 deletions.
7 changes: 5 additions & 2 deletions src/Database/PicoDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -695,9 +695,12 @@ public function getDatabaseType()
}

/**
* Magic method to debug the object.
* Convert the object to a JSON string representation for debugging.
*
* @return string Returns a JSON representation of the object's state.
* This method is intended for debugging purposes only and provides
* a JSON representation of the object's state.
*
* @return string The JSON representation of the object.
*/
public function __toString()
{
Expand Down
7 changes: 5 additions & 2 deletions src/Database/PicoJoinMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,12 @@ public function getJoinTableAlias()
}

/**
* Magic method to return a JSON representation of the object.
* Convert the object to a JSON string representation for debugging.
*
* @return string JSON representation of the join map.
* This method is intended for debugging purposes only and provides
* a JSON representation of the object's state.
*
* @return string The JSON representation of the object.
*/
public function __toString()
{
Expand Down
8 changes: 4 additions & 4 deletions src/Database/PicoLimit.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ public function getPage()
}

/**
* Return a string representation of the object in JSON format.
* Convert the object to a JSON string representation for debugging.
*
* This method provides a convenient way to view the current limit
* and offset settings as a JSON string.
* This method is intended for debugging purposes only and provides
* a JSON representation of the object's state.
*
* @return string
* @return string The JSON representation of the object.
*/
public function __toString()
{
Expand Down
7 changes: 5 additions & 2 deletions src/Database/PicoPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,12 @@ public function getLimit()
}

/**
* Returns a string representation of the object.
* Convert the object to a JSON string representation for debugging.
*
* @return string JSON encoded representation of the current page and size.
* This method is intended for debugging purposes only and provides
* a JSON representation of the object's state.
*
* @return string The JSON representation of the object.
*/
public function __toString()
{
Expand Down
7 changes: 5 additions & 2 deletions src/Database/PicoPageData.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,12 @@ public function getPageSize()
}

/**
* Magic method to represent the object as a JSON string.
* Convert the object to a JSON string representation for debugging.
*
* @return string JSON representation of the object.
* This method is intended for debugging purposes only and provides
* a JSON representation of the object's state.
*
* @return string The JSON representation of the object.
*/
public function __toString()
{
Expand Down
7 changes: 5 additions & 2 deletions src/Database/PicoPageable.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,12 @@ public function setOffsetLimit($offsetLimit)
}

/**
* Magic method to return a string representation of the object for debugging.
* Convert the object to a JSON string representation for debugging.
*
* @return string JSON representation of the pageable state.
* This method is intended for debugging purposes only and provides
* a JSON representation of the object's state.
*
* @return string The JSON representation of the object.
*/
public function __toString()
{
Expand Down
5 changes: 4 additions & 1 deletion src/Database/PicoPredicate.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,10 @@ public static function functionAndValue($function, $value)
}

/**
* Convert the object to a JSON string representation.
* Convert the object to a JSON string representation for debugging.
*
* This method is intended for debugging purposes only and provides
* a JSON representation of the object's state.
*
* @return string The JSON representation of the object.
*/
Expand Down
7 changes: 5 additions & 2 deletions src/Database/PicoSortable.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,12 @@ public static function getInstance()
}

/**
* Convert the object to a string representation for debugging purposes.
* Convert the object to a JSON string representation for debugging.
*
* @return string The string representation of the sortable criteria.
* This method is intended for debugging purposes only and provides
* a JSON representation of the object's state.
*
* @return string The JSON representation of the object.
*/
public function __toString()
{
Expand Down
7 changes: 5 additions & 2 deletions src/Database/PicoSpecification.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,12 @@ private function addPredicate($field, $value)
}

/**
* Magic method for debugging the object.
* Convert the object to a JSON string representation for debugging.
*
* @return string A string representation of the current specifications.
* This method is intended for debugging purposes only and provides
* a JSON representation of the object's state.
*
* @return string The JSON representation of the object.
*/
public function __toString()
{
Expand Down
7 changes: 5 additions & 2 deletions src/Database/PicoSpecificationFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@ public function __construct($columnName, $dataType)
}

/**
* Magic method to return a JSON representation of the object.
* Convert the object to a JSON string representation for debugging.
*
* @return string JSON encoded string of the object properties.
* This method is intended for debugging purposes only and provides
* a JSON representation of the object's state.
*
* @return string The JSON representation of the object.
*/
public function __toString()
{
Expand Down
2 changes: 2 additions & 0 deletions src/Database/PicoTableInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ public function __toString()
$stdClass->autoIncrementKeys = $this->autoIncrementKeys;
$stdClass->defaultValue = $this->defaultValue;
$stdClass->notNullColumns = $this->notNullColumns;
$stdClass->this->noCache = $this->noCache;
$stdClass->package = $this->package;
return json_encode($stdClass);
}

Expand Down

0 comments on commit e07f9b1

Please sign in to comment.