Marks fork as 2.0.0.
This commit is contained in:
parent
d93a6b5c09
commit
8d8de4a2b0
81 changed files with 1921 additions and 3954 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue