repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
CSharpRU/vault-php
src/Client.php
Client.checkResponse
protected function checkResponse(ResponseInterface $response) { if ($response->getStatusCode() >= 400) { $message = sprintf( "Something went wrong when calling Vault (%s - %s)\n%s.", $response->getStatusCode(), $response->getReasonPhrase(), ...
php
protected function checkResponse(ResponseInterface $response) { if ($response->getStatusCode() >= 400) { $message = sprintf( "Something went wrong when calling Vault (%s - %s)\n%s.", $response->getStatusCode(), $response->getReasonPhrase(), ...
[ "protected", "function", "checkResponse", "(", "ResponseInterface", "$", "response", ")", "{", "if", "(", "$", "response", "->", "getStatusCode", "(", ")", ">=", "400", ")", "{", "$", "message", "=", "sprintf", "(", "\"Something went wrong when calling Vault (%s -...
Returns true whenever request should be retried. @param ResponseInterface $response @throws \Vault\Exceptions\ClientException @throws \Vault\Exceptions\ServerException
[ "Returns", "true", "whenever", "request", "should", "be", "retried", "." ]
train
https://github.com/CSharpRU/vault-php/blob/c6f959e118b4f29e4802d017f952d774379df70c/src/Client.php#L320-L336
CSharpRU/vault-php
src/AuthenticationStrategies/AppRoleAuthenticationStrategy.php
AppRoleAuthenticationStrategy.authenticate
public function authenticate() { $response = $this->client->write( '/auth/approle/login', [ 'role_id' => $this->roleId, 'secret_id' => $this->secretId, ] ); return $response->getAuth(); }
php
public function authenticate() { $response = $this->client->write( '/auth/approle/login', [ 'role_id' => $this->roleId, 'secret_id' => $this->secretId, ] ); return $response->getAuth(); }
[ "public", "function", "authenticate", "(", ")", "{", "$", "response", "=", "$", "this", "->", "client", "->", "write", "(", "'/auth/approle/login'", ",", "[", "'role_id'", "=>", "$", "this", "->", "roleId", ",", "'secret_id'", "=>", "$", "this", "->", "s...
Returns auth for further interactions with Vault. @return Auth @throws \Vault\Exceptions\TransportException @throws \Vault\Exceptions\ServerException @throws \Vault\Exceptions\ClientException @throws \RuntimeException @throws \InvalidArgumentException
[ "Returns", "auth", "for", "further", "interactions", "with", "Vault", "." ]
train
https://github.com/CSharpRU/vault-php/blob/c6f959e118b4f29e4802d017f952d774379df70c/src/AuthenticationStrategies/AppRoleAuthenticationStrategy.php#L47-L58
CSharpRU/vault-php
src/Helpers/ArrayHelper.php
ArrayHelper.toArray
public static function toArray($object, $recursive = true) { $array = []; if ($object instanceof BaseObject) { return $object->toArray($recursive); } foreach ($object as $key => $value) { if ($value instanceof BaseObject) { $newValue = $value...
php
public static function toArray($object, $recursive = true) { $array = []; if ($object instanceof BaseObject) { return $object->toArray($recursive); } foreach ($object as $key => $value) { if ($value instanceof BaseObject) { $newValue = $value...
[ "public", "static", "function", "toArray", "(", "$", "object", ",", "$", "recursive", "=", "true", ")", "{", "$", "array", "=", "[", "]", ";", "if", "(", "$", "object", "instanceof", "BaseObject", ")", "{", "return", "$", "object", "->", "toArray", "...
@param object|array $object @param bool|true $recursive @return array
[ "@param", "object|array", "$object", "@param", "bool|true", "$recursive" ]
train
https://github.com/CSharpRU/vault-php/blob/c6f959e118b4f29e4802d017f952d774379df70c/src/Helpers/ArrayHelper.php#L20-L39
TimeToogo/Pinq
Source/Expressions/ArrayItemExpression.php
ArrayItemExpression.update
public function update(Expression $key = null, Expression $value, $isReference) { if ($this->key === $key && $this->value === $value && $this->isReference === $isReference ) { return $this; } return new self($key, $value, $isReference); ...
php
public function update(Expression $key = null, Expression $value, $isReference) { if ($this->key === $key && $this->value === $value && $this->isReference === $isReference ) { return $this; } return new self($key, $value, $isReference); ...
[ "public", "function", "update", "(", "Expression", "$", "key", "=", "null", ",", "Expression", "$", "value", ",", "$", "isReference", ")", "{", "if", "(", "$", "this", "->", "key", "===", "$", "key", "&&", "$", "this", "->", "value", "===", "$", "v...
@param Expression $key @param Expression $value @param boolean $isReference @return self
[ "@param", "Expression", "$key", "@param", "Expression", "$value", "@param", "boolean", "$isReference" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/ArrayItemExpression.php#L89-L99
TimeToogo/Pinq
Source/Expressions/AssignmentExpression.php
AssignmentExpression.toBinaryOperationEquivalent
public function toBinaryOperationEquivalent() { $binaryOperator = Assignment::toBinaryOperator($this->operator); if($binaryOperator === null) { return $this; } return $this->update( $this->assignTo, Assignment::EQUAL, Expr...
php
public function toBinaryOperationEquivalent() { $binaryOperator = Assignment::toBinaryOperator($this->operator); if($binaryOperator === null) { return $this; } return $this->update( $this->assignTo, Assignment::EQUAL, Expr...
[ "public", "function", "toBinaryOperationEquivalent", "(", ")", "{", "$", "binaryOperator", "=", "Assignment", "::", "toBinaryOperator", "(", "$", "this", "->", "operator", ")", ";", "if", "(", "$", "binaryOperator", "===", "null", ")", "{", "return", "$", "t...
Converts the assignment expression with compound assignment operators to the equivalent assignment and binary operator combination <code> $variable += 5 </code> becomes <code> $variable = $variable + 5 </code> @return AssignmentExpression
[ "Converts", "the", "assignment", "expression", "with", "compound", "assignment", "operators", "to", "the", "equivalent", "assignment", "and", "binary", "operator", "combination" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/AssignmentExpression.php#L75-L92
TimeToogo/Pinq
Source/Expressions/AssignmentExpression.php
AssignmentExpression.update
public function update(Expression $assignTo, $operator, Expression $assignmentValue) { if ($this->assignTo === $assignTo && $this->operator === $operator && $this->assignmentValue === $assignmentValue ) { return $this; } return new self($a...
php
public function update(Expression $assignTo, $operator, Expression $assignmentValue) { if ($this->assignTo === $assignTo && $this->operator === $operator && $this->assignmentValue === $assignmentValue ) { return $this; } return new self($a...
[ "public", "function", "update", "(", "Expression", "$", "assignTo", ",", "$", "operator", ",", "Expression", "$", "assignmentValue", ")", "{", "if", "(", "$", "this", "->", "assignTo", "===", "$", "assignTo", "&&", "$", "this", "->", "operator", "===", "...
@param Expression $assignTo @param string $operator @param Expression $assignmentValue @return self
[ "@param", "Expression", "$assignTo", "@param", "string", "$operator", "@param", "Expression", "$assignmentValue" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/AssignmentExpression.php#L106-L116
TimeToogo/Pinq
Source/Queries/Segments/Join.php
Join.update
public function update( Common\Join\Options $options, Functions\ConnectorProjection $joiningFunction ) { if ($this->options === $options && $joiningFunction === $this->joiningFunction) { return $this; } return new self($options, $joiningFunction); }
php
public function update( Common\Join\Options $options, Functions\ConnectorProjection $joiningFunction ) { if ($this->options === $options && $joiningFunction === $this->joiningFunction) { return $this; } return new self($options, $joiningFunction); }
[ "public", "function", "update", "(", "Common", "\\", "Join", "\\", "Options", "$", "options", ",", "Functions", "\\", "ConnectorProjection", "$", "joiningFunction", ")", "{", "if", "(", "$", "this", "->", "options", "===", "$", "options", "&&", "$", "joini...
@param Common\Join\Options $options @param Functions\ConnectorProjection $joiningFunction @return Join
[ "@param", "Common", "\\", "Join", "\\", "Options", "$options", "@param", "Functions", "\\", "ConnectorProjection", "$joiningFunction" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Queries/Segments/Join.php#L75-L84
TimeToogo/Pinq
Source/Iterators/Common/Functions.php
Functions.allowExcessiveArguments
public static function allowExcessiveArguments(callable $function) { $reflection = Reflection::fromCallable($function); if ($reflection->isUserDefined()) { return $function; } if (Reflection::isVariadic($reflection)) { return $function; } $nu...
php
public static function allowExcessiveArguments(callable $function) { $reflection = Reflection::fromCallable($function); if ($reflection->isUserDefined()) { return $function; } if (Reflection::isVariadic($reflection)) { return $function; } $nu...
[ "public", "static", "function", "allowExcessiveArguments", "(", "callable", "$", "function", ")", "{", "$", "reflection", "=", "Reflection", "::", "fromCallable", "(", "$", "function", ")", ";", "if", "(", "$", "reflection", "->", "isUserDefined", "(", ")", ...
Returns a wrapper function that will allow the function to be called with excessive number of arguments, this is useful for internal function support. Note that references will not be maintained. @param callable $function @return callable
[ "Returns", "a", "wrapper", "function", "that", "will", "allow", "the", "function", "to", "be", "called", "with", "excessive", "number", "of", "arguments", "this", "is", "useful", "for", "internal", "function", "support", ".", "Note", "that", "references", "wil...
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Iterators/Common/Functions.php#L28-L86
TimeToogo/Pinq
Source/Parsing/PhpParser/Parser.php
Parser.getMatchingFunctionNode
private function getMatchingFunctionNode(array $locatedFunctionNodes, IFunctionReflection $reflection) { $locationHash = $reflection->getLocation()->getHash(); if (empty($locatedFunctionNodes[$locationHash])) { throw InvalidFunctionException::invalidFunctionMessage( ...
php
private function getMatchingFunctionNode(array $locatedFunctionNodes, IFunctionReflection $reflection) { $locationHash = $reflection->getLocation()->getHash(); if (empty($locatedFunctionNodes[$locationHash])) { throw InvalidFunctionException::invalidFunctionMessage( ...
[ "private", "function", "getMatchingFunctionNode", "(", "array", "$", "locatedFunctionNodes", ",", "IFunctionReflection", "$", "reflection", ")", "{", "$", "locationHash", "=", "$", "reflection", "->", "getLocation", "(", ")", "->", "getHash", "(", ")", ";", "if"...
@param array <array<LocatedFunctionNode>> $locatedFunctionNodes @param IFunctionReflection $reflection @throws InvalidFunctionException @return LocatedFunctionNode
[ "@param", "array", "<array<LocatedFunctionNode", ">>", "$locatedFunctionNodes", "@param", "IFunctionReflection", "$reflection" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Parsing/PhpParser/Parser.php#L89-L134
TimeToogo/Pinq
Source/Iterators/Common/Identity.php
Identity.hash
public static function hash($value) { $typeIdentifier = gettype($value)[0]; switch ($typeIdentifier) { case 's': //string return 's' . (strlen($value) > 32 ? md5($value) : $value); case 'i': //integer case 'b': //boolean case 'd': /...
php
public static function hash($value) { $typeIdentifier = gettype($value)[0]; switch ($typeIdentifier) { case 's': //string return 's' . (strlen($value) > 32 ? md5($value) : $value); case 'i': //integer case 'b': //boolean case 'd': /...
[ "public", "static", "function", "hash", "(", "$", "value", ")", "{", "$", "typeIdentifier", "=", "gettype", "(", "$", "value", ")", "[", "0", "]", ";", "switch", "(", "$", "typeIdentifier", ")", "{", "case", "'s'", ":", "//string", "return", "'s'", "...
Returns a string representing the supplied value's identity. @param mixed $value @return string
[ "Returns", "a", "string", "representing", "the", "supplied", "value", "s", "identity", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Iterators/Common/Identity.php#L24-L54
TimeToogo/Pinq
Source/Providers/DSL/Compilation/Processors/Expression/ExpressionProcessor.php
ExpressionProcessor.processFunction
public function processFunction(IFunction $function) { return $function->update( $function->getScopeType(), $function->getNamespace(), $function->getParameterScopedVariableMap(), $this->walkAll($function->getParameters()->getAll()), ...
php
public function processFunction(IFunction $function) { return $function->update( $function->getScopeType(), $function->getNamespace(), $function->getParameterScopedVariableMap(), $this->walkAll($function->getParameters()->getAll()), ...
[ "public", "function", "processFunction", "(", "IFunction", "$", "function", ")", "{", "return", "$", "function", "->", "update", "(", "$", "function", "->", "getScopeType", "(", ")", ",", "$", "function", "->", "getNamespace", "(", ")", ",", "$", "function...
{@inheritDoc}
[ "{" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Providers/DSL/Compilation/Processors/Expression/ExpressionProcessor.php#L19-L28
TimeToogo/Pinq
Source/Expressions/Operators/Assignment.php
Assignment.toBinaryOperator
public static function toBinaryOperator($assignment) { return isset(self::$toBinaryOperatorMap[$assignment]) ? self::$toBinaryOperatorMap[$assignment] : null; }
php
public static function toBinaryOperator($assignment) { return isset(self::$toBinaryOperatorMap[$assignment]) ? self::$toBinaryOperatorMap[$assignment] : null; }
[ "public", "static", "function", "toBinaryOperator", "(", "$", "assignment", ")", "{", "return", "isset", "(", "self", "::", "$", "toBinaryOperatorMap", "[", "$", "assignment", "]", ")", "?", "self", "::", "$", "toBinaryOperatorMap", "[", "$", "assignment", "...
Returns the equivalent binary operator of the supplied assignment operator or null if there is no equivalent. @param string $assignment @return string|null
[ "Returns", "the", "equivalent", "binary", "operator", "of", "the", "supplied", "assignment", "operator", "or", "null", "if", "there", "is", "no", "equivalent", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/Operators/Assignment.php#L57-L60
TimeToogo/Pinq
Source/Expressions/Operators/Assignment.php
Assignment.doAssignment
public static function doAssignment(&$left, $operator, $right) { if (self::$assignments === null) { self::$assignments = [ self::EQUAL => function (&$l, $r) { return $l = $r; }, self::CONCATENATE => function (&$l, $r) { return $l .= $r; }, ...
php
public static function doAssignment(&$left, $operator, $right) { if (self::$assignments === null) { self::$assignments = [ self::EQUAL => function (&$l, $r) { return $l = $r; }, self::CONCATENATE => function (&$l, $r) { return $l .= $r; }, ...
[ "public", "static", "function", "doAssignment", "(", "&", "$", "left", ",", "$", "operator", ",", "$", "right", ")", "{", "if", "(", "self", "::", "$", "assignments", "===", "null", ")", "{", "self", "::", "$", "assignments", "=", "[", "self", "::", ...
Performs the assignment operation on the supplied values. @param mixed $left @param string $operator @param mixed $right @return mixed @throws PinqException
[ "Performs", "the", "assignment", "operation", "on", "the", "supplied", "values", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/Operators/Assignment.php#L74-L102
TimeToogo/Pinq
Source/Queries/Requests/ProjectionRequestBase.php
ProjectionRequestBase.updateProjection
public function updateProjection(Functions\ElementProjection $projectionFunction = null) { if ($this->projectionFunction === $projectionFunction) { return $this; } return $this->withProjectionFunction($projectionFunction); }
php
public function updateProjection(Functions\ElementProjection $projectionFunction = null) { if ($this->projectionFunction === $projectionFunction) { return $this; } return $this->withProjectionFunction($projectionFunction); }
[ "public", "function", "updateProjection", "(", "Functions", "\\", "ElementProjection", "$", "projectionFunction", "=", "null", ")", "{", "if", "(", "$", "this", "->", "projectionFunction", "===", "$", "projectionFunction", ")", "{", "return", "$", "this", ";", ...
@param Functions\ElementProjection $projectionFunction @return static
[ "@param", "Functions", "\\", "ElementProjection", "$projectionFunction" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Queries/Requests/ProjectionRequestBase.php#L51-L58
TimeToogo/Pinq
Source/Iterators/Common/Set.php
Set.contains
public function contains($value) { return $value === null ? array_key_exists(Identity::hash(null), $this->values) : isset($this->values[Identity::hash($value)]); }
php
public function contains($value) { return $value === null ? array_key_exists(Identity::hash(null), $this->values) : isset($this->values[Identity::hash($value)]); }
[ "public", "function", "contains", "(", "$", "value", ")", "{", "return", "$", "value", "===", "null", "?", "array_key_exists", "(", "Identity", "::", "hash", "(", "null", ")", ",", "$", "this", "->", "values", ")", ":", "isset", "(", "$", "this", "->...
{@inheritDoc}
[ "{" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Iterators/Common/Set.php#L43-L46
TimeToogo/Pinq
Source/Iterators/Common/Set.php
Set.addRef
public function addRef(&$value) { $identityHash = Identity::hash($value); if (isset($this->values[$identityHash]) || array_key_exists($identityHash, $this->values)) { return false; } $this->values[$identityHash] =& $value; $this->length++; return true; ...
php
public function addRef(&$value) { $identityHash = Identity::hash($value); if (isset($this->values[$identityHash]) || array_key_exists($identityHash, $this->values)) { return false; } $this->values[$identityHash] =& $value; $this->length++; return true; ...
[ "public", "function", "addRef", "(", "&", "$", "value", ")", "{", "$", "identityHash", "=", "Identity", "::", "hash", "(", "$", "value", ")", ";", "if", "(", "isset", "(", "$", "this", "->", "values", "[", "$", "identityHash", "]", ")", "||", "arra...
{@inheritDoc}
[ "{" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Iterators/Common/Set.php#L59-L71
TimeToogo/Pinq
Source/Parsing/FunctionSignature.php
FunctionSignature.fromReflection
public static function fromReflection(\ReflectionFunctionAbstract $reflection) { $returnsReference = $reflection->returnsReference(); $name = $reflection->getShortName(); $parameterExpressions = self::getParameterExpressionsFromReflection($reflection); if ($refle...
php
public static function fromReflection(\ReflectionFunctionAbstract $reflection) { $returnsReference = $reflection->returnsReference(); $name = $reflection->getShortName(); $parameterExpressions = self::getParameterExpressionsFromReflection($reflection); if ($refle...
[ "public", "static", "function", "fromReflection", "(", "\\", "ReflectionFunctionAbstract", "$", "reflection", ")", "{", "$", "returnsReference", "=", "$", "reflection", "->", "returnsReference", "(", ")", ";", "$", "name", "=", "$", "reflection", "->", "getShort...
Creates a function signature instance from the supplied reflection. @param \ReflectionFunctionAbstract $reflection @return self
[ "Creates", "a", "function", "signature", "instance", "from", "the", "supplied", "reflection", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Parsing/FunctionSignature.php#L115-L159
TimeToogo/Pinq
Source/Parsing/FunctionSignature.php
FunctionSignature.func
public static function func( $returnsReference, $name, array $parameterExpressions ) { return new self( self::TYPE_FUNCTION, $returnsReference, null, null, null, $name, ...
php
public static function func( $returnsReference, $name, array $parameterExpressions ) { return new self( self::TYPE_FUNCTION, $returnsReference, null, null, null, $name, ...
[ "public", "static", "function", "func", "(", "$", "returnsReference", ",", "$", "name", ",", "array", "$", "parameterExpressions", ")", "{", "return", "new", "self", "(", "self", "::", "TYPE_FUNCTION", ",", "$", "returnsReference", ",", "null", ",", "null", ...
Creates a function signature with the supplied parameters. @param boolean $returnsReference @param string $name @param O\ParameterExpression[] $parameterExpressions @return self
[ "Creates", "a", "function", "signature", "with", "the", "supplied", "parameters", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Parsing/FunctionSignature.php#L170-L184
TimeToogo/Pinq
Source/Parsing/FunctionSignature.php
FunctionSignature.closure
public static function closure( $returnsReference, array $parameterExpressions, array $scopedVariableNames ) { return new self( self::TYPE_CLOSURE, $returnsReference, null, null, null, ...
php
public static function closure( $returnsReference, array $parameterExpressions, array $scopedVariableNames ) { return new self( self::TYPE_CLOSURE, $returnsReference, null, null, null, ...
[ "public", "static", "function", "closure", "(", "$", "returnsReference", ",", "array", "$", "parameterExpressions", ",", "array", "$", "scopedVariableNames", ")", "{", "return", "new", "self", "(", "self", "::", "TYPE_CLOSURE", ",", "$", "returnsReference", ",",...
Creates a closure signature with the supplied parameters. @param boolean $returnsReference @param O\ParameterExpression[] $parameterExpressions @param string[] $scopedVariableNames @return self
[ "Creates", "a", "closure", "signature", "with", "the", "supplied", "parameters", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Parsing/FunctionSignature.php#L195-L209
TimeToogo/Pinq
Source/Parsing/FunctionSignature.php
FunctionSignature.method
public static function method( $returnsReference, $accessModifier, $polymorphModifier, $isStatic, $name, array $parameterExpressions ) { return new self( self::TYPE_METHOD, $returnsReference, ...
php
public static function method( $returnsReference, $accessModifier, $polymorphModifier, $isStatic, $name, array $parameterExpressions ) { return new self( self::TYPE_METHOD, $returnsReference, ...
[ "public", "static", "function", "method", "(", "$", "returnsReference", ",", "$", "accessModifier", ",", "$", "polymorphModifier", ",", "$", "isStatic", ",", "$", "name", ",", "array", "$", "parameterExpressions", ")", "{", "return", "new", "self", "(", "sel...
Creates a method signature with the supplied parameters. @param boolean $returnsReference @param int|null $accessModifier @param int|null $polymorphModifier @param boolean $isStatic @param string $name @param O\ParameterExpression[] $parame...
[ "Creates", "a", "method", "signature", "with", "the", "supplied", "parameters", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Parsing/FunctionSignature.php#L223-L240
TimeToogo/Pinq
Source/Expressions/Expression.php
Expression.simplifyAll
final public static function simplifyAll( array $expressions, IEvaluationContext $context = null ) { $simplifiedExpressions = []; foreach ($expressions as $expression) { $simplifiedExpressions[] = $expression->simplify($context); } return $simplif...
php
final public static function simplifyAll( array $expressions, IEvaluationContext $context = null ) { $simplifiedExpressions = []; foreach ($expressions as $expression) { $simplifiedExpressions[] = $expression->simplify($context); } return $simplif...
[ "final", "public", "static", "function", "simplifyAll", "(", "array", "$", "expressions", ",", "IEvaluationContext", "$", "context", "=", "null", ")", "{", "$", "simplifiedExpressions", "=", "[", "]", ";", "foreach", "(", "$", "expressions", "as", "$", "expr...
@param Expression[] $expressions @param IEvaluationContext $context @return Expression[]
[ "@param", "Expression", "[]", "$expressions", "@param", "IEvaluationContext", "$context" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/Expression.php#L46-L56
TimeToogo/Pinq
Source/Expressions/Expression.php
Expression.verifyAll
final protected static function verifyAll(array $expressions, $type = __CLASS__) { foreach ($expressions as $key => $expression) { if (!($expression instanceof $type)) { throw new PinqException( 'Invalid array of expressions: invalid expression of type %s ...
php
final protected static function verifyAll(array $expressions, $type = __CLASS__) { foreach ($expressions as $key => $expression) { if (!($expression instanceof $type)) { throw new PinqException( 'Invalid array of expressions: invalid expression of type %s ...
[ "final", "protected", "static", "function", "verifyAll", "(", "array", "$", "expressions", ",", "$", "type", "=", "__CLASS__", ")", "{", "foreach", "(", "$", "expressions", "as", "$", "key", "=>", "$", "expression", ")", "{", "if", "(", "!", "(", "$", ...
Verifies the supplied array only contains expressions of the supplied type. @param mixed[] $expressions @param string $type @return Expression[] @throws PinqException If the array contains invalid expressions.
[ "Verifies", "the", "supplied", "array", "only", "contains", "expressions", "of", "the", "supplied", "type", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/Expression.php#L84-L97
TimeToogo/Pinq
Source/Expressions/Expression.php
Expression.asEvaluator
public function asEvaluator(IEvaluationContext $context = null) { return CompiledEvaluator::fromExpressions([Expression::returnExpression($this)], $context); }
php
public function asEvaluator(IEvaluationContext $context = null) { return CompiledEvaluator::fromExpressions([Expression::returnExpression($this)], $context); }
[ "public", "function", "asEvaluator", "(", "IEvaluationContext", "$", "context", "=", "null", ")", "{", "return", "CompiledEvaluator", "::", "fromExpressions", "(", "[", "Expression", "::", "returnExpression", "(", "$", "this", ")", "]", ",", "$", "context", ")...
Creates an expression evaluator for the expression with the supplied context. @param IEvaluationContext|null $context @return IEvaluator
[ "Creates", "an", "expression", "evaluator", "for", "the", "expression", "with", "the", "supplied", "context", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/Expression.php#L114-L117
TimeToogo/Pinq
Source/Expressions/Expression.php
Expression.compileDebug
final public function compileDebug() { return (new DynamicExpressionWalker([ ValueExpression::getType() => function (ValueExpression $expression) { $value = $expression->getValue(); return !is_scalar($value) && ...
php
final public function compileDebug() { return (new DynamicExpressionWalker([ ValueExpression::getType() => function (ValueExpression $expression) { $value = $expression->getValue(); return !is_scalar($value) && ...
[ "final", "public", "function", "compileDebug", "(", ")", "{", "return", "(", "new", "DynamicExpressionWalker", "(", "[", "ValueExpression", "::", "getType", "(", ")", "=>", "function", "(", "ValueExpression", "$", "expression", ")", "{", "$", "value", "=", "...
Compiles the expression tree into debug code. @return string
[ "Compiles", "the", "expression", "tree", "into", "debug", "code", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/Expression.php#L235-L250
TimeToogo/Pinq
Source/Expressions/Expression.php
Expression.allOfType
final public static function allOfType(array $expressions, $type, $allowNull = false) { foreach ($expressions as $expression) { if ($expression instanceof $type || $expression === null && $allowNull) { continue; } return false; } return t...
php
final public static function allOfType(array $expressions, $type, $allowNull = false) { foreach ($expressions as $expression) { if ($expression instanceof $type || $expression === null && $allowNull) { continue; } return false; } return t...
[ "final", "public", "static", "function", "allOfType", "(", "array", "$", "expressions", ",", "$", "type", ",", "$", "allowNull", "=", "false", ")", "{", "foreach", "(", "$", "expressions", "as", "$", "expression", ")", "{", "if", "(", "$", "expression", ...
Returns whether the expressions are all of the supplied type. @param Expression[] $expressions @param string $type @param boolean $allowNull @return boolean
[ "Returns", "whether", "the", "expressions", "are", "all", "of", "the", "supplied", "type", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/Expression.php#L263-L274
TimeToogo/Pinq
Source/Expressions/Expression.php
Expression.cloneAll
final public static function cloneAll(array $expressions) { return array_map( function (Expression $expression = null) { return $expression === null ? null : clone $expression; }, $expressions ); }
php
final public static function cloneAll(array $expressions) { return array_map( function (Expression $expression = null) { return $expression === null ? null : clone $expression; }, $expressions ); }
[ "final", "public", "static", "function", "cloneAll", "(", "array", "$", "expressions", ")", "{", "return", "array_map", "(", "function", "(", "Expression", "$", "expression", "=", "null", ")", "{", "return", "$", "expression", "===", "null", "?", "null", "...
@param Expression|null[] $expressions @return Expression|null[]
[ "@param", "Expression|null", "[]", "$expressions" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/Expression.php#L281-L289
TimeToogo/Pinq
Source/Expressions/Expression.php
Expression.assign
final public static function assign(Expression $assignToValue, $assignmentOperator, Expression $assignmentValue) { return new AssignmentExpression( $assignToValue, $assignmentOperator, $assignmentValue); }
php
final public static function assign(Expression $assignToValue, $assignmentOperator, Expression $assignmentValue) { return new AssignmentExpression( $assignToValue, $assignmentOperator, $assignmentValue); }
[ "final", "public", "static", "function", "assign", "(", "Expression", "$", "assignToValue", ",", "$", "assignmentOperator", ",", "Expression", "$", "assignmentValue", ")", "{", "return", "new", "AssignmentExpression", "(", "$", "assignToValue", ",", "$", "assignme...
@param Expression $assignToValue @param string $assignmentOperator @param Expression $assignmentValue @return AssignmentExpression
[ "@param", "Expression", "$assignToValue", "@param", "string", "$assignmentOperator", "@param", "Expression", "$assignmentValue" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/Expression.php#L298-L304
TimeToogo/Pinq
Source/Expressions/Expression.php
Expression.binaryOperation
final public static function binaryOperation(Expression $leftOperand, $operator, Expression $rightOperand) { return new BinaryOperationExpression( $leftOperand, $operator, $rightOperand); }
php
final public static function binaryOperation(Expression $leftOperand, $operator, Expression $rightOperand) { return new BinaryOperationExpression( $leftOperand, $operator, $rightOperand); }
[ "final", "public", "static", "function", "binaryOperation", "(", "Expression", "$", "leftOperand", ",", "$", "operator", ",", "Expression", "$", "rightOperand", ")", "{", "return", "new", "BinaryOperationExpression", "(", "$", "leftOperand", ",", "$", "operator", ...
@param Expression $leftOperand @param string $operator @param Expression $rightOperand @return BinaryOperationExpression
[ "@param", "Expression", "$leftOperand", "@param", "string", "$operator", "@param", "Expression", "$rightOperand" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/Expression.php#L313-L319
TimeToogo/Pinq
Source/Expressions/Expression.php
Expression.methodCall
final public static function methodCall(Expression $value, Expression $name, array $arguments = []) { return new MethodCallExpression( $value, $name, $arguments); }
php
final public static function methodCall(Expression $value, Expression $name, array $arguments = []) { return new MethodCallExpression( $value, $name, $arguments); }
[ "final", "public", "static", "function", "methodCall", "(", "Expression", "$", "value", ",", "Expression", "$", "name", ",", "array", "$", "arguments", "=", "[", "]", ")", "{", "return", "new", "MethodCallExpression", "(", "$", "value", ",", "$", "name", ...
@param Expression $value @param Expression $name @param ArgumentExpression[] $arguments @return MethodCallExpression
[ "@param", "Expression", "$value", "@param", "Expression", "$name", "@param", "ArgumentExpression", "[]", "$arguments" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/Expression.php#L350-L356
TimeToogo/Pinq
Source/Expressions/Expression.php
Expression.ternary
final public static function ternary(Expression $condition, Expression $ifTrue = null, Expression $ifFalse) { return new TernaryExpression( $condition, $ifTrue, $ifFalse); }
php
final public static function ternary(Expression $condition, Expression $ifTrue = null, Expression $ifFalse) { return new TernaryExpression( $condition, $ifTrue, $ifFalse); }
[ "final", "public", "static", "function", "ternary", "(", "Expression", "$", "condition", ",", "Expression", "$", "ifTrue", "=", "null", ",", "Expression", "$", "ifFalse", ")", "{", "return", "new", "TernaryExpression", "(", "$", "condition", ",", "$", "ifTru...
@param Expression $condition @param Expression $ifTrue @param Expression $ifFalse @return TernaryExpression
[ "@param", "Expression", "$condition", "@param", "Expression", "$ifTrue", "@param", "Expression", "$ifFalse" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/Expression.php#L480-L486
TimeToogo/Pinq
Source/Expressions/Expression.php
Expression.parameter
final public static function parameter( $name, $typeHint = null, Expression $defaultValue = null, $isPassedByReference = false, $isVariadic = false ) { return new ParameterExpression( $name, $typeHint, ...
php
final public static function parameter( $name, $typeHint = null, Expression $defaultValue = null, $isPassedByReference = false, $isVariadic = false ) { return new ParameterExpression( $name, $typeHint, ...
[ "final", "public", "static", "function", "parameter", "(", "$", "name", ",", "$", "typeHint", "=", "null", ",", "Expression", "$", "defaultValue", "=", "null", ",", "$", "isPassedByReference", "=", "false", ",", "$", "isVariadic", "=", "false", ")", "{", ...
@param string $name @param string|null $typeHint @param Expression $defaultValue @param boolean $isPassedByReference @param boolean $isVariadic @return ParameterExpression
[ "@param", "string", "$name", "@param", "string|null", "$typeHint", "@param", "Expression", "$defaultValue", "@param", "boolean", "$isPassedByReference", "@param", "boolean", "$isVariadic" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/Expression.php#L517-L530
TimeToogo/Pinq
Source/Expressions/Expression.php
Expression.arrayItem
final public static function arrayItem(Expression $key = null, Expression $value, $isReference = false) { return new ArrayItemExpression($key, $value, $isReference); }
php
final public static function arrayItem(Expression $key = null, Expression $value, $isReference = false) { return new ArrayItemExpression($key, $value, $isReference); }
[ "final", "public", "static", "function", "arrayItem", "(", "Expression", "$", "key", "=", "null", ",", "Expression", "$", "value", ",", "$", "isReference", "=", "false", ")", "{", "return", "new", "ArrayItemExpression", "(", "$", "key", ",", "$", "value", ...
@param Expression $key @param Expression $value @param boolean $isReference @return ArrayItemExpression
[ "@param", "Expression", "$key", "@param", "Expression", "$value", "@param", "boolean", "$isReference" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/Expression.php#L603-L606
TimeToogo/Pinq
Source/Expressions/Expression.php
Expression.closure
final public static function closure( $returnsReference, $isStatic, array $parameterExpressions, array $usedVariables, array $bodyExpressions ) { return new ClosureExpression( $returnsReference, $isStatic, ...
php
final public static function closure( $returnsReference, $isStatic, array $parameterExpressions, array $usedVariables, array $bodyExpressions ) { return new ClosureExpression( $returnsReference, $isStatic, ...
[ "final", "public", "static", "function", "closure", "(", "$", "returnsReference", ",", "$", "isStatic", ",", "array", "$", "parameterExpressions", ",", "array", "$", "usedVariables", ",", "array", "$", "bodyExpressions", ")", "{", "return", "new", "ClosureExpres...
@param boolean $returnsReference @param boolean $isStatic @param ParameterExpression[] $parameterExpressions @param ClosureUsedVariableExpression[] $usedVariables @param Expression[] $bodyExpressions @return ClosureExpression
[ "@param", "boolean", "$returnsReference", "@param", "boolean", "$isStatic", "@param", "ParameterExpression", "[]", "$parameterExpressions", "@param", "ClosureUsedVariableExpression", "[]", "$usedVariables", "@param", "Expression", "[]", "$bodyExpressions" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/Expression.php#L617-L630
TimeToogo/Pinq
Source/Providers/DSL/Compilation/Processors/Visitors/ScopeProcessor.php
ScopeProcessor.processSegments
protected function processSegments(array $segments) { $this->segments = []; foreach ($segments as $segment) { $this->segments[] = $segment->traverse($this); } return $this->segments; }
php
protected function processSegments(array $segments) { $this->segments = []; foreach ($segments as $segment) { $this->segments[] = $segment->traverse($this); } return $this->segments; }
[ "protected", "function", "processSegments", "(", "array", "$", "segments", ")", "{", "$", "this", "->", "segments", "=", "[", "]", ";", "foreach", "(", "$", "segments", "as", "$", "segment", ")", "{", "$", "this", "->", "segments", "[", "]", "=", "$"...
@param Queries\ISegment[] $segments @return Queries\ISegment[]
[ "@param", "Queries", "\\", "ISegment", "[]", "$segments" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Providers/DSL/Compilation/Processors/Visitors/ScopeProcessor.php#L26-L35
TimeToogo/Pinq
Source/Caching/CacheProvider.php
CacheProvider.setDirectoryCache
public static function setDirectoryCache($directory, $fileExtension = DirectoryCache::DEFAULT_EXTENSION) { self::$cacheImplementation = new DirectoryCache($directory, $fileExtension); self::$hasBeenCleared = false; }
php
public static function setDirectoryCache($directory, $fileExtension = DirectoryCache::DEFAULT_EXTENSION) { self::$cacheImplementation = new DirectoryCache($directory, $fileExtension); self::$hasBeenCleared = false; }
[ "public", "static", "function", "setDirectoryCache", "(", "$", "directory", ",", "$", "fileExtension", "=", "DirectoryCache", "::", "DEFAULT_EXTENSION", ")", "{", "self", "::", "$", "cacheImplementation", "=", "new", "DirectoryCache", "(", "$", "directory", ",", ...
Uses the supplied directory to store the parsed queries. @param string $directory The directory to cache the data @param string $fileExtension The file extension for every cache file @return void
[ "Uses", "the", "supplied", "directory", "to", "store", "the", "parsed", "queries", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Caching/CacheProvider.php#L102-L106
TimeToogo/Pinq
Source/Caching/CacheProvider.php
CacheProvider.setDoctrineCache
public static function setDoctrineCache(DoctrineCacheProvider $cache) { self::$cacheImplementation = new DoctrineCache($cache); self::$hasBeenCleared = false; }
php
public static function setDoctrineCache(DoctrineCacheProvider $cache) { self::$cacheImplementation = new DoctrineCache($cache); self::$hasBeenCleared = false; }
[ "public", "static", "function", "setDoctrineCache", "(", "DoctrineCacheProvider", "$", "cache", ")", "{", "self", "::", "$", "cacheImplementation", "=", "new", "DoctrineCache", "(", "$", "cache", ")", ";", "self", "::", "$", "hasBeenCleared", "=", "false", ";"...
Uses the supplied doctrine cache to store the parsed queries. @param DoctrineCacheProvider $cache The doctrine cache @return void
[ "Uses", "the", "supplied", "doctrine", "cache", "to", "store", "the", "parsed", "queries", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Caching/CacheProvider.php#L115-L119
TimeToogo/Pinq
Source/Caching/CacheProvider.php
CacheProvider.setArrayAccessCache
public static function setArrayAccessCache(\ArrayAccess $cache) { self::$cacheImplementation = new ArrayAccessCacheAdapter($cache); self::$hasBeenCleared = false; }
php
public static function setArrayAccessCache(\ArrayAccess $cache) { self::$cacheImplementation = new ArrayAccessCacheAdapter($cache); self::$hasBeenCleared = false; }
[ "public", "static", "function", "setArrayAccessCache", "(", "\\", "ArrayAccess", "$", "cache", ")", "{", "self", "::", "$", "cacheImplementation", "=", "new", "ArrayAccessCacheAdapter", "(", "$", "cache", ")", ";", "self", "::", "$", "hasBeenCleared", "=", "fa...
Uses the supplied array access cache to store the parsed queries. @param \ArrayAccess $cache The array access cache @return void
[ "Uses", "the", "supplied", "array", "access", "cache", "to", "store", "the", "parsed", "queries", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Caching/CacheProvider.php#L128-L132
TimeToogo/Pinq
Source/Iterators/Common/OrderedIterator.php
OrderedIterator.thenOrderBy
final public function thenOrderBy(callable $orderByFunction, $isAscending) { $newOrderedIterator = new self($this->getSourceIterator(), function () { }, true); $newOrderedIterator->orderByFunctions = $this->orderByFunctions; $newOrderedIterator->isAscendingArray = $this->isAscen...
php
final public function thenOrderBy(callable $orderByFunction, $isAscending) { $newOrderedIterator = new self($this->getSourceIterator(), function () { }, true); $newOrderedIterator->orderByFunctions = $this->orderByFunctions; $newOrderedIterator->isAscendingArray = $this->isAscen...
[ "final", "public", "function", "thenOrderBy", "(", "callable", "$", "orderByFunction", ",", "$", "isAscending", ")", "{", "$", "newOrderedIterator", "=", "new", "self", "(", "$", "this", "->", "getSourceIterator", "(", ")", ",", "function", "(", ")", "{", ...
@param callable $orderByFunction @param boolean $isAscending @return IOrderedIterator
[ "@param", "callable", "$orderByFunction", "@param", "boolean", "$isAscending" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Iterators/Common/OrderedIterator.php#L38-L49
TimeToogo/Pinq
Source/Expressions/TraversalExpression.php
TraversalExpression.updateValue
final public function updateValue(Expression $value) { if ($this->value === $value) { return $this; } return $this->updateValueExpression($value); }
php
final public function updateValue(Expression $value) { if ($this->value === $value) { return $this; } return $this->updateValueExpression($value); }
[ "final", "public", "function", "updateValue", "(", "Expression", "$", "value", ")", "{", "if", "(", "$", "this", "->", "value", "===", "$", "value", ")", "{", "return", "$", "this", ";", "}", "return", "$", "this", "->", "updateValueExpression", "(", "...
@param Expression $value @return static
[ "@param", "Expression", "$value" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/TraversalExpression.php#L35-L42
TimeToogo/Pinq
Source/Queries/Functions/FunctionEvaluationContextFactory.php
FunctionEvaluationContextFactory.getEvaluationContext
public function getEvaluationContext(IResolvedParameterRegistry $parameters = null) { $thisObject = null; $variableTable = array_fill_keys($this->parameterScopedVariableMap, null); unset($variableTable['this']); if ($parameters !== null) { foreach ($this->parameterSco...
php
public function getEvaluationContext(IResolvedParameterRegistry $parameters = null) { $thisObject = null; $variableTable = array_fill_keys($this->parameterScopedVariableMap, null); unset($variableTable['this']); if ($parameters !== null) { foreach ($this->parameterSco...
[ "public", "function", "getEvaluationContext", "(", "IResolvedParameterRegistry", "$", "parameters", "=", "null", ")", "{", "$", "thisObject", "=", "null", ";", "$", "variableTable", "=", "array_fill_keys", "(", "$", "this", "->", "parameterScopedVariableMap", ",", ...
Gets an evaluation context for function with the resolved parameters. @param IResolvedParameterRegistry|null $parameters @return O\IEvaluationContext
[ "Gets", "an", "evaluation", "context", "for", "function", "with", "the", "resolved", "parameters", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Queries/Functions/FunctionEvaluationContextFactory.php#L123-L144
TimeToogo/Pinq
Source/Providers/DSL/RepositoryCompilerConfiguration.php
RepositoryCompilerConfiguration.buildCompiledOperationQuery
protected function buildCompiledOperationQuery(Queries\IOperationQuery $query) { $compiler = $this->getOperationQueryCompiler($query); $compiler->compile(); return $compiler->getCompilation()->asCompiled(); }
php
protected function buildCompiledOperationQuery(Queries\IOperationQuery $query) { $compiler = $this->getOperationQueryCompiler($query); $compiler->compile(); return $compiler->getCompilation()->asCompiled(); }
[ "protected", "function", "buildCompiledOperationQuery", "(", "Queries", "\\", "IOperationQuery", "$", "query", ")", "{", "$", "compiler", "=", "$", "this", "->", "getOperationQueryCompiler", "(", "$", "query", ")", ";", "$", "compiler", "->", "compile", "(", "...
@param Queries\IOperationQuery $query @return Compilation\ICompiledOperation
[ "@param", "Queries", "\\", "IOperationQuery", "$query" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Providers/DSL/RepositoryCompilerConfiguration.php#L109-L115
TimeToogo/Pinq
Source/Expressions/MethodCallExpression.php
MethodCallExpression.update
public function update( Expression $value, Expression $name, array $arguments ) { if ($this->value === $value && $this->name === $name && $this->arguments === $arguments ) { return $this; } return new se...
php
public function update( Expression $value, Expression $name, array $arguments ) { if ($this->value === $value && $this->name === $name && $this->arguments === $arguments ) { return $this; } return new se...
[ "public", "function", "update", "(", "Expression", "$", "value", ",", "Expression", "$", "name", ",", "array", "$", "arguments", ")", "{", "if", "(", "$", "this", "->", "value", "===", "$", "value", "&&", "$", "this", "->", "name", "===", "$", "name"...
@param Expression $value @param Expression $name @param ArgumentExpression[] $arguments @return MethodCallExpression
[ "@param", "Expression", "$value", "@param", "Expression", "$name", "@param", "ArgumentExpression", "[]", "$arguments" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/MethodCallExpression.php#L59-L75
TimeToogo/Pinq
Source/Collection.php
Collection.from
public static function from($elements, Iterators\IIteratorScheme $scheme = null, Traversable $source = null) { if ($source !== null && !($source instanceof Collection)) { throw new PinqException( 'Cannot construct %s: expecting source to be type %s or null, %s given', ...
php
public static function from($elements, Iterators\IIteratorScheme $scheme = null, Traversable $source = null) { if ($source !== null && !($source instanceof Collection)) { throw new PinqException( 'Cannot construct %s: expecting source to be type %s or null, %s given', ...
[ "public", "static", "function", "from", "(", "$", "elements", ",", "Iterators", "\\", "IIteratorScheme", "$", "scheme", "=", "null", ",", "Traversable", "$", "source", "=", "null", ")", "{", "if", "(", "$", "source", "!==", "null", "&&", "!", "(", "$",...
{@inheritDoc} @param Collection|null $source
[ "{" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Collection.php#L39-L50
TimeToogo/Pinq
Source/Queries/Operations/RemoveWhere.php
RemoveWhere.update
public function update(Functions\ElementProjection $predicateFunction) { if ($this->predicateFunction === $predicateFunction) { return $this; } return new self($predicateFunction); }
php
public function update(Functions\ElementProjection $predicateFunction) { if ($this->predicateFunction === $predicateFunction) { return $this; } return new self($predicateFunction); }
[ "public", "function", "update", "(", "Functions", "\\", "ElementProjection", "$", "predicateFunction", ")", "{", "if", "(", "$", "this", "->", "predicateFunction", "===", "$", "predicateFunction", ")", "{", "return", "$", "this", ";", "}", "return", "new", "...
@param Functions\ElementProjection $predicateFunction @return RemoveWhere
[ "@param", "Functions", "\\", "ElementProjection", "$predicateFunction" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Queries/Operations/RemoveWhere.php#L52-L59
TimeToogo/Pinq
Source/Queries/Common/Join/Filter/Equality.php
Equality.update
public function update( Functions\ElementProjection $outerKeyFunction, Functions\ElementProjection $innerKeyFunction ) { if ($this->outerKeyFunction === $outerKeyFunction && $this->innerKeyFunction === $innerKeyFunction ) { return $this; } ...
php
public function update( Functions\ElementProjection $outerKeyFunction, Functions\ElementProjection $innerKeyFunction ) { if ($this->outerKeyFunction === $outerKeyFunction && $this->innerKeyFunction === $innerKeyFunction ) { return $this; } ...
[ "public", "function", "update", "(", "Functions", "\\", "ElementProjection", "$", "outerKeyFunction", ",", "Functions", "\\", "ElementProjection", "$", "innerKeyFunction", ")", "{", "if", "(", "$", "this", "->", "outerKeyFunction", "===", "$", "outerKeyFunction", ...
@param Functions\ElementProjection $outerKeyFunction @param Functions\ElementProjection $innerKeyFunction @return Equality
[ "@param", "Functions", "\\", "ElementProjection", "$outerKeyFunction", "@param", "Functions", "\\", "ElementProjection", "$innerKeyFunction" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Queries/Common/Join/Filter/Equality.php#L75-L86
TimeToogo/Pinq
Source/Parsing/Reflection.php
Reflection.fromCallable
final public static function fromCallable(callable $function) { // If is array it could be an instance or static method: // ['class', 'method'] or [$instance, 'method']; if (is_array($function)) { return new \ReflectionMethod($function[0], $function[1]); } // If i...
php
final public static function fromCallable(callable $function) { // If is array it could be an instance or static method: // ['class', 'method'] or [$instance, 'method']; if (is_array($function)) { return new \ReflectionMethod($function[0], $function[1]); } // If i...
[ "final", "public", "static", "function", "fromCallable", "(", "callable", "$", "function", ")", "{", "// If is array it could be an instance or static method:", "// ['class', 'method'] or [$instance, 'method'];", "if", "(", "is_array", "(", "$", "function", ")", ")", "{", ...
@param callable $function @return \ReflectionFunctionAbstract @throws InvalidFunctionException
[ "@param", "callable", "$function" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Parsing/Reflection.php#L24-L61
TimeToogo/Pinq
Source/Parsing/Reflection.php
Reflection.isVariadic
public static function isVariadic(\ReflectionFunctionAbstract $function) { if (self::$supportsVariadicParameters === null) { self::$supportsVariadicParameters = method_exists('\ReflectionParameter', 'isVariadic'); } foreach ($function->getParameters() as $parameter) { ...
php
public static function isVariadic(\ReflectionFunctionAbstract $function) { if (self::$supportsVariadicParameters === null) { self::$supportsVariadicParameters = method_exists('\ReflectionParameter', 'isVariadic'); } foreach ($function->getParameters() as $parameter) { ...
[ "public", "static", "function", "isVariadic", "(", "\\", "ReflectionFunctionAbstract", "$", "function", ")", "{", "if", "(", "self", "::", "$", "supportsVariadicParameters", "===", "null", ")", "{", "self", "::", "$", "supportsVariadicParameters", "=", "method_exi...
@param \ReflectionFunctionAbstract $function @return boolean
[ "@param", "\\", "ReflectionFunctionAbstract", "$function" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Parsing/Reflection.php#L70-L85
TimeToogo/Pinq
Source/Providers/Traversable/ScopeEvaluator.php
ScopeEvaluator.evaluateJoinOptions
public static function evaluateJoinOptions( ITraversable $traversable, Common\Join\Options $join, Queries\IResolvedParameterRegistry $resolvedParameters ) { $values = self::evaluateSource($join->getSource(), $resolvedParameters); $joiningTraversable = ...
php
public static function evaluateJoinOptions( ITraversable $traversable, Common\Join\Options $join, Queries\IResolvedParameterRegistry $resolvedParameters ) { $values = self::evaluateSource($join->getSource(), $resolvedParameters); $joiningTraversable = ...
[ "public", "static", "function", "evaluateJoinOptions", "(", "ITraversable", "$", "traversable", ",", "Common", "\\", "Join", "\\", "Options", "$", "join", ",", "Queries", "\\", "IResolvedParameterRegistry", "$", "resolvedParameters", ")", "{", "$", "values", "=", ...
Evaluates the join segment values and filter upon the supplied traversable. @param ITraversable $traversable @param Common\Join\Options $join @param Queries\IResolvedParameterRegistry $resolvedParameters @return \Pinq\Interfaces\IJoiningToTraversable
[ "Evaluates", "the", "join", "segment", "values", "and", "filter", "upon", "the", "supplied", "traversable", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Providers/Traversable/ScopeEvaluator.php#L121-L152
TimeToogo/Pinq
Source/Providers/DSL/Compilation/Processors/Expression/ProcessorFactory.php
ProcessorFactory.from
public static function from(Queries\IQuery $query, IExpressionProcessor $expressionProcessor) { if ($query instanceof Queries\IRequestQuery) { return new RequestQueryProcessor($expressionProcessor, $query); } elseif ($query instanceof Queries\IOperationQuery) { return new Ope...
php
public static function from(Queries\IQuery $query, IExpressionProcessor $expressionProcessor) { if ($query instanceof Queries\IRequestQuery) { return new RequestQueryProcessor($expressionProcessor, $query); } elseif ($query instanceof Queries\IOperationQuery) { return new Ope...
[ "public", "static", "function", "from", "(", "Queries", "\\", "IQuery", "$", "query", ",", "IExpressionProcessor", "$", "expressionProcessor", ")", "{", "if", "(", "$", "query", "instanceof", "Queries", "\\", "IRequestQuery", ")", "{", "return", "new", "Reques...
Builds a query processor from the supplied query. @param Queries\IQuery $query @param IExpressionProcessor $expressionProcessor @return OperationQueryProcessor|RequestQueryProcessor
[ "Builds", "a", "query", "processor", "from", "the", "supplied", "query", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Providers/DSL/Compilation/Processors/Expression/ProcessorFactory.php#L22-L29
TimeToogo/Pinq
Source/Parsing/InvalidFunctionException.php
InvalidFunctionException.invalidFunctionMessage
public static function invalidFunctionMessage($messageFormat, \ReflectionFunctionAbstract $reflection) { return self::construct( array_merge( [ 'Invalid function %s defined in %s lines %d-%d: ' . $messageFormat, ...
php
public static function invalidFunctionMessage($messageFormat, \ReflectionFunctionAbstract $reflection) { return self::construct( array_merge( [ 'Invalid function %s defined in %s lines %d-%d: ' . $messageFormat, ...
[ "public", "static", "function", "invalidFunctionMessage", "(", "$", "messageFormat", ",", "\\", "ReflectionFunctionAbstract", "$", "reflection", ")", "{", "return", "self", "::", "construct", "(", "array_merge", "(", "[", "'Invalid function %s defined in %s lines %d-%d: '...
@param string $messageFormat @param \ReflectionFunctionAbstract $reflection @return self
[ "@param", "string", "$messageFormat", "@param", "\\", "ReflectionFunctionAbstract", "$reflection" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Parsing/InvalidFunctionException.php#L21-L35
TimeToogo/Pinq
Source/Expressions/Operators/Cast.php
Cast.doCast
public static function doCast($castTypeOperator, $value) { if (!isset(self::$castTypeMap[$castTypeOperator])) { throw new PinqException('Cast operator \'%s\' is not supported', $castTypeOperator); } settype($value, self::$castTypeMap[$castTypeOperator]); return $value; ...
php
public static function doCast($castTypeOperator, $value) { if (!isset(self::$castTypeMap[$castTypeOperator])) { throw new PinqException('Cast operator \'%s\' is not supported', $castTypeOperator); } settype($value, self::$castTypeMap[$castTypeOperator]); return $value; ...
[ "public", "static", "function", "doCast", "(", "$", "castTypeOperator", ",", "$", "value", ")", "{", "if", "(", "!", "isset", "(", "self", "::", "$", "castTypeMap", "[", "$", "castTypeOperator", "]", ")", ")", "{", "throw", "new", "PinqException", "(", ...
Performs the cast operation on the supplied value. @param string $castTypeOperator @param mixed $value @return mixed @throws PinqException
[ "Performs", "the", "cast", "operation", "on", "the", "supplied", "value", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/Operators/Cast.php#L39-L48
TimeToogo/Pinq
Source/Parsing/FunctionLocation.php
FunctionLocation.fromReflection
public static function fromReflection(\ReflectionFunctionAbstract $reflection) { if ($reflection instanceof \ReflectionFunction) { $namespace = $reflection->getNamespaceName(); } elseif ($reflection instanceof \ReflectionMethod) { $namespace = $reflection->getDeclaringClass()...
php
public static function fromReflection(\ReflectionFunctionAbstract $reflection) { if ($reflection instanceof \ReflectionFunction) { $namespace = $reflection->getNamespaceName(); } elseif ($reflection instanceof \ReflectionMethod) { $namespace = $reflection->getDeclaringClass()...
[ "public", "static", "function", "fromReflection", "(", "\\", "ReflectionFunctionAbstract", "$", "reflection", ")", "{", "if", "(", "$", "reflection", "instanceof", "\\", "ReflectionFunction", ")", "{", "$", "namespace", "=", "$", "reflection", "->", "getNamespaceN...
Creates a function location instance from the supplied reflection. @param \ReflectionFunctionAbstract $reflection @return self
[ "Creates", "a", "function", "location", "instance", "from", "the", "supplied", "reflection", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Parsing/FunctionLocation.php#L66-L81
TimeToogo/Pinq
Source/Analysis/TypeSystem.php
TypeSystem.flattenComposedTypes
protected function flattenComposedTypes(array $types) { $composedTypes = []; foreach ($types as $type) { if ($type instanceof ICompositeType) { $composedTypes += $this->flattenComposedTypes($type->getComposedTypes()); } else { $composedTypes[$t...
php
protected function flattenComposedTypes(array $types) { $composedTypes = []; foreach ($types as $type) { if ($type instanceof ICompositeType) { $composedTypes += $this->flattenComposedTypes($type->getComposedTypes()); } else { $composedTypes[$t...
[ "protected", "function", "flattenComposedTypes", "(", "array", "$", "types", ")", "{", "$", "composedTypes", "=", "[", "]", ";", "foreach", "(", "$", "types", "as", "$", "type", ")", "{", "if", "(", "$", "type", "instanceof", "ICompositeType", ")", "{", ...
Flattens all the composed types. @param IType[] $types @return IType[]
[ "Flattens", "all", "the", "composed", "types", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Analysis/TypeSystem.php#L207-L219
TimeToogo/Pinq
Source/Expressions/ReturnExpression.php
ReturnExpression.update
public function update(Expression $value = null) { if ($this->value === $value) { return $this; } return new self($value); }
php
public function update(Expression $value = null) { if ($this->value === $value) { return $this; } return new self($value); }
[ "public", "function", "update", "(", "Expression", "$", "value", "=", "null", ")", "{", "if", "(", "$", "this", "->", "value", "===", "$", "value", ")", "{", "return", "$", "this", ";", "}", "return", "new", "self", "(", "$", "value", ")", ";", "...
@param Expression $value @return self
[ "@param", "Expression", "$value" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/ReturnExpression.php#L60-L67
TimeToogo/Pinq
Source/Queries/Builders/OperationQueryBuilder.php
OperationQueryBuilder.buildOperationQuery
protected function buildOperationQuery( Queries\IScope $scope, Queries\IOperation $operation ) { return new Queries\OperationQuery($scope, $operation); }
php
protected function buildOperationQuery( Queries\IScope $scope, Queries\IOperation $operation ) { return new Queries\OperationQuery($scope, $operation); }
[ "protected", "function", "buildOperationQuery", "(", "Queries", "\\", "IScope", "$", "scope", ",", "Queries", "\\", "IOperation", "$", "operation", ")", "{", "return", "new", "Queries", "\\", "OperationQuery", "(", "$", "scope", ",", "$", "operation", ")", "...
@param Queries\IScope $scope @param Queries\IOperation $operation @return Queries\IOperationQuery
[ "@param", "Queries", "\\", "IScope", "$scope", "@param", "Queries", "\\", "IOperation", "$operation" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Queries/Builders/OperationQueryBuilder.php#L41-L46
TimeToogo/Pinq
Source/Queries/Builders/OperationQueryBuilder.php
OperationQueryBuilder.buildOperationQueryInterpreter
protected function buildOperationQueryInterpreter( Interpretations\IOperationInterpretation $operationInterpretation, IScopeInterpreter $scopeInterpreter, O\IEvaluationContext $evaluationContext = null ) { return new OperationQueryInterpreter($operationInterpretation, $sc...
php
protected function buildOperationQueryInterpreter( Interpretations\IOperationInterpretation $operationInterpretation, IScopeInterpreter $scopeInterpreter, O\IEvaluationContext $evaluationContext = null ) { return new OperationQueryInterpreter($operationInterpretation, $sc...
[ "protected", "function", "buildOperationQueryInterpreter", "(", "Interpretations", "\\", "IOperationInterpretation", "$", "operationInterpretation", ",", "IScopeInterpreter", "$", "scopeInterpreter", ",", "O", "\\", "IEvaluationContext", "$", "evaluationContext", "=", "null",...
@param Interpretations\IOperationInterpretation $operationInterpretation @param IScopeInterpreter $scopeInterpreter @param O\IEvaluationContext $evaluationContext @return IOperationQueryInterpreter
[ "@param", "Interpretations", "\\", "IOperationInterpretation", "$operationInterpretation", "@param", "IScopeInterpreter", "$scopeInterpreter", "@param", "O", "\\", "IEvaluationContext", "$evaluationContext" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Queries/Builders/OperationQueryBuilder.php#L86-L92
TimeToogo/Pinq
Source/Providers/DSL/Compilation/Parameters/ParameterCollection.php
ParameterCollection.addExpression
public function addExpression( O\Expression $expression, IParameterHasher $hasher, IFunction $context = null, $data = null ) { $this->parameters[] = new ExpressionParameter($expression, $hasher, $context, $data); }
php
public function addExpression( O\Expression $expression, IParameterHasher $hasher, IFunction $context = null, $data = null ) { $this->parameters[] = new ExpressionParameter($expression, $hasher, $context, $data); }
[ "public", "function", "addExpression", "(", "O", "\\", "Expression", "$", "expression", ",", "IParameterHasher", "$", "hasher", ",", "IFunction", "$", "context", "=", "null", ",", "$", "data", "=", "null", ")", "{", "$", "this", "->", "parameters", "[", ...
Adds an expression parameter to the collection. @param O\Expression $expression @param IParameterHasher $hasher @param IFunction|null $context @param mixed $data @return void
[ "Adds", "an", "expression", "parameter", "to", "the", "collection", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Providers/DSL/Compilation/Parameters/ParameterCollection.php#L30-L37
TimeToogo/Pinq
Source/Providers/DSL/Compilation/Parameters/ParameterCollection.php
ParameterCollection.addId
public function addId($parameterId, IParameterHasher $hasher, $data = null) { $this->parameters[] = new StandardParameter($parameterId, $hasher, $data); }
php
public function addId($parameterId, IParameterHasher $hasher, $data = null) { $this->parameters[] = new StandardParameter($parameterId, $hasher, $data); }
[ "public", "function", "addId", "(", "$", "parameterId", ",", "IParameterHasher", "$", "hasher", ",", "$", "data", "=", "null", ")", "{", "$", "this", "->", "parameters", "[", "]", "=", "new", "StandardParameter", "(", "$", "parameterId", ",", "$", "hashe...
Adds a standard parameter id to the collection. @param $parameterId @param IParameterHasher $hasher @param mixed $data @return void
[ "Adds", "a", "standard", "parameter", "id", "to", "the", "collection", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Providers/DSL/Compilation/Parameters/ParameterCollection.php#L48-L51
TimeToogo/Pinq
Source/Providers/DSL/Compilation/Parameters/ParameterCollection.php
ParameterCollection.remove
public function remove(IQueryParameter $parameter) { foreach($this->parameters as $key => $someParameter) { if($someParameter === $parameter) { unset($this->parameters[$key]); } } }
php
public function remove(IQueryParameter $parameter) { foreach($this->parameters as $key => $someParameter) { if($someParameter === $parameter) { unset($this->parameters[$key]); } } }
[ "public", "function", "remove", "(", "IQueryParameter", "$", "parameter", ")", "{", "foreach", "(", "$", "this", "->", "parameters", "as", "$", "key", "=>", "$", "someParameter", ")", "{", "if", "(", "$", "someParameter", "===", "$", "parameter", ")", "{...
Removes a query parameter from the collection. @param IQueryParameter $parameter @return void
[ "Removes", "a", "query", "parameter", "from", "the", "collection", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Providers/DSL/Compilation/Parameters/ParameterCollection.php#L72-L79
TimeToogo/Pinq
Source/Queries/Common/Join/Options.php
Options.update
public function update( Common\ISource $source, $isGroupJoin, IFilter $filter = null, $hasDefault = false ) { if ($this->source === $source && $this->isGroupJoin === $isGroupJoin && $this->filter === $filter && $...
php
public function update( Common\ISource $source, $isGroupJoin, IFilter $filter = null, $hasDefault = false ) { if ($this->source === $source && $this->isGroupJoin === $isGroupJoin && $this->filter === $filter && $...
[ "public", "function", "update", "(", "Common", "\\", "ISource", "$", "source", ",", "$", "isGroupJoin", ",", "IFilter", "$", "filter", "=", "null", ",", "$", "hasDefault", "=", "false", ")", "{", "if", "(", "$", "this", "->", "source", "===", "$", "s...
@param Common\ISource $source @param boolean $isGroupJoin @param IFilter|null $filter @param boolean $hasDefault @return Options
[ "@param", "Common", "\\", "ISource", "$source", "@param", "boolean", "$isGroupJoin", "@param", "IFilter|null", "$filter", "@param", "boolean", "$hasDefault" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Queries/Common/Join/Options.php#L137-L152
TimeToogo/Pinq
Source/Queries/Common/Join/Options.php
Options.updateSource
public function updateSource(Common\ISource $source) { return $this->update($source, $this->isGroupJoin, $this->filter, $this->hasDefault); }
php
public function updateSource(Common\ISource $source) { return $this->update($source, $this->isGroupJoin, $this->filter, $this->hasDefault); }
[ "public", "function", "updateSource", "(", "Common", "\\", "ISource", "$", "source", ")", "{", "return", "$", "this", "->", "update", "(", "$", "source", ",", "$", "this", "->", "isGroupJoin", ",", "$", "this", "->", "filter", ",", "$", "this", "->", ...
@param Common\ISource $source @return Options
[ "@param", "Common", "\\", "ISource", "$source" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Queries/Common/Join/Options.php#L159-L162
TimeToogo/Pinq
Source/Queries/Operations/JoinApply.php
JoinApply.update
public function update( Common\Join\Options $options, Functions\ConnectorMutator $mutatorFunction ) { if ($this->options === $options && $this->mutatorFunction === $mutatorFunction) { return $this; } return new self($options, $mutatorFunction); }
php
public function update( Common\Join\Options $options, Functions\ConnectorMutator $mutatorFunction ) { if ($this->options === $options && $this->mutatorFunction === $mutatorFunction) { return $this; } return new self($options, $mutatorFunction); }
[ "public", "function", "update", "(", "Common", "\\", "Join", "\\", "Options", "$", "options", ",", "Functions", "\\", "ConnectorMutator", "$", "mutatorFunction", ")", "{", "if", "(", "$", "this", "->", "options", "===", "$", "options", "&&", "$", "this", ...
@param Common\Join\Options $options @param Functions\ConnectorMutator $mutatorFunction @return JoinApply
[ "@param", "Common", "\\", "Join", "\\", "Options", "$options", "@param", "Functions", "\\", "ConnectorMutator", "$mutatorFunction" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Queries/Operations/JoinApply.php#L76-L85
TimeToogo/Pinq
Source/Queries/Builders/RequestQueryBuilder.php
RequestQueryBuilder.buildRequestQuery
protected function buildRequestQuery( Queries\IScope $scope, Queries\IRequest $request ) { return new Queries\RequestQuery($scope, $request); }
php
protected function buildRequestQuery( Queries\IScope $scope, Queries\IRequest $request ) { return new Queries\RequestQuery($scope, $request); }
[ "protected", "function", "buildRequestQuery", "(", "Queries", "\\", "IScope", "$", "scope", ",", "Queries", "\\", "IRequest", "$", "request", ")", "{", "return", "new", "Queries", "\\", "RequestQuery", "(", "$", "scope", ",", "$", "request", ")", ";", "}" ...
@param Queries\IScope $scope @param Queries\IRequest $request @return Queries\IRequestQuery
[ "@param", "Queries", "\\", "IScope", "$scope", "@param", "Queries", "\\", "IRequest", "$request" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Queries/Builders/RequestQueryBuilder.php#L36-L41
TimeToogo/Pinq
Source/Queries/Builders/RequestQueryBuilder.php
RequestQueryBuilder.buildRequestQueryInterpreter
protected function buildRequestQueryInterpreter( Interpretations\IRequestInterpretation $requestInterpretation, IScopeInterpreter $scopeInterpreter, O\IEvaluationContext $evaluationContext = null ) { return new RequestQueryInterpreter($requestInterpretation, $scopeInterpr...
php
protected function buildRequestQueryInterpreter( Interpretations\IRequestInterpretation $requestInterpretation, IScopeInterpreter $scopeInterpreter, O\IEvaluationContext $evaluationContext = null ) { return new RequestQueryInterpreter($requestInterpretation, $scopeInterpr...
[ "protected", "function", "buildRequestQueryInterpreter", "(", "Interpretations", "\\", "IRequestInterpretation", "$", "requestInterpretation", ",", "IScopeInterpreter", "$", "scopeInterpreter", ",", "O", "\\", "IEvaluationContext", "$", "evaluationContext", "=", "null", ")"...
@param Interpretations\IRequestInterpretation $requestInterpretation @param IScopeInterpreter $scopeInterpreter @param O\IEvaluationContext $evaluationContext @return IRequestQueryInterpreter
[ "@param", "Interpretations", "\\", "IRequestInterpretation", "$requestInterpretation", "@param", "IScopeInterpreter", "$scopeInterpreter", "@param", "O", "\\", "IEvaluationContext", "$evaluationContext" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Queries/Builders/RequestQueryBuilder.php#L81-L87
TimeToogo/Pinq
Source/Expressions/IndexExpression.php
IndexExpression.update
public function update(Expression $value, Expression $index = null) { if ($this->value === $value && $this->index === $index) { return $this; } return new self($value, $index); }
php
public function update(Expression $value, Expression $index = null) { if ($this->value === $value && $this->index === $index) { return $this; } return new self($value, $index); }
[ "public", "function", "update", "(", "Expression", "$", "value", ",", "Expression", "$", "index", "=", "null", ")", "{", "if", "(", "$", "this", "->", "value", "===", "$", "value", "&&", "$", "this", "->", "index", "===", "$", "index", ")", "{", "r...
@param Expression $value @param Expression|null $index @return self
[ "@param", "Expression", "$value", "@param", "Expression|null", "$index" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/IndexExpression.php#L51-L58
TimeToogo/Pinq
Source/Queries/Functions/FunctionBase.php
FunctionBase.factory
public static function factory() { $static = get_called_class(); return function ( $callableParameter, $scopeType, $namespace, array $parameterScopedVariableMap, array $parameterExpressions, array $bodyE...
php
public static function factory() { $static = get_called_class(); return function ( $callableParameter, $scopeType, $namespace, array $parameterScopedVariableMap, array $parameterExpressions, array $bodyE...
[ "public", "static", "function", "factory", "(", ")", "{", "$", "static", "=", "get_called_class", "(", ")", ";", "return", "function", "(", "$", "callableParameter", ",", "$", "scopeType", ",", "$", "namespace", ",", "array", "$", "parameterScopedVariableMap",...
Gets a callable factory for the function structure. @return callable
[ "Gets", "a", "callable", "factory", "for", "the", "function", "structure", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Queries/Functions/FunctionBase.php#L72-L92
TimeToogo/Pinq
Source/Expressions/ParameterExpression.php
ParameterExpression.update
public function update($name, $typeHint, Expression $defaultValue = null, $isPassedByReference, $isVariadic) { if ($this->name === $name && $this->typeHint === $typeHint && $this->defaultValue === $defaultValue && $this->isPassedByReference === $isPassedByRefe...
php
public function update($name, $typeHint, Expression $defaultValue = null, $isPassedByReference, $isVariadic) { if ($this->name === $name && $this->typeHint === $typeHint && $this->defaultValue === $defaultValue && $this->isPassedByReference === $isPassedByRefe...
[ "public", "function", "update", "(", "$", "name", ",", "$", "typeHint", ",", "Expression", "$", "defaultValue", "=", "null", ",", "$", "isPassedByReference", ",", "$", "isVariadic", ")", "{", "if", "(", "$", "this", "->", "name", "===", "$", "name", "&...
@param string $name @param string|null $typeHint @param Expression|null $defaultValue @param boolean $isPassedByReference @param boolean $isVariadic @return self
[ "@param", "string", "$name", "@param", "string|null", "$typeHint", "@param", "Expression|null", "$defaultValue", "@param", "boolean", "$isPassedByReference", "@param", "boolean", "$isVariadic" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/ParameterExpression.php#L122-L139
TimeToogo/Pinq
Source/Providers/DSL/Compilation/Processors/Structure/StructuralExpressionLocator.php
StructuralExpressionLocator.processQuery
public static function processQuery(ParameterCollection $parameters, Queries\IQuery $query, IStructuralExpressionProcessor $processor) { $processor = Expression\ProcessorFactory::from( $query, new self($parameters, $processor) ); $processor->buildQuery(); ...
php
public static function processQuery(ParameterCollection $parameters, Queries\IQuery $query, IStructuralExpressionProcessor $processor) { $processor = Expression\ProcessorFactory::from( $query, new self($parameters, $processor) ); $processor->buildQuery(); ...
[ "public", "static", "function", "processQuery", "(", "ParameterCollection", "$", "parameters", ",", "Queries", "\\", "IQuery", "$", "query", ",", "IStructuralExpressionProcessor", "$", "processor", ")", "{", "$", "processor", "=", "Expression", "\\", "ProcessorFacto...
@param ParameterCollection $parameters @param Queries\IQuery $query @param IStructuralExpressionProcessor $processor @return void
[ "@param", "ParameterCollection", "$parameters", "@param", "Queries", "\\", "IQuery", "$query", "@param", "IStructuralExpressionProcessor", "$processor" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Providers/DSL/Compilation/Processors/Structure/StructuralExpressionLocator.php#L37-L44
TimeToogo/Pinq
Source/Expressions/ClosureExpression.php
ClosureExpression.update
public function update( $returnsReference, $isStatic, array $parameterExpressions, array $usedVariables, array $bodyExpressions ) { if ($this->returnsReference === $returnsReference && $this->isStatic === $isStatic &...
php
public function update( $returnsReference, $isStatic, array $parameterExpressions, array $usedVariables, array $bodyExpressions ) { if ($this->returnsReference === $returnsReference && $this->isStatic === $isStatic &...
[ "public", "function", "update", "(", "$", "returnsReference", ",", "$", "isStatic", ",", "array", "$", "parameterExpressions", ",", "array", "$", "usedVariables", ",", "array", "$", "bodyExpressions", ")", "{", "if", "(", "$", "this", "->", "returnsReference",...
@param boolean $returnsReference @param boolean $isStatic @param ParameterExpression[] $parameterExpressions @param ClosureUsedVariableExpression[] $usedVariables @param Expression[] $bodyExpressions @return self
[ "@param", "boolean", "$returnsReference", "@param", "boolean", "$isStatic", "@param", "ParameterExpression", "[]", "$parameterExpressions", "@param", "ClosureUsedVariableExpression", "[]", "$usedVariables", "@param", "Expression", "[]", "$bodyExpressions" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/ClosureExpression.php#L124-L146
TimeToogo/Pinq
Source/Providers/DSL/QueryCompilerConfiguration.php
QueryCompilerConfiguration.buildCompiledRequestQuery
protected function buildCompiledRequestQuery(Queries\IRequestQuery $query) { $compiler = $this->getRequestQueryCompiler($query); $compiler->compile(); return $compiler->getCompilation()->asCompiled(); }
php
protected function buildCompiledRequestQuery(Queries\IRequestQuery $query) { $compiler = $this->getRequestQueryCompiler($query); $compiler->compile(); return $compiler->getCompilation()->asCompiled(); }
[ "protected", "function", "buildCompiledRequestQuery", "(", "Queries", "\\", "IRequestQuery", "$", "query", ")", "{", "$", "compiler", "=", "$", "this", "->", "getRequestQueryCompiler", "(", "$", "query", ")", ";", "$", "compiler", "->", "compile", "(", ")", ...
@param Queries\IRequestQuery $query @return Compilation\ICompiledRequest
[ "@param", "Queries", "\\", "IRequestQuery", "$query" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Providers/DSL/QueryCompilerConfiguration.php#L229-L235
TimeToogo/Pinq
Source/Queries/Common/Source/QueryScope.php
QueryScope.update
public function update(Queries\IScope $scope) { if ($this->scope === $scope) { return $this; } return new self($scope); }
php
public function update(Queries\IScope $scope) { if ($this->scope === $scope) { return $this; } return new self($scope); }
[ "public", "function", "update", "(", "Queries", "\\", "IScope", "$", "scope", ")", "{", "if", "(", "$", "this", "->", "scope", "===", "$", "scope", ")", "{", "return", "$", "this", ";", "}", "return", "new", "self", "(", "$", "scope", ")", ";", "...
@param Queries\IScope $scope @return QueryScope
[ "@param", "Queries", "\\", "IScope", "$scope" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Queries/Common/Source/QueryScope.php#L54-L61
TimeToogo/Pinq
Source/Analysis/TypeData/PinqAPI.php
PinqAPI.generatePinqTypeData
protected function generatePinqTypeData( $traversableType, $orderedTraversableType, $joiningOnTraversableType, $joiningToTraversableType, $mutable = false ) { $pinqTypes = []; $traversableTypeId = TypeId::getObject...
php
protected function generatePinqTypeData( $traversableType, $orderedTraversableType, $joiningOnTraversableType, $joiningToTraversableType, $mutable = false ) { $pinqTypes = []; $traversableTypeId = TypeId::getObject...
[ "protected", "function", "generatePinqTypeData", "(", "$", "traversableType", ",", "$", "orderedTraversableType", ",", "$", "joiningOnTraversableType", ",", "$", "joiningToTraversableType", ",", "$", "mutable", "=", "false", ")", "{", "$", "pinqTypes", "=", "[", "...
@param string $traversableType @param string $orderedTraversableType @param string $joiningOnTraversableType @param string $joiningToTraversableType @param bool $mutable @return array
[ "@param", "string", "$traversableType", "@param", "string", "$orderedTraversableType", "@param", "string", "$joiningOnTraversableType", "@param", "string", "$joiningToTraversableType", "@param", "bool", "$mutable" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Analysis/TypeData/PinqAPI.php#L68-L174
TimeToogo/Pinq
Source/Expressions/CompiledEvaluator.php
CompiledEvaluator.fromExpressions
public static function fromExpressions(array $expressions, IEvaluationContext $context = null) { $evaluator = new self($context); $namespace = $evaluator->context->getNamespace(); $contextParameterName = self::CONTEXT_PARAMETER_NAME; $variableTable = $eva...
php
public static function fromExpressions(array $expressions, IEvaluationContext $context = null) { $evaluator = new self($context); $namespace = $evaluator->context->getNamespace(); $contextParameterName = self::CONTEXT_PARAMETER_NAME; $variableTable = $eva...
[ "public", "static", "function", "fromExpressions", "(", "array", "$", "expressions", ",", "IEvaluationContext", "$", "context", "=", "null", ")", "{", "$", "evaluator", "=", "new", "self", "(", "$", "context", ")", ";", "$", "namespace", "=", "$", "evaluat...
Creates a new compiled evaluator from the supplied expressions. @param Expression[] $expressions @param IEvaluationContext $context @return CompiledEvaluator
[ "Creates", "a", "new", "compiled", "evaluator", "from", "the", "supplied", "expressions", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/CompiledEvaluator.php#L42-L90
TimeToogo/Pinq
Source/Parsing/PhpParser/AST.php
AST.parseNode
protected function parseNode(Node $node) { switch (true) { case $node instanceof Node\Stmt: return $this->parseStatementNode($node); case $node instanceof Node\Expr: return $this->parseExpressionNode($node); case $node instanceof Node\Par...
php
protected function parseNode(Node $node) { switch (true) { case $node instanceof Node\Stmt: return $this->parseStatementNode($node); case $node instanceof Node\Expr: return $this->parseExpressionNode($node); case $node instanceof Node\Par...
[ "protected", "function", "parseNode", "(", "Node", "$", "node", ")", "{", "switch", "(", "true", ")", "{", "case", "$", "node", "instanceof", "Node", "\\", "Stmt", ":", "return", "$", "this", "->", "parseStatementNode", "(", "$", "node", ")", ";", "cas...
@param Node $node @throws \Pinq\Parsing\ASTException @return Expression
[ "@param", "Node", "$node" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Parsing/PhpParser/AST.php#L72-L90
TimeToogo/Pinq
Source/Parsing/PhpParser/AST.php
AST.parseNameNode
final public function parseNameNode($node) { if ($node instanceof Node\Name) { return Expression::value($this->parseAbsoluteName($node)); } elseif (is_string($node)) { return Expression::value($node); } return $this->parseNode($node); }
php
final public function parseNameNode($node) { if ($node instanceof Node\Name) { return Expression::value($this->parseAbsoluteName($node)); } elseif (is_string($node)) { return Expression::value($node); } return $this->parseNode($node); }
[ "final", "public", "function", "parseNameNode", "(", "$", "node", ")", "{", "if", "(", "$", "node", "instanceof", "Node", "\\", "Name", ")", "{", "return", "Expression", "::", "value", "(", "$", "this", "->", "parseAbsoluteName", "(", "$", "node", ")", ...
@param $node @return Expression
[ "@param", "$node" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Parsing/PhpParser/AST.php#L97-L106
TimeToogo/Pinq
Source/Parsing/PhpParser/AST.php
AST.parseExpressionNode
public function parseExpressionNode(Node\Expr $node) { switch (true) { case $mappedNode = $this->parseOperatorNode($node): return $mappedNode; case $node instanceof Node\Scalar && $mappedNode = $this->parseScalarNode($node): return...
php
public function parseExpressionNode(Node\Expr $node) { switch (true) { case $mappedNode = $this->parseOperatorNode($node): return $mappedNode; case $node instanceof Node\Scalar && $mappedNode = $this->parseScalarNode($node): return...
[ "public", "function", "parseExpressionNode", "(", "Node", "\\", "Expr", "$", "node", ")", "{", "switch", "(", "true", ")", "{", "case", "$", "mappedNode", "=", "$", "this", "->", "parseOperatorNode", "(", "$", "node", ")", ":", "return", "$", "mappedNode...
<editor-fold defaultstate="collapsed" desc="Expression node parsers">
[ "<editor", "-", "fold", "defaultstate", "=", "collapsed", "desc", "=", "Expression", "node", "parsers", ">" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Parsing/PhpParser/AST.php#L143-L226
TimeToogo/Pinq
Source/Parsing/PhpParser/AST.php
AST.parseStatementNode
private function parseStatementNode(Node\Stmt $node) { switch (true) { case $node instanceof Node\Stmt\Return_: return Expression::returnExpression($node->expr !== null ? $this->parseNode($node->expr) : null); case $node instanceof Node\Stmt\Throw_: ...
php
private function parseStatementNode(Node\Stmt $node) { switch (true) { case $node instanceof Node\Stmt\Return_: return Expression::returnExpression($node->expr !== null ? $this->parseNode($node->expr) : null); case $node instanceof Node\Stmt\Throw_: ...
[ "private", "function", "parseStatementNode", "(", "Node", "\\", "Stmt", "$", "node", ")", "{", "switch", "(", "true", ")", "{", "case", "$", "node", "instanceof", "Node", "\\", "Stmt", "\\", "Return_", ":", "return", "Expression", "::", "returnExpression", ...
<editor-fold defaultstate="collapsed" desc="Statement node parsers">
[ "<editor", "-", "fold", "defaultstate", "=", "collapsed", "desc", "=", "Statement", "node", "parsers", ">" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Parsing/PhpParser/AST.php#L316-L335
TimeToogo/Pinq
Source/Parsing/PhpParser/AST.php
AST.parseOperatorNode
private function parseOperatorNode(Node\Expr $node) { $nodeType = str_replace('Expr_', '', $node->getType()); switch (true) { case isset(self::$assignOperatorsMap[$nodeType]): return Expression::assign( $this->parseNode($node->var), ...
php
private function parseOperatorNode(Node\Expr $node) { $nodeType = str_replace('Expr_', '', $node->getType()); switch (true) { case isset(self::$assignOperatorsMap[$nodeType]): return Expression::assign( $this->parseNode($node->var), ...
[ "private", "function", "parseOperatorNode", "(", "Node", "\\", "Expr", "$", "node", ")", "{", "$", "nodeType", "=", "str_replace", "(", "'Expr_'", ",", "''", ",", "$", "node", "->", "getType", "(", ")", ")", ";", "switch", "(", "true", ")", "{", "cas...
<editor-fold defaultstate="collapsed" desc="Operator node maps">
[ "<editor", "-", "fold", "defaultstate", "=", "collapsed", "desc", "=", "Operator", "node", "maps", ">" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Parsing/PhpParser/AST.php#L364-L405
TimeToogo/Pinq
Source/Expressions/Operators/Binary.php
Binary.doBinaryOperation
public static function doBinaryOperation($left, $operator, $right) { if (self::$binaryOperations === null) { self::$binaryOperations = [ self::BITWISE_AND => function ($l, $r) { return $l & $r; }, self::BITWISE_OR => function ($l...
php
public static function doBinaryOperation($left, $operator, $right) { if (self::$binaryOperations === null) { self::$binaryOperations = [ self::BITWISE_AND => function ($l, $r) { return $l & $r; }, self::BITWISE_OR => function ($l...
[ "public", "static", "function", "doBinaryOperation", "(", "$", "left", ",", "$", "operator", ",", "$", "right", ")", "{", "if", "(", "self", "::", "$", "binaryOperations", "===", "null", ")", "{", "self", "::", "$", "binaryOperations", "=", "[", "self", ...
Performs the binary operation on the supplied values. @param mixed $left @param string $operator @param mixed $right @return mixed @throws PinqException
[ "Performs", "the", "binary", "operation", "on", "the", "supplied", "values", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/Operators/Binary.php#L55-L93
TimeToogo/Pinq
Source/Expressions/ExpressionWalker.php
ExpressionWalker.walk
final public function walk(Expression $expression = null) { if ($expression === null) { return null; } return $this->doWalk($expression); }
php
final public function walk(Expression $expression = null) { if ($expression === null) { return null; } return $this->doWalk($expression); }
[ "final", "public", "function", "walk", "(", "Expression", "$", "expression", "=", "null", ")", "{", "if", "(", "$", "expression", "===", "null", ")", "{", "return", "null", ";", "}", "return", "$", "this", "->", "doWalk", "(", "$", "expression", ")", ...
Walks the expression tree and returns the updated expression tree. @param Expression $expression @return Expression|null
[ "Walks", "the", "expression", "tree", "and", "returns", "the", "updated", "expression", "tree", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/ExpressionWalker.php#L19-L26
TimeToogo/Pinq
Source/Expressions/ExpressionWalker.php
ExpressionWalker.doWalkAll
protected function doWalkAll(array $expressions) { foreach ($expressions as $key => $expression) { $expressions[$key] = $this->walk($expression); } return $expressions; }
php
protected function doWalkAll(array $expressions) { foreach ($expressions as $key => $expression) { $expressions[$key] = $this->walk($expression); } return $expressions; }
[ "protected", "function", "doWalkAll", "(", "array", "$", "expressions", ")", "{", "foreach", "(", "$", "expressions", "as", "$", "key", "=>", "$", "expression", ")", "{", "$", "expressions", "[", "$", "key", "]", "=", "$", "this", "->", "walk", "(", ...
@param Expression|null[] $expressions @return Expression[]
[ "@param", "Expression|null", "[]", "$expressions" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/ExpressionWalker.php#L53-L60
TimeToogo/Pinq
Source/Queries/Common/Join/Filter/Custom.php
Custom.update
public function update(Functions\ConnectorProjection $onFunction) { if ($this->onFunction === $onFunction) { return $this; } return new self($onFunction); }
php
public function update(Functions\ConnectorProjection $onFunction) { if ($this->onFunction === $onFunction) { return $this; } return new self($onFunction); }
[ "public", "function", "update", "(", "Functions", "\\", "ConnectorProjection", "$", "onFunction", ")", "{", "if", "(", "$", "this", "->", "onFunction", "===", "$", "onFunction", ")", "{", "return", "$", "this", ";", "}", "return", "new", "self", "(", "$"...
@param Functions\ConnectorProjection $onFunction @return Custom
[ "@param", "Functions", "\\", "ConnectorProjection", "$onFunction" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Queries/Common/Join/Filter/Custom.php#L51-L58
TimeToogo/Pinq
Source/Queries/Requests/Aggregate.php
Aggregate.update
public function update(Functions\Aggregator $aggregatorFunction) { if ($this->aggregatorFunction === $aggregatorFunction) { return $this; } return new self($aggregatorFunction); }
php
public function update(Functions\Aggregator $aggregatorFunction) { if ($this->aggregatorFunction === $aggregatorFunction) { return $this; } return new self($aggregatorFunction); }
[ "public", "function", "update", "(", "Functions", "\\", "Aggregator", "$", "aggregatorFunction", ")", "{", "if", "(", "$", "this", "->", "aggregatorFunction", "===", "$", "aggregatorFunction", ")", "{", "return", "$", "this", ";", "}", "return", "new", "self...
@param Functions\Aggregator $aggregatorFunction @return Aggregate
[ "@param", "Functions", "\\", "Aggregator", "$aggregatorFunction" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Queries/Requests/Aggregate.php#L52-L59
TimeToogo/Pinq
Source/Expressions/UnaryOperationExpression.php
UnaryOperationExpression.update
public function update($operator, Expression $operand) { if ($this->operator === $operator && $this->operand === $operand) { return $this; } return new self($operator, $operand); }
php
public function update($operator, Expression $operand) { if ($this->operator === $operator && $this->operand === $operand) { return $this; } return new self($operator, $operand); }
[ "public", "function", "update", "(", "$", "operator", ",", "Expression", "$", "operand", ")", "{", "if", "(", "$", "this", "->", "operator", "===", "$", "operator", "&&", "$", "this", "->", "operand", "===", "$", "operand", ")", "{", "return", "$", "...
@param int $operator @param Expression $operand @return self
[ "@param", "int", "$operator", "@param", "Expression", "$operand" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/UnaryOperationExpression.php#L57-L64
TimeToogo/Pinq
Source/Expressions/ArgumentExpression.php
ArgumentExpression.update
public function update(Expression $value, $isUnpacked) { if ($this->value === $value && $this->isUnpacked === $isUnpacked ) { return $this; } return new self($value, $isUnpacked); }
php
public function update(Expression $value, $isUnpacked) { if ($this->value === $value && $this->isUnpacked === $isUnpacked ) { return $this; } return new self($value, $isUnpacked); }
[ "public", "function", "update", "(", "Expression", "$", "value", ",", "$", "isUnpacked", ")", "{", "if", "(", "$", "this", "->", "value", "===", "$", "value", "&&", "$", "this", "->", "isUnpacked", "===", "$", "isUnpacked", ")", "{", "return", "$", "...
@param Expression $value @param boolean $isUnpacked @return self
[ "@param", "Expression", "$value", "@param", "boolean", "$isUnpacked" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/ArgumentExpression.php#L69-L78
TimeToogo/Pinq
Source/Repository.php
Repository.newMethodSegment
protected function newMethodSegment($name, array $arguments = []) { return $this->repositoryProvider->createRepository($this->newMethod($name, $arguments)); }
php
protected function newMethodSegment($name, array $arguments = []) { return $this->repositoryProvider->createRepository($this->newMethod($name, $arguments)); }
[ "protected", "function", "newMethodSegment", "(", "$", "name", ",", "array", "$", "arguments", "=", "[", "]", ")", "{", "return", "$", "this", "->", "repositoryProvider", "->", "createRepository", "(", "$", "this", "->", "newMethod", "(", "$", "name", ",",...
{@inheritDoc} @return IRepository
[ "{" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Repository.php#L49-L52
TimeToogo/Pinq
Source/Traversable.php
Traversable.from
public static function from($elements, IIteratorScheme $scheme = null, Traversable $source = null) { return new static($elements, $scheme, $source); }
php
public static function from($elements, IIteratorScheme $scheme = null, Traversable $source = null) { return new static($elements, $scheme, $source); }
[ "public", "static", "function", "from", "(", "$", "elements", ",", "IIteratorScheme", "$", "scheme", "=", "null", ",", "Traversable", "$", "source", "=", "null", ")", "{", "return", "new", "static", "(", "$", "elements", ",", "$", "scheme", ",", "$", "...
Constructs a new traversable object from the supplied elements. @param array|\Traversable $elements @param IIteratorScheme|null $scheme @param Traversable|null $source @return ITraversable
[ "Constructs", "a", "new", "traversable", "object", "from", "the", "supplied", "elements", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Traversable.php#L52-L55
TimeToogo/Pinq
Source/Traversable.php
Traversable.factory
public static function factory(IIteratorScheme $scheme = null, Traversable $source = null) { //static:: doesn't work in closures? $static = get_called_class(); return function ($elements) use ($static, $scheme, $source) { return $static::from($elements, $scheme, $source); ...
php
public static function factory(IIteratorScheme $scheme = null, Traversable $source = null) { //static:: doesn't work in closures? $static = get_called_class(); return function ($elements) use ($static, $scheme, $source) { return $static::from($elements, $scheme, $source); ...
[ "public", "static", "function", "factory", "(", "IIteratorScheme", "$", "scheme", "=", "null", ",", "Traversable", "$", "source", "=", "null", ")", "{", "//static:: doesn't work in closures?", "$", "static", "=", "get_called_class", "(", ")", ";", "return", "fun...
Returns a callable for the traversable constructor. @param IIteratorScheme|null $scheme @param Traversable|null $source @return callable
[ "Returns", "a", "callable", "for", "the", "traversable", "constructor", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Traversable.php#L65-L73
TimeToogo/Pinq
Source/Traversable.php
Traversable.validateIsOrdered
private function validateIsOrdered($method) { $innerIterator = $this->elements; if (!($innerIterator instanceof Iterators\IOrderedIterator)) { throw new PinqException( 'Invalid call to %s: %s::%s must be called first.', $method, ...
php
private function validateIsOrdered($method) { $innerIterator = $this->elements; if (!($innerIterator instanceof Iterators\IOrderedIterator)) { throw new PinqException( 'Invalid call to %s: %s::%s must be called first.', $method, ...
[ "private", "function", "validateIsOrdered", "(", "$", "method", ")", "{", "$", "innerIterator", "=", "$", "this", "->", "elements", ";", "if", "(", "!", "(", "$", "innerIterator", "instanceof", "Iterators", "\\", "IOrderedIterator", ")", ")", "{", "throw", ...
Verifies that the traversable is ordered. @param string $method The called method name @return Iterators\IOrderedIterator @throws PinqException
[ "Verifies", "that", "the", "traversable", "is", "ordered", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Traversable.php#L223-L235
TimeToogo/Pinq
Source/Traversable.php
Traversable.union
public function union($values) { return $this->constructScopedSelf( $this->scheme->unionIterator( $this->elements, $this->scheme->toIterator($values) ) ); }
php
public function union($values) { return $this->constructScopedSelf( $this->scheme->unionIterator( $this->elements, $this->scheme->toIterator($values) ) ); }
[ "public", "function", "union", "(", "$", "values", ")", "{", "return", "$", "this", "->", "constructScopedSelf", "(", "$", "this", "->", "scheme", "->", "unionIterator", "(", "$", "this", "->", "elements", ",", "$", "this", "->", "scheme", "->", "toItera...
<editor-fold defaultstate="collapsed" desc="Set Operations">
[ "<editor", "-", "fold", "defaultstate", "=", "collapsed", "desc", "=", "Set", "Operations", ">" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Traversable.php#L397-L405
TimeToogo/Pinq
Source/Traversable.php
Traversable.append
public function append($values) { return $this->constructScopedSelf( $this->scheme->appendIterator( $this->elements, $this->scheme->toIterator($values) ) ); }
php
public function append($values) { return $this->constructScopedSelf( $this->scheme->appendIterator( $this->elements, $this->scheme->toIterator($values) ) ); }
[ "public", "function", "append", "(", "$", "values", ")", "{", "return", "$", "this", "->", "constructScopedSelf", "(", "$", "this", "->", "scheme", "->", "appendIterator", "(", "$", "this", "->", "elements", ",", "$", "this", "->", "scheme", "->", "toIte...
<editor-fold defaultstate="collapsed" desc="Multiset Operations">
[ "<editor", "-", "fold", "defaultstate", "=", "collapsed", "desc", "=", "Multiset", "Operations", ">" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Traversable.php#L431-L439
TimeToogo/Pinq
Source/Traversable.php
Traversable.offsetExists
public function offsetExists($index) { foreach ($this->keys() as $key) { if ($key === $index) { return true; } } return false; }
php
public function offsetExists($index) { foreach ($this->keys() as $key) { if ($key === $index) { return true; } } return false; }
[ "public", "function", "offsetExists", "(", "$", "index", ")", "{", "foreach", "(", "$", "this", "->", "keys", "(", ")", "as", "$", "key", ")", "{", "if", "(", "$", "key", "===", "$", "index", ")", "{", "return", "true", ";", "}", "}", "return", ...
<editor-fold defaultstate="collapsed" desc="Array Access">
[ "<editor", "-", "fold", "defaultstate", "=", "collapsed", "desc", "=", "Array", "Access", ">" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Traversable.php#L465-L474
TimeToogo/Pinq
Source/Traversable.php
Traversable.count
public function count() { if($this->elements instanceof \Countable) { return $this->elements->count(); } $count = 0; foreach($this->elements as $value) { $count++; } return $count; }
php
public function count() { if($this->elements instanceof \Countable) { return $this->elements->count(); } $count = 0; foreach($this->elements as $value) { $count++; } return $count; }
[ "public", "function", "count", "(", ")", "{", "if", "(", "$", "this", "->", "elements", "instanceof", "\\", "Countable", ")", "{", "return", "$", "this", "->", "elements", "->", "count", "(", ")", ";", "}", "$", "count", "=", "0", ";", "foreach", "...
<editor-fold defaultstate="collapsed" desc="Aggregates">
[ "<editor", "-", "fold", "defaultstate", "=", "collapsed", "desc", "=", "Aggregates", ">" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Traversable.php#L501-L514
TimeToogo/Pinq
Source/Iterators/Standard/IGeneratorAdapter.php
IGeneratorAdapter.buildGeneratorWrapper
protected function buildGeneratorWrapper() { foreach ($this->generator as $key => &$value) { yield null; $this->currentKey = $key; $this->currentValue =& $value; } }
php
protected function buildGeneratorWrapper() { foreach ($this->generator as $key => &$value) { yield null; $this->currentKey = $key; $this->currentValue =& $value; } }
[ "protected", "function", "buildGeneratorWrapper", "(", ")", "{", "foreach", "(", "$", "this", "->", "generator", "as", "$", "key", "=>", "&", "$", "value", ")", "{", "yield", "null", ";", "$", "this", "->", "currentKey", "=", "$", "key", ";", "$", "t...
hence we should be able to utilise generator in this iterator
[ "hence", "we", "should", "be", "able", "to", "utilise", "generator", "in", "this", "iterator" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Iterators/Standard/IGeneratorAdapter.php#L50-L57
TimeToogo/Pinq
Source/Parsing/FunctionScope.php
FunctionScope.fromReflection
public static function fromReflection(\ReflectionFunctionAbstract $reflection, callable $callable) { if (is_array($callable)) { /** @var $reflection \ReflectionMethod */ $thisObject = is_object($callable[0]) ? $callable[0] : null; $scopeType = $reflection->getDeclaringCla...
php
public static function fromReflection(\ReflectionFunctionAbstract $reflection, callable $callable) { if (is_array($callable)) { /** @var $reflection \ReflectionMethod */ $thisObject = is_object($callable[0]) ? $callable[0] : null; $scopeType = $reflection->getDeclaringCla...
[ "public", "static", "function", "fromReflection", "(", "\\", "ReflectionFunctionAbstract", "$", "reflection", ",", "callable", "$", "callable", ")", "{", "if", "(", "is_array", "(", "$", "callable", ")", ")", "{", "/** @var $reflection \\ReflectionMethod */", "$", ...
Creates a function scope instance from the supplied reflection and callable. @param \ReflectionFunctionAbstract $reflection @param callable $callable @return self
[ "Creates", "a", "function", "scope", "instance", "from", "the", "supplied", "reflection", "and", "callable", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Parsing/FunctionScope.php#L53-L74
TimeToogo/Pinq
Source/Queries/Segments/Operation.php
Operation.update
public function update($operationType, Common\ISource $source) { if ($this->operationType === $operationType && $this->source === $source) { return $this; } return new self($operationType, $source); }
php
public function update($operationType, Common\ISource $source) { if ($this->operationType === $operationType && $this->source === $source) { return $this; } return new self($operationType, $source); }
[ "public", "function", "update", "(", "$", "operationType", ",", "Common", "\\", "ISource", "$", "source", ")", "{", "if", "(", "$", "this", "->", "operationType", "===", "$", "operationType", "&&", "$", "this", "->", "source", "===", "$", "source", ")", ...
@param int $operationType @param Common\ISource $source @return Operation
[ "@param", "int", "$operationType", "@param", "Common", "\\", "ISource", "$source" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Queries/Segments/Operation.php#L96-L103
TimeToogo/Pinq
Source/Expressions/Operators/Unary.php
Unary.doUnaryOperation
public static function doUnaryOperation($operator, &$value) { if (self::$unaryOperations === null) { self::$unaryOperations = [ self::BITWISE_NOT => function (&$i) { return ~$i; }, self::NOT => function (&$i) { return !$i; }, ...
php
public static function doUnaryOperation($operator, &$value) { if (self::$unaryOperations === null) { self::$unaryOperations = [ self::BITWISE_NOT => function (&$i) { return ~$i; }, self::NOT => function (&$i) { return !$i; }, ...
[ "public", "static", "function", "doUnaryOperation", "(", "$", "operator", ",", "&", "$", "value", ")", "{", "if", "(", "self", "::", "$", "unaryOperations", "===", "null", ")", "{", "self", "::", "$", "unaryOperations", "=", "[", "self", "::", "BITWISE_N...
Performs the unary operation on the supplied value. @param string $operator @param mixed $value @return mixed @throws PinqException
[ "Performs", "the", "unary", "operation", "on", "the", "supplied", "value", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Expressions/Operators/Unary.php#L37-L59
TimeToogo/Pinq
Source/Queries/Builders/ExpressionInterpreter.php
ExpressionInterpreter.getSourceMethodCall
final protected function getSourceMethodCall(O\MethodCallExpression $methodExpression) { $sourceExpression = $methodExpression->getValue(); if (!($sourceExpression instanceof O\MethodCallExpression)) { throw new PinqException( 'Cannot get source method call expressio...
php
final protected function getSourceMethodCall(O\MethodCallExpression $methodExpression) { $sourceExpression = $methodExpression->getValue(); if (!($sourceExpression instanceof O\MethodCallExpression)) { throw new PinqException( 'Cannot get source method call expressio...
[ "final", "protected", "function", "getSourceMethodCall", "(", "O", "\\", "MethodCallExpression", "$", "methodExpression", ")", "{", "$", "sourceExpression", "=", "$", "methodExpression", "->", "getValue", "(", ")", ";", "if", "(", "!", "(", "$", "sourceExpressio...
@param O\MethodCallExpression $methodExpression @return O\MethodCallExpression @throws PinqException
[ "@param", "O", "\\", "MethodCallExpression", "$methodExpression" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Queries/Builders/ExpressionInterpreter.php#L140-L151
TimeToogo/Pinq
Source/Iterators/Standard/IteratorScheme.php
IteratorScheme.adapter
public static function adapter(\Traversable $iterator) { if ($iterator instanceof IIterator) { return $iterator; } elseif ($iterator instanceof IGenerator) { return new IGeneratorAdapter($iterator); } elseif ($iterator instanceof \ArrayIterator) { return n...
php
public static function adapter(\Traversable $iterator) { if ($iterator instanceof IIterator) { return $iterator; } elseif ($iterator instanceof IGenerator) { return new IGeneratorAdapter($iterator); } elseif ($iterator instanceof \ArrayIterator) { return n...
[ "public", "static", "function", "adapter", "(", "\\", "Traversable", "$", "iterator", ")", "{", "if", "(", "$", "iterator", "instanceof", "IIterator", ")", "{", "return", "$", "iterator", ";", "}", "elseif", "(", "$", "iterator", "instanceof", "IGenerator", ...
@param \Traversable $iterator @return IIterator
[ "@param", "\\", "Traversable", "$iterator" ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Iterators/Standard/IteratorScheme.php#L60-L73
TimeToogo/Pinq
Source/Analysis/PhpTypeSystem.php
PhpTypeSystem.registerTypeDataModule
public function registerTypeDataModule(ITypeDataModule $module) { $this->typeDataModules[] = $module; foreach ($module->functions() as $name => $returnType) { $normalizedFunctionName = $this->normalizeFunctionName($name); $this->functionTypeMap[$normal...
php
public function registerTypeDataModule(ITypeDataModule $module) { $this->typeDataModules[] = $module; foreach ($module->functions() as $name => $returnType) { $normalizedFunctionName = $this->normalizeFunctionName($name); $this->functionTypeMap[$normal...
[ "public", "function", "registerTypeDataModule", "(", "ITypeDataModule", "$", "module", ")", "{", "$", "this", "->", "typeDataModules", "[", "]", "=", "$", "module", ";", "foreach", "(", "$", "module", "->", "functions", "(", ")", "as", "$", "name", "=>", ...
Adds the type data module to the type system. @param ITypeDataModule $module @return void
[ "Adds", "the", "type", "data", "module", "to", "the", "type", "system", "." ]
train
https://github.com/TimeToogo/Pinq/blob/fa55da968d063c5aca384b5298665348da248c08/Source/Analysis/PhpTypeSystem.php#L87-L101