query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Returns a list of streams that the currently authenticated user is following. Authentication is required. Required scope: user_read
public function getFollowed($limit = 25, $offset = 0, $stream_type = NULL) { if(!($limit >= 1 && $limit <= 100)) { throw new Exception("Specified limit '{$limit}' must be a value between 1 and 100."); } $request_parameters = array( 'limit' => $limit, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFollowedStreams($queryString)\n {\n return $this->request->request(self::URI_STREAMS_FOLLOWED_AUTH . $queryString);\n }", "public function getFollowed($params = [])\n {\n $this->wrapper->checkScope('user_read');\n\n $defaults = [\n 'limit' => 25,\n ...
[ "0.6842472", "0.6715891", "0.652335", "0.6456893", "0.6342612", "0.61771005", "0.60916203", "0.60530746", "0.6025696", "0.5975956", "0.5876446", "0.5807082", "0.5771908", "0.5725505", "0.57141787", "0.567292", "0.56522727", "0.5627961", "0.5615788", "0.56118536", "0.5555525",...
0.6174737
6
binds a service class to the container
public function bind(string $label, $service) { if (!($service instanceof Closure) and (!\is_string($service) or !class_exists($service))) { throw new ContainerException("Service must be an instance of closure or a valid class name"); } $this->bindings[$label] = $service; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function bindServices()\n {\n // $this->app->singleton('package-blueprint-service', function ($app) {\n // return new FooService();\n // });\n }", "private function bindContainer()\n {\n parent::setInstance($this);\n \n $this->instance('container', $...
[ "0.7099849", "0.6744429", "0.67169905", "0.6586041", "0.6409338", "0.6406141", "0.6344903", "0.6321938", "0.6321096", "0.62328124", "0.62288576", "0.61561155", "0.6111", "0.6105189", "0.610091", "0.60996574", "0.607832", "0.6073352", "0.60521495", "0.60304064", "0.60113007", ...
0.59190345
26
bind a singleton to the container
public function singleton(string $label, $singleton) { if (!($singleton instanceof Closure) and (!\is_string($singleton) or !class_exists($singleton))) { throw new ContainerException("Singleton must be an instance of closure or a valid class name"); } if ($singleton instanceof ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function bindContainer()\n {\n parent::setInstance($this);\n \n $this->instance('container', $this);\n $this->instance(BaseContainer::class, $this);\n }", "public function bindSingleton(string $serviceId, string $singleton): static;", "protected function registerSingle...
[ "0.7295005", "0.6923138", "0.67598194", "0.67111486", "0.6669693", "0.65868956", "0.6538929", "0.64644015", "0.64513105", "0.64393437", "0.6436122", "0.6382289", "0.63701683", "0.6349814", "0.6283862", "0.6245181", "0.6195265", "0.61806804", "0.61800164", "0.61742204", "0.613...
0.0
-1
resolve service from the container
public function resolve($label) { if ($service = $this->get($label)) { if (is_string($service)) { return new $service(); } if ($service instanceof Closure) { return $service($this); } if (is_object($service) && !(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract function resolveService();", "public function resolve(string $id, ContainerInterface $container);", "protected function getServiceContainerService()\n {\n throw new RuntimeException('You have requested a synthetic service (\"service_container\"). The DIC does not know how to constr...
[ "0.8053885", "0.6541841", "0.620858", "0.6174766", "0.59922713", "0.5976053", "0.5901965", "0.58529973", "0.5837285", "0.5821479", "0.57775164", "0.5768127", "0.5752382", "0.57401466", "0.57401466", "0.57322913", "0.5732227", "0.56938386", "0.5676728", "0.56761134", "0.567596...
0.0
-1
get a service from the container by it's label
public function get($label) { if ($this->has($label)) { $services = $this->bindings + $this->singletons; return $services[$label]; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getServiceName();", "public function get($serviceName);", "public function getService($service)\n {\n return $this->container[$service];\n }", "public function get($serviceName)\n {\n return $this->_container[$serviceName];\n }", "public static function ge...
[ "0.6721452", "0.64199114", "0.6331425", "0.6323825", "0.62910116", "0.6289602", "0.6183595", "0.6060928", "0.6010282", "0.6008484", "0.59956914", "0.5941445", "0.59313345", "0.5914706", "0.5909928", "0.5907952", "0.5907946", "0.5892417", "0.586554", "0.5845687", "0.57951057",...
0.679488
0
Array of property to type mappings. Used for (de)serialization
public static function openAPITypes() { return self::$openAPITypes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTypes()\n {\n $types = PropertyType::all();\n $values = [];\n foreach ($types as $key) {\n $values[] = $key->id;\n }\n return $values;\n }", "public function getTypes(): array\n {\n return $this->types;\n }", "public static fun...
[ "0.6779591", "0.6607671", "0.6598399", "0.65871716", "0.65820396", "0.6517233", "0.6510976", "0.6476572", "0.6432348", "0.6432348", "0.6432348", "0.6400341", "0.62290716", "0.6181703", "0.6181703", "0.6134249", "0.61259305", "0.6116482", "0.6116482", "0.61130923", "0.6104262"...
0.0
-1
Array of property to format mappings. Used for (de)serialization
public static function openAPIFormats() { return self::$openAPIFormats; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormats()\n {\n\t $format_field = $this->getValue('format');\n\t return wed_decodeJSON($format_field,true);\n }", "public function provideSetFormat()\n {\n return [\n 'json' => [\n 'format' => 'json',\n ],\n 'html' => [\n...
[ "0.6250112", "0.6181188", "0.612938", "0.60935354", "0.6042571", "0.60404164", "0.5926467", "0.5917114", "0.59049124", "0.5883796", "0.5882191", "0.58203566", "0.5803534", "0.5791693", "0.579118", "0.57909596", "0.5773587", "0.57419014", "0.5726583", "0.57192504", "0.5709573"...
0.0
-1
Array of nullable properties
protected static function openAPINullables(): array { return self::$openAPINullables; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNonNullProperties()\n {\n $properties = get_object_vars($this);\n\n return array_filter($properties, function ($property) {\n return !is_null($property);\n });\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n ...
[ "0.72496355", "0.6384463", "0.63604397", "0.6306302", "0.62851936", "0.6251453", "0.6245598", "0.62271005", "0.618058", "0.61733896", "0.6160873", "0.61592716", "0.615893", "0.6149101", "0.6146721", "0.6141065", "0.61409247", "0.6124745", "0.6122162", "0.6110217", "0.61067027...
0.0
-1
Array of nullable field names deliberately set to null
private function getOpenAPINullablesSetToNull(): array { return $this->openAPINullablesSetToNull; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setNullAllAttributes()\n\t{\n\t\tforeach( $this->values as $field=>$value )\n\t\t{\n\t\t\tif( $value == \"real\" ) $this->$field = \"\" ;\n\t\t\telse if( $value == \"int\" ) $this->$field = \"\" ;\n\t\t\telse if( $value == \"date\" ) $this->$field = \"\" ;\n\t\t\telse if( $value == \"string\" ) ...
[ "0.7212373", "0.66275007", "0.65977436", "0.6290611", "0.620292", "0.6190953", "0.61870587", "0.61755764", "0.61745083", "0.6167193", "0.6135316", "0.61304736", "0.6123754", "0.6098936", "0.6053393", "0.5988716", "0.58818984", "0.5847575", "0.5786935", "0.5726616", "0.5716575...
0.6106065
31
Setter Array of nullable field names deliberately set to null
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setNullAllAttributes()\n\t{\n\t\tforeach( $this->values as $field=>$value )\n\t\t{\n\t\t\tif( $value == \"real\" ) $this->$field = \"\" ;\n\t\t\telse if( $value == \"int\" ) $this->$field = \"\" ;\n\t\t\telse if( $value == \"date\" ) $this->$field = \"\" ;\n\t\t\telse if( $value == \"string\" ) ...
[ "0.745833", "0.6905757", "0.67273116", "0.6322987", "0.62752813", "0.62241673", "0.61848587", "0.61658394", "0.61650425", "0.61645323", "0.6162155", "0.61385196", "0.61050785", "0.6004122", "0.59285367", "0.5910011", "0.5759044", "0.5756869", "0.5750053", "0.5750053", "0.5666...
0.5823917
32
Checks if a property is nullable
public static function isNullable(string $property): bool { return self::openAPINullables()[$property] ?? false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isPropertyNullable($propertyName)\n {\n return $this->properties[$propertyName]['nullable'];\n }", "function isNullable(): bool;", "public function isNullable(): bool\n {\n return $this->nullable;\n }", "public function isNullable()\n {\n\treturn $this->isNullable...
[ "0.7609318", "0.7602879", "0.73929447", "0.7338148", "0.73179525", "0.71823084", "0.7160528", "0.712514", "0.69716126", "0.6824365", "0.6772023", "0.6772023", "0.6772023", "0.6772023", "0.6772023", "0.6772023", "0.6772023", "0.6772023", "0.6772023", "0.6772023", "0.6772023", ...
0.75277483
18
Checks if a nullable property is set to null.
public function isNullableSetToNull(string $property): bool { return in_array($property, $this->getOpenAPINullablesSetToNull(), true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isPropertyNullable($propertyName)\n {\n return $this->properties[$propertyName]['nullable'];\n }", "public function isNullable(): bool\n {\n return $this->nullable;\n }", "public function isNullable()\n {\n\treturn $this->isNullable && true;\n }", "public funct...
[ "0.7650125", "0.76220345", "0.7537026", "0.75350016", "0.7434949", "0.7315258", "0.7264684", "0.72565544", "0.7256047", "0.71956795", "0.7162423", "0.7162423", "0.7162423", "0.7162423", "0.7162423", "0.7162423", "0.7162423", "0.7162423", "0.7162423", "0.7162423", "0.7162423",...
0.711007
47
Array of attributes where the key is the local name, and the value is the original name
public static function attributeMap() { return self::$attributeMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function changedAttributesName(): array\n {\n $changedAttributes = [];\n $attributes = $this->toArray();\n foreach ($attributes as $key => $value) {\n if (isset($this->originals[$key]) && $value !== $this->originals[$key] && ! ((is_array($this->originals[$key]) || is_objec...
[ "0.73336", "0.68268436", "0.65760714", "0.65756506", "0.65030116", "0.6489458", "0.64807576", "0.6445652", "0.64143735", "0.63852084", "0.6381065", "0.6349757", "0.62795633", "0.6254031", "0.6254031", "0.6254031", "0.6254031", "0.62487864", "0.6192782", "0.61687446", "0.61621...
0.0
-1
Array of attributes to setter functions (for deserialization of responses)
public static function setters() { return self::$setters; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAttributes();", "public static function setters();", "public static function setters()\n {\n return [\n 'status' => 'setStatus',\n 'quota' => 'setQuota'\n ];\n }", "public function setAttributes(array $attributes);", "public function setAttribute...
[ "0.680262", "0.66679907", "0.6505545", "0.64688873", "0.64688873", "0.64688873", "0.64303744", "0.63683504", "0.63627255", "0.63459826", "0.63396704", "0.61683947", "0.61683947", "0.61683947", "0.61683947", "0.61683947", "0.61683947", "0.61683947", "0.61683947", "0.61683947", ...
0.0
-1
Array of attributes to getter functions (for serialization of requests)
public static function getters() { return self::$getters; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAttributes(): array\n {\n // Get all attributes using all the getters.\n $attributes = [];\n foreach(\\array_keys(\\get_object_vars($this)) as $attribute) {\n\n // Construct the getter name.\n $getter = \\lcfirst(\\str_replace('_', '', \\ucwords($att...
[ "0.7071254", "0.6628055", "0.6581621", "0.65085584", "0.65085584", "0.65085584", "0.65085584", "0.6499994", "0.64624524", "0.63637143", "0.6363414", "0.6315606", "0.6315606", "0.6315606", "0.6315606", "0.6315606", "0.6315606", "0.6315606", "0.6315606", "0.6315606", "0.6287656...
0.0
-1
The original name of the model.
public function getModelName() { return self::$openAPIModelName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOriginalName(): string\n {\n return $this->originalName;\n }", "public function getOriginalName(): string\n {\n\t\treturn $this->originalName;\n\t}", "public function getOriginalName();", "protected function getModelName()\n {\n $fullyQualifiedClassName = substr(s...
[ "0.804985", "0.800951", "0.78280866", "0.763799", "0.76259345", "0.75931054", "0.7522853", "0.7519884", "0.7519789", "0.74984574", "0.7445635", "0.7407395", "0.739459", "0.73923784", "0.7380919", "0.7345383", "0.730916", "0.72688395", "0.7264727", "0.71954256", "0.7167397", ...
0.0
-1
Sets $this>container[$variableName] to the given data or to the given default Value; if $variableName is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the $this>openAPINullablesSetToNull array
private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { $this->openAPINullablesSetToNull[] = $variableName; } $this->container[$...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setIfExists(string $variableName, $fields, $defaultValue): void\n {\n if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {\n $this->openAPINullablesSetToNull[] = $variableName;\n }\n\n $this->contai...
[ "0.7433304", "0.5271093", "0.52569187", "0.52344775", "0.5219135", "0.5187643", "0.5187643", "0.5187643", "0.5187643", "0.5187643", "0.5187643", "0.5187643", "0.5187643", "0.5187643", "0.5187643", "0.5187643", "0.5187643", "0.5187643", "0.5187643", "0.5187643", "0.5187643", ...
0.7442694
16
Show all the invalid properties with reasons.
public function listInvalidProperties() { $invalidProperties = []; return $invalidProperties; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listInvalidProperties();", "public function listInvalidProperties()\n {\n $invalid_properties = parent::listInvalidProperties();\n\n return $invalid_properties;\n }", "public function listInvalidProperties() {\n\n $invalidProperties = [];\n\n /*\n * Any needed vali...
[ "0.7954126", "0.7814029", "0.7804116", "0.780055", "0.780055", "0.780055", "0.7795368", "0.77933925", "0.7785144", "0.7781625", "0.7781625", "0.77577174", "0.77577174", "0.77577174", "0.77577174", "0.77577174", "0.77577174", "0.7743693", "0.7742531", "0.77358544", "0.77358544...
0.0
-1
Validate all the properties in the model return true if all passed
public function valid() { return count($this->listInvalidProperties()) === 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validate(){\n\t\t$valid = true;\n\t\t$ref = new ReflectionObject($this);\n\t\tforeach($ref->getProperties() as $prop){\n\t\t\tif(isset($this->_atributosMetadata[$prop->getName()])){\n\t\t\t\t$propMetadata = $this->_atributosMetadata[$prop->getName()];\n\t\t\t\tif($propMetadata->needValidate){\n\t\t...
[ "0.76944476", "0.7569596", "0.72817", "0.72507316", "0.72507316", "0.72507316", "0.72507316", "0.72507316", "0.72507316", "0.72507316", "0.72507316", "0.72507316", "0.72507316", "0.72507316", "0.72507316", "0.72507316", "0.72507316", "0.72507316", "0.72507316", "0.72507316", ...
0.0
-1
Returns true if offset exists. False otherwise.
public function offsetExists($offset): bool { return isset($this->container[$offset]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function offsetExists($offset): bool\n {\n return false;\n }", "public function hasOffset(){\n return $this->_has(1);\n }", "public function offsetExists($offset): bool;", "public function offsetExists($offset) {\n\t\t$result = false;\n\t\t\n\t\tif($this->_data[$offset]) {\n\t\t\t...
[ "0.855629", "0.8535103", "0.8488053", "0.8326081", "0.83227026", "0.83005095", "0.821591", "0.8155662", "0.8143329", "0.8143329", "0.8135276", "0.8131318", "0.81312937", "0.812782", "0.81185985", "0.8115894", "0.8106766", "0.810348", "0.8087281", "0.8087281", "0.80825496", ...
0.8024272
78
Sets value based on offset.
public function offsetSet($offset, $value): void { if (is_null($offset)) { $this->container[] = $value; } else { $this->container[$offset] = $value; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set($offset, $value);", "public function set($offset, $value = null);", "function setOffset($value) {\n $this->offset = $value;\n }", "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "public function offsetSet($offset, $value)\n {\n $th...
[ "0.8670502", "0.84270954", "0.821386", "0.8191476", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "...
0.0
-1
Serializes the object to a value that can be serialized natively by json_encode().
#[\ReturnTypeWillChange] public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function jsonSerialize() {\n return json_encode($this->value);\n }", "public function jsonSerialize()\n {\n return $this->getValue();\n }", "public function jsonSerialize() : mixed\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public functio...
[ "0.7914062", "0.75066525", "0.72958165", "0.72958165", "0.72661936", "0.72661936", "0.7260596", "0.7252609", "0.72422665", "0.7216874", "0.72061294", "0.71973014", "0.71868676", "0.71836174", "0.71836174", "0.71836174", "0.71836174", "0.71836174", "0.71836174", "0.7152629", "...
0.0
-1
Gets the string presentation of the object
public function __toString() { return json_encode( ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __toString() {\r\n\t\treturn $this->getPrint();\r\n\t}", "public function __toString() {\r\n\t\treturn $this->getPrint();\r\n\t}", "public function __toString() {\n\t\treturn $this->getPrint();\n\t}", "public function visualize()\n {\n \n return new StringWrapper('object('.$this->name(...
[ "0.78987753", "0.78987753", "0.78655267", "0.78240114", "0.7798868", "0.77837336", "0.77770287", "0.77690274", "0.77437395", "0.774057", "0.7733258", "0.7733258", "0.7733258", "0.7695146", "0.767794", "0.76635754", "0.76593804", "0.7630339", "0.76228136", "0.7610629", "0.7575...
0.0
-1
Gets a headersafe presentation of the object
public function toHeaderValue() { return json_encode(ObjectSerializer::sanitizeForSerialization($this)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function presentHeader() {\r\n $html = parent::presentHeader();\r\n\r\n return $html;\r\n }", "\n using \\IngwiePhoenix\\UniterMPC\\Models\\Displayable;\n\n public function __toDOM() {\n return (<div>\n <p>We present to you:</p>\n <span class=\"title\">{...
[ "0.61142564", "0.6067019", "0.6052253", "0.60405964", "0.5780557", "0.56276566", "0.56124824", "0.5548362", "0.5543594", "0.5513917", "0.55101", "0.5501446", "0.5493431", "0.5485684", "0.5476193", "0.5422747", "0.5421125", "0.5421125", "0.54147935", "0.5389393", "0.53754073",...
0.0
-1
Constructs a EditorMediaDialog object.
public function __construct(EntityRepositoryInterface $entity_repository, EntityDisplayRepositoryInterface $entity_display_repository) { $this->entityRepository = $entity_repository; $this->entityDisplayRepository = $entity_display_repository; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createDialog() {\n $dialog = parent::createDialog();\n $dialog->fields = $this->builder()->getFields();\n return $dialog;\n }", "public static function video() {\n return new Media_Video();\n }", "public function createMediaProvider();", "function init()\n\t{\n\t\t$this...
[ "0.59792393", "0.5696848", "0.5693092", "0.56553984", "0.5628734", "0.56280214", "0.5497708", "0.54666275", "0.5462849", "0.54147494", "0.53670883", "0.5317349", "0.52933", "0.52823067", "0.51794064", "0.51493615", "0.51353234", "0.51084316", "0.508608", "0.505932", "0.504787...
0.0
-1
Gets the default value for the view mode form element.
public static function getViewModeDefaultValue(array $view_mode_options, FilterInterface $media_embed_filter, $media_element_view_mode_attribute) { // The select element won't display without at least two options, so if // that's the case, just return NULL. if (count($view_mode_options) < 2) { return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaultValue()\n\t{\n\t\tswitch ($this->type) {\n\t\t\tcase self::TYPE_TEXT:\n\t\t\tcase self::TYPE_TEXTAREA:\n\t\t\tcase self::TYPE_PASSWORD:\n\t\t\t\treturn $this->default_value;\n\t\t\t\tbreak;\n\n\t\t\tcase self::TYPE_DATE:\n\t\t\t\treturn date(kyConfig::get()->getDateFormat(), $this->defaul...
[ "0.6541027", "0.65106213", "0.64511555", "0.6422292", "0.63950914", "0.6373652", "0.63444656", "0.6321201", "0.63136315", "0.63095224", "0.630452", "0.6294991", "0.62934893", "0.6285613", "0.62522167", "0.62494916", "0.6230167", "0.62049687", "0.62049687", "0.6169253", "0.616...
0.6481748
2
Gets the name of an image media item's source field.
protected function getMediaImageSourceFieldName(MediaInterface $media) { $field_definition = $media->getSource() ->getSourceFieldDefinition($media->bundle->entity); $item_class = $field_definition->getItemDefinition()->getClass(); if (is_a($item_class, ImageItem::class, TRUE)) { return $field_de...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSrc()\n {\n $value = $this->get(self::SRC);\n return $value === null ? (string)$value : $value;\n }", "public function getSource()\n {\n return $this->data['fields']['source'];\n }", "public function getSourceName() {\n return $this->source;\n }", ...
[ "0.69855005", "0.6925251", "0.68975675", "0.68144625", "0.6782533", "0.67813617", "0.67629594", "0.6760414", "0.67312247", "0.6679801", "0.6639354", "0.6618033", "0.6618033", "0.6598698", "0.6596389", "0.65826434", "0.6541056", "0.64838946", "0.6474232", "0.6450737", "0.64466...
0.7568752
0
Guard Agaisnt Disabled Listings
private function guardAgainstDisabledListings(Listing $listing) { return Cache::remember('listing_is_enabled_' . $listing->slug, 1440, function () use ($listing) { return ! Listing::listingsFilter()->get()->contains($listing); } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function disabled();", "public function disabled();", "public function isDisabled()\n {\n return !$this->hasListItems();\n }", "public function is_disabled()\n {\n }", "public function isDisabled() {}", "public function isDisabled();", "public function isDisabled();", ...
[ "0.6782808", "0.6782808", "0.6675442", "0.666819", "0.6526357", "0.6457213", "0.6457213", "0.6457213", "0.64083207", "0.6364385", "0.6289156", "0.62749064", "0.6234353", "0.6140774", "0.6135858", "0.60895824", "0.608324", "0.6079399", "0.60762876", "0.60665035", "0.60571337",...
0.6241441
12
Guard Against International Locations
private function guardAgainstInternationalLocation($location) { return 'United States' !== $location->CountryCode || isset($location->CountrySubDivisionCode) && in_array($location->CountrySubDivisionCode, [ 'Northern Mariana Islands', 'American Samoa', 'Gu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sanitize_locale_name($locale_name)\n {\n }", "protected function checkSystemLocale() {}", "protected function loadLocalization() {}", "protected function checkLocaleWithUTF8filesystem() {}", "public function locale();", "private function CheckLangue(Request $request){\n $getPathArra...
[ "0.6283614", "0.6150227", "0.6138486", "0.60550076", "0.6048752", "0.60370815", "0.59215885", "0.58716047", "0.5706535", "0.5694313", "0.56932217", "0.56932217", "0.56932217", "0.56926167", "0.5678009", "0.56778234", "0.56749564", "0.5648809", "0.5625365", "0.5623819", "0.561...
0.6276187
1
Guard Against Washingon DC Cities
private function guardAgainstWashingtonDcCities($location) { $city_name = str_replace(', District of Columbia', '', $location->CityName); return $city_name !== 'District of Columbia' && $city_name !== 'Washington DC'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function city();", "protected function giveCity()\n\t{\n\t\treturn \"Orland\";\n\t}", "public function check_city()\n {\n if (!in_array(ucwords(sanitize_text_field($_POST['billing_city'])), $this->business_area)) {\n throw new Exception(__('Your city is not within our busin...
[ "0.6389444", "0.6334861", "0.616638", "0.61622244", "0.5920291", "0.59103537", "0.5909597", "0.5831985", "0.5821872", "0.57788825", "0.5778564", "0.5748761", "0.5742633", "0.5718765", "0.5669943", "0.5662033", "0.56606036", "0.5630022", "0.556456", "0.553537", "0.5519887", ...
0.57004255
14