"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Database/Type/ExpressionTypeCasterTrait.php" between
cakephp-4.2.2.tar.gz and cakephp-4.2.3.tar.gz

About: CakePHP is a rapid development framework for PHP applications. Source code.

ExpressionTypeCasterTrait.php  (cakephp-4.2.2):ExpressionTypeCasterTrait.php  (cakephp-4.2.3)
skipping to change at line 32 skipping to change at line 32
* Offers a method to convert values to ExpressionInterface objects * Offers a method to convert values to ExpressionInterface objects
* if the type they should be converted to implements ExpressionTypeInterface * if the type they should be converted to implements ExpressionTypeInterface
*/ */
trait ExpressionTypeCasterTrait trait ExpressionTypeCasterTrait
{ {
/** /**
* Conditionally converts the passed value to an ExpressionInterface object * Conditionally converts the passed value to an ExpressionInterface object
* if the type class implements the ExpressionTypeInterface. Otherwise, * if the type class implements the ExpressionTypeInterface. Otherwise,
* returns the value unmodified. * returns the value unmodified.
* *
* @param mixed $value The value to converto to ExpressionInterface * @param mixed $value The value to convert to ExpressionInterface
* @param string|null $type The type name * @param string|null $type The type name
* @return mixed * @return mixed
*/ */
protected function _castToExpression($value, ?string $type = null) protected function _castToExpression($value, ?string $type = null)
{ {
if ($type === null) { if ($type === null) {
return $value; return $value;
} }
$baseType = str_replace('[]', '', $type); $baseType = str_replace('[]', '', $type);
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)