Marks fork as 2.0.0.

This commit is contained in:
Pierre Lannoy 2024-03-30 16:44:38 +01:00
commit 8d8de4a2b0
Signed by: Pierre Lannoy
GPG key ID: D27231EF87D53F31
81 changed files with 1921 additions and 3954 deletions

View file

@ -1,51 +1,47 @@
<?php
namespace Arendsen\FluxQueryBuilder\Type;
namespace Hosterra\FluxBuilder\Type;
use Arendsen\FluxQueryBuilder\Type;
use Hosterra\FluxBuilder\Type;
class FnType implements TypeInterface
{
/**
* @var array $params
*/
protected $params;
class FnType implements TypeInterface {
/**
* @var array $params
*/
protected $params;
/**
* @var string $content
*/
protected $content;
/**
* @var string $content
*/
protected $content;
private function __construct(array $params)
{
$this->params = $params;
}
private function __construct( array $params ) {
$this->params = $params;
}
public static function params(array $params)
{
return new self($params);
}
public static function params( array $params ) {
return new self( $params );
}
public function withBody(string $content)
{
$this->content = $content;
return $this;
}
public function withBody( string $content ) {
$this->content = $content;
public function withBlock(string $content)
{
$this->content = '{ ' . $content . ' }';
return $this;
}
return $this;
}
public function __toString(): string
{
array_walk($this->params, function (&$value, $key) {
if (is_string($key)) {
$value = $key . ' = ' . new Type($value);
}
});
public function withBlock( string $content ) {
$this->content = '{ ' . $content . ' }';
return '(' . implode(', ', $this->params) . ') => ' . $this->content;
}
return $this;
}
public function __toString(): string {
array_walk( $this->params, function ( &$value, $key ) {
if ( is_string( $key ) ) {
$value = $key . ' = ' . new Type( $value );
}
} );
return '(' . implode( ', ', $this->params ) . ') => ' . $this->content;
}
}