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
Google Site Search init
public function googleSearch() { $search = new \Hoor\Search\Google(get_search_query(), $this->getIndex()); $this->data['search'] = $search; $this->data['results'] = $search->results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function search(){\n //includes google maps script for place autocomplete and to get experiences\n \t$this->set('jsIncludes',array('http://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&language=fr&libraries=places','places_autocomplete','get_experiences','logo_fly','jquery.dropdown','cookie...
[ "0.67922825", "0.6317542", "0.6139503", "0.6047347", "0.60379326", "0.59833616", "0.59686875", "0.59436697", "0.59371597", "0.59303373", "0.5923029", "0.5915186", "0.5873753", "0.58575493", "0.58443975", "0.58431584", "0.5796078", "0.5768023", "0.5766472", "0.57621163", "0.57...
0.74246925
0
Retorna os dados dos banners
public function getIdiomas() { return TableFactory::getInstance('WebsiteIdiomas')->getIdiomas(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function GetBanners()\n\t{\n\t\t$output = '';\n\t\t\n\t\t$sql = 'SELECT\n\t\t\t\t\tb.id, b.image_file, b.link_url, b.priority_order,\n\t\t\t\t\tbd.image_text\n\t\t\t\tFROM '.TABLE_BANNERS.' b\n\t\t\t\t\tLEFT OUTER JOIN '.TABLE_BANNERS_DESCRIPTION.' bd ON b.id = bd.banner_id\n\t\t\t\tWHERE b.is_active...
[ "0.6930514", "0.6792028", "0.65889424", "0.64382297", "0.62852466", "0.6247919", "0.61943245", "0.6186688", "0.61748034", "0.6115885", "0.605247", "0.60296375", "0.6023822", "0.60203034", "0.59393907", "0.5868659", "0.5807737", "0.578242", "0.57308906", "0.57293254", "0.57187...
0.0
-1
Retorna o resultado da consulta
public function getTextos($parametros) { return TableFactory::getInstance('Textos')->ExecutegetTexto($parametros['cod_texto']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resultado(){\n\t\t\treturn $this->result=mysql_fetch_object($this->query);\n\t\t\t}", "public function result(){\n\t\t$this->execute() ;\n\t\treturn $this->statement->fetch(PDO::FETCH_ASSOC) ;\n\t}", "public function consultarListado()\n {\n $sql = \"SELECT * FROM examen\";\n $execute...
[ "0.7483587", "0.7480224", "0.74065113", "0.73093337", "0.72550046", "0.72046214", "0.7178627", "0.7137149", "0.7126968", "0.71266574", "0.7089757", "0.70719606", "0.7068917", "0.70585495", "0.7045348", "0.69795966", "0.69606644", "0.696037", "0.69602686", "0.6953094", "0.6941...
0.0
-1
Retorna os dados ao Controller
public function BuscarCadastro() { return TableFactory::getInstance('Cadastro')->incluirCadastro(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readAction(){\n\n //Pega o id do veiculo\n $veiculo = Application::getParam('id');\n if($veiculo === null){\n return json_encode(array(\n 'success' => false,\n 'message' => 'Veiculo é inválido ou não existe.',\n 'code' => ...
[ "0.7213842", "0.6995091", "0.6952026", "0.6882828", "0.68810904", "0.68728906", "0.68289804", "0.6819267", "0.6802652", "0.6797764", "0.67917585", "0.6787681", "0.67789495", "0.6774815", "0.6766548", "0.6758586", "0.6754839", "0.6749393", "0.6747169", "0.674047", "0.673943", ...
0.0
-1
Inclui a biblioteca do JSON
public function editaTexto($parametros) { LibFactory::getInstance(null,null,'Zend/Json.php'); //Instancia o componente de validação $ComponenteValidacao = getComponent('validacoes/textos.validacao','TextosValidacao'); //total de idiomas $total = count(TableFactory::getInstance('WebsiteIdiomas')->getIdiomas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateJSON_LD(){\n\t\t \n\t\t $metadata = $this->metadata;\n\t\t $JSON_LD = array();\n\t\t \n\t\t $JSON_LD[\"metadata-version\"] = self::JSONldVersion;\n\t\t $JSON_LD[\"@context\"] = array(\n\n\t\t\t\t\"type\" => \"@type\",\n\t\t\t\t\"id\" => \"@id\",\n\t\t\t\t\"tableID\" => \"http://purl.org/dc/e...
[ "0.62497336", "0.5854529", "0.55579585", "0.55516607", "0.5368465", "0.5291001", "0.52795345", "0.52034104", "0.5174359", "0.5168948", "0.5092016", "0.50919753", "0.5057808", "0.5048202", "0.5047946", "0.50304604", "0.50225335", "0.5020604", "0.5020604", "0.5020604", "0.50206...
0.0
-1
Tests the basic translation UI.
public function testTranslationUI() { $this->doTestBasicTranslation(); $this->doTestTranslationOverview(); $this->doTestOutdatedStatus(); $this->doTestPublishedStatus(); $this->doTestAuthoringInfo(); $this->doTestTranslationEdit(); $this->doTestTranslationChanged(); $this->doTestChangedT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function doTestTranslationOverview() {\n $storage = $this->container->get('entity_type.manager')\n ->getStorage($this->entityTypeId);\n $storage->resetCache([$this->entityId]);\n $entity = $storage->load($this->entityId);\n $translate_url = $entity->toUrl('drupal:content-translation-over...
[ "0.7155073", "0.6869474", "0.67515814", "0.66741776", "0.65856504", "0.64591104", "0.64552826", "0.6436511", "0.6393012", "0.6388643", "0.6330205", "0.6319794", "0.63195133", "0.63138986", "0.62505317", "0.6246821", "0.6236729", "0.6167913", "0.6100812", "0.6062083", "0.60216...
0.8696037
0
Tests the basic translation workflow.
protected function doTestBasicTranslation() { // Create a new test entity with original values in the default language. $default_langcode = $this->langcodes[0]; $values[$default_langcode] = $this->getNewEntityValues($default_langcode); // Create the entity with the editor as owner, so that afterwards a ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testTranslationUI() {\n $this->doTestBasicTranslation();\n $this->doTestTranslationOverview();\n $this->doTestOutdatedStatus();\n $this->doTestPublishedStatus();\n $this->doTestAuthoringInfo();\n $this->doTestTranslationEdit();\n $this->doTestTranslationChanged();\n $this->d...
[ "0.8284054", "0.7071227", "0.7071022", "0.6685348", "0.6681617", "0.66433495", "0.6642468", "0.6639676", "0.66346496", "0.6608294", "0.65313935", "0.6522165", "0.6508544", "0.6507085", "0.6491973", "0.6476521", "0.64555407", "0.64275545", "0.64121616", "0.6385944", "0.6365847...
0.7219463
1
Tests that the translation overview shows the correct values.
protected function doTestTranslationOverview() { $storage = $this->container->get('entity_type.manager') ->getStorage($this->entityTypeId); $storage->resetCache([$this->entityId]); $entity = $storage->load($this->entityId); $translate_url = $entity->toUrl('drupal:content-translation-overview'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testTranslationUI() {\n $this->doTestBasicTranslation();\n $this->doTestTranslationOverview();\n $this->doTestOutdatedStatus();\n $this->doTestPublishedStatus();\n $this->doTestAuthoringInfo();\n $this->doTestTranslationEdit();\n $this->doTestTranslationChanged();\n $this->d...
[ "0.73799634", "0.6937003", "0.6797059", "0.6794012", "0.6719218", "0.64951336", "0.6403737", "0.63615346", "0.63314074", "0.6306944", "0.6299896", "0.62862647", "0.6278439", "0.6271557", "0.62462384", "0.6198654", "0.6195937", "0.6146018", "0.61252195", "0.61020106", "0.60974...
0.78109306
0
Tests uptodate status tracking.
protected function doTestOutdatedStatus() { $storage = $this->container->get('entity_type.manager') ->getStorage($this->entityTypeId); $storage->resetCache([$this->entityId]); $entity = $storage->load($this->entityId); $langcode = 'fr'; $languages = \Drupal::languageManager()->getLanguages(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function uptodate()\n\t{\n\t\t$interval = new DateInterval('P1W'); // 1 Week\n\t\t$now = new DateTime();\n\n\t\treturn (new DateTime($this->updated_at))->add($interval) > $now && ( ! $this->recent());\n\t}", "public function testGetStatus()\n {\n $this->todo('stub');\n }", "protected f...
[ "0.6749489", "0.63809085", "0.6326466", "0.63174194", "0.62091744", "0.61626995", "0.6157364", "0.61325586", "0.6088355", "0.60060173", "0.5962227", "0.5951523", "0.5926973", "0.5921063", "0.59166676", "0.58775574", "0.58715314", "0.5862987", "0.58608496", "0.58494335", "0.58...
0.5978695
10
Tests the translation publishing status.
protected function doTestPublishedStatus() { $storage = $this->container->get('entity_type.manager') ->getStorage($this->entityTypeId); $storage->resetCache([$this->entityId]); $entity = $storage->load($this->entityId); // Unpublish translations. foreach ($this->langcodes as $index => $langco...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testIsPublishing()\n {\n $this->assertFalse(LivePubHelper::is_publishing());\n\n LivePubHelper::init_pub();\n $this->assertTrue(LivePubHelper::is_publishing());\n\n LivePubHelper::stop_pub();\n $this->assertFalse(LivePubHelper::is_publishing());\n }", "pub...
[ "0.69824964", "0.65593195", "0.6530755", "0.6523578", "0.6489113", "0.6405633", "0.63548523", "0.62925905", "0.6262866", "0.6259605", "0.6255526", "0.6243924", "0.6243924", "0.6243924", "0.6243924", "0.6243924", "0.6243924", "0.6243924", "0.6243924", "0.6243924", "0.6243924",...
0.7371762
0
Tests the translation authoring information.
protected function doTestAuthoringInfo() { $storage = $this->container->get('entity_type.manager') ->getStorage($this->entityTypeId); $storage->resetCache([$this->entityId]); $entity = $storage->load($this->entityId); $values = []; // Post different authoring information for each translation....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRequireAuthor()\n {\n $this->markTestIncomplete('Not yet implemented.');\n }", "public function testGetAuthor(): void\n {\n $result = new ReachResult;\n $user = factory(User::class)->make();\n $tweet = factory(Tweet::class)->states(['deterministic'])->make...
[ "0.6713774", "0.6399758", "0.6244147", "0.6143146", "0.61206424", "0.60975266", "0.60208815", "0.58980304", "0.58944917", "0.5884977", "0.58400047", "0.5821197", "0.5803238", "0.57791793", "0.5775981", "0.57138795", "0.5705439", "0.57013476", "0.5696757", "0.5667064", "0.5664...
0.7376124
0
Returns an array of entity field values to be tested.
protected function getNewEntityValues($langcode) { return [$this->fieldName => [['value' => $this->randomMachineName(16)]]]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValues(): array\n {\n return $this->getEntityDao()->getValues();\n }", "public function values(): array\n\t{\n\t\treturn $this->fields()->values()->all();\n\t}", "public function getExpectedFieldValues()\n {\n return $this->expected_field_values;\n }", "protected ...
[ "0.73616964", "0.7033053", "0.6991884", "0.69394743", "0.6856391", "0.6849877", "0.6849877", "0.6849877", "0.6737841", "0.67118514", "0.67118514", "0.6690869", "0.66805696", "0.66715664", "0.662038", "0.6600609", "0.6600609", "0.6559079", "0.65530014", "0.6540264", "0.651988"...
0.0
-1
Returns an edit array containing the values to be posted.
protected function getEditValues($values, $langcode, $new = FALSE) { $edit = $values[$langcode]; $langcode = $new ? LanguageInterface::LANGCODE_NOT_SPECIFIED : $langcode; foreach ($values[$langcode] as $property => $value) { if (is_array($value)) { $edit["{$property}[0][value]"] = $value[0]['v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPostValues() {\n $post_check_array = array(\n// submit action\n 'add' => array('filter' => FILTER_SANITIZE_STRING),\n 'update' => array('filter' => FILTER_SANITIZE_STRING),\n // List all update form fields !!!\n// event type name.\n 'datum' => a...
[ "0.6936908", "0.68367857", "0.67292047", "0.66244406", "0.66107786", "0.6606725", "0.65764827", "0.6500132", "0.6402416", "0.63992316", "0.6378647", "0.63711", "0.63443154", "0.6340069", "0.6313838", "0.6308942", "0.6292756", "0.62908304", "0.6285934", "0.6269503", "0.6265795...
0.0
-1
Returns the form action value when submitting a new translation.
protected function getFormSubmitActionForNewTranslation(EntityInterface $entity, $langcode) { $entity->addTranslation($langcode, $entity->toArray()); return $this->getFormSubmitAction($entity, $langcode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getFormAction(){\n return (\n (\n $this->_action!==NULL &&\n is_string($this->_action) &&\n strlen(trim($this->_action))\n )\n ?$this->_action\n :$this->setFormAction()\n );\n }", "functio...
[ "0.760255", "0.73368746", "0.73327214", "0.6914913", "0.678881", "0.6547862", "0.6524198", "0.6453983", "0.6430061", "0.63965803", "0.6353759", "0.63483995", "0.6346935", "0.6328987", "0.6307215", "0.6297129", "0.6291074", "0.6289689", "0.62746817", "0.6239189", "0.62236", ...
0.0
-1
Returns the form action value to be used to submit the entity form.
protected function getFormSubmitAction(EntityInterface $entity, $langcode) { return 'Save' . $this->getFormSubmitSuffix($entity, $langcode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFormAction()\n {\n return $this->getAttribute(\"formaction\");\n }", "protected function getFormAction(){\n return (\n (\n $this->_action!==NULL &&\n is_string($this->_action) &&\n strlen(trim($this->_action))\n )\...
[ "0.8299291", "0.8271404", "0.8020893", "0.7756004", "0.7580053", "0.7495279", "0.73152316", "0.7282295", "0.7197104", "0.7164042", "0.70137715", "0.69318104", "0.6919459", "0.6916079", "0.69133043", "0.6876698", "0.6864816", "0.6864816", "0.6864816", "0.6864816", "0.6864816",...
0.6174326
97
Returns appropriate submit button suffix based on translatability.
protected function getFormSubmitSuffix(EntityInterface $entity, $langcode) { return ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getSubmitButtonLabel()\n {\n return $GLOBALS['LANG']->getLL('generalMailForm_sendButton');\n }", "public function getFrontendButtonLabel()\n {\n $buttonLabel = __('Proceed to checkout');\n if ($this->isCheckoutDisabled()) {\n $buttonLabel = __('Accept Q...
[ "0.71179223", "0.6866201", "0.65114206", "0.63008875", "0.6298747", "0.62969935", "0.61547625", "0.61402535", "0.6120337", "0.6113354", "0.60901815", "0.6085413", "0.6082651", "0.6076602", "0.60590523", "0.60359466", "0.6017651", "0.6017638", "0.601427", "0.5927786", "0.59240...
0.66701823
2
Returns the translation object to use to retrieve the translated values.
protected function getTranslation(EntityInterface $entity, $langcode) { return $entity->getTranslation($langcode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTranslationObject();", "protected function get_translator()\n\t{\n\t\treturn Translator::get($this->id);\n\t}", "public function getTranslation() {\n\t\treturn $this->translation;\n\t}", "public function getTranslate()\n {\n if (! $this->translate) {\n if (\\Zend_Registry::is...
[ "0.8065684", "0.790441", "0.7873488", "0.75614995", "0.75245917", "0.74034137", "0.736624", "0.72052974", "0.7179367", "0.7172951", "0.70823777", "0.70823777", "0.6940691", "0.69137985", "0.68620616", "0.6852613", "0.68332654", "0.68308926", "0.6820734", "0.68106514", "0.6764...
0.0
-1
Returns the value for the specified property in the given language.
protected function getValue(EntityInterface $translation, $property, $langcode) { $key = $property == 'user_id' ? 'target_id' : 'value'; return $translation->get($property)->{$key}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __get( $name )\n {\n switch ( $name )\n {\n case 'language':\n if ( isset( $this->properties[$name] ) )\n {\n return $this->properties[$name];\n }\n break;\n\n default:\n ...
[ "0.6631378", "0.6613403", "0.63188887", "0.62802565", "0.6171346", "0.6103426", "0.6052993", "0.60483754", "0.59848934", "0.59744054", "0.59594697", "0.5951993", "0.5931857", "0.5870854", "0.5825411", "0.5817957", "0.58129936", "0.5779499", "0.5766622", "0.57324016", "0.57138...
0.6962314
0
Returns the name of the field that implements the changed timestamp.
protected function getChangedFieldName($entity) { return $entity->hasField('content_translation_changed') ? 'content_translation_changed' : 'changed'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getName()\n {\n return self::TIMESTAMP;\n }", "public function get_field_name();", "public function getChangedFields() {}", "public function getFieldName() {}", "public function getChangeInternalName()\n {\n \treturn $this->_change_internal_name;\n }", "public functi...
[ "0.6899611", "0.66510093", "0.63935363", "0.6330892", "0.6276394", "0.6173465", "0.60872626", "0.60690033", "0.60087603", "0.5966636", "0.59630007", "0.5960776", "0.5940579", "0.5930575", "0.5930575", "0.5930575", "0.5919676", "0.590383", "0.5896583", "0.58921254", "0.5880798...
0.692234
0
Tests edit content translation.
protected function doTestTranslationEdit() { $storage = $this->container->get('entity_type.manager') ->getStorage($this->entityTypeId); $storage->resetCache([$this->entityId]); $entity = $storage->load($this->entityId); $languages = $this->container->get('language_manager')->getLanguages(); f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function doTestTranslationOverview() {\n $storage = $this->container->get('entity_type.manager')\n ->getStorage($this->entityTypeId);\n $storage->resetCache([$this->entityId]);\n $entity = $storage->load($this->entityId);\n $translate_url = $entity->toUrl('drupal:content-translation-over...
[ "0.69493926", "0.69435126", "0.69262534", "0.6828421", "0.6741234", "0.6685142", "0.6490897", "0.64174837", "0.6345519", "0.6238969", "0.62094104", "0.61885744", "0.61714715", "0.61700386", "0.6157993", "0.6133213", "0.6129099", "0.6129099", "0.6124241", "0.612052", "0.607631...
0.8468501
0
Tests the basic translation workflow.
protected function doTestTranslationChanged() { $storage = $this->container->get('entity_type.manager') ->getStorage($this->entityTypeId); $storage->resetCache([$this->entityId]); $entity = $storage->load($this->entityId); $changed_field_name = $this->getChangedFieldName($entity); $definition ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testTranslationUI() {\n $this->doTestBasicTranslation();\n $this->doTestTranslationOverview();\n $this->doTestOutdatedStatus();\n $this->doTestPublishedStatus();\n $this->doTestAuthoringInfo();\n $this->doTestTranslationEdit();\n $this->doTestTranslationChanged();\n $this->d...
[ "0.8284054", "0.7219463", "0.7071227", "0.7071022", "0.6685348", "0.6681617", "0.66433495", "0.6642468", "0.6639676", "0.66346496", "0.6608294", "0.65313935", "0.6522165", "0.6508544", "0.6507085", "0.6491973", "0.6476521", "0.64555407", "0.64275545", "0.64121616", "0.6385944...
0.0
-1
Tests the changed time after API and FORM save without changes.
public function doTestChangedTimeAfterSaveWithoutChanges() { $storage = $this->container->get('entity_type.manager') ->getStorage($this->entityTypeId); $storage->resetCache([$this->entityId]); $entity = $storage->load($this->entityId); // Test only entities, which implement the EntityChangedInterf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateTimesheet()\n {\n }", "public function assertUpdateDefaults() {\n\t\t\t$this->set('lastModified', 'NOW()', false);\n\t\t\t$this->enclose('lastModified', false);\n\t\t}", "public function testSaveShouldWorkAndBumpTimestampAndTheDirtyFlagShouldWork()\n\t{\n\t\t$result = cms_orm('t...
[ "0.6488095", "0.64706755", "0.6312677", "0.6309495", "0.6254951", "0.61593914", "0.61274993", "0.6083935", "0.60320985", "0.5889214", "0.58547103", "0.5814933", "0.5803211", "0.5793049", "0.5791037", "0.57892597", "0.5785161", "0.57849276", "0.57795423", "0.57532334", "0.5743...
0.7559328
0
Determine whether the user can view the model.
public function view(User $autenticadoUser, User $user) { return $autenticadoUser->id === $user->id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isViewAllowed()\n {\n return $this->isAllowedAction('view');\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') &&...
[ "0.74192244", "0.73926866", "0.73587644", "0.731265", "0.72216856", "0.72160876", "0.70797694", "0.70411503", "0.7034548", "0.6997131", "0.69464743", "0.68929696", "0.68870556", "0.6883539", "0.68338764", "0.68131477", "0.68131477", "0.6810962", "0.6809471", "0.68050355", "0....
0.0
-1
Determine whether the user can update the model.
public function update(User $autenticadoUser, User $user) { return $autenticadoUser->id === $user->id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(): bool\n {\n return $this->isAllowed(self::UPDATE);\n }", "public function authorize()\n {\n if (auth()->user()->can('update')) {\n return true;\n }\n\t\t\n\t\treturn false;\n }", "function updatesAllowed() {\n\t\treturn $this->getupdatable() ...
[ "0.8117686", "0.78116655", "0.7761959", "0.77571154", "0.77429295", "0.76466244", "0.76086044", "0.75788623", "0.7541773", "0.7502781", "0.7474463", "0.7416289", "0.73970205", "0.73549694", "0.73455596", "0.7310464", "0.7290454", "0.7230238", "0.72002774", "0.7172181", "0.715...
0.0
-1
Determine whether the user can delete the model.
public function delete(User $autenticadoUser, User $user) { /*obtenemos el token, obtenemos el cliente, personal access cliente es verdadero cuando ese cliente puede crear token personales*/ return $autenticadoUser->id === $user->id && $autenticadoUser->token()->client->personal_access_clie...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function canDelete()\n {\n $exist = $this->getModelObj('permission')->where(['resource_code' => $this->code, 'app' => $this->app])->first();\n if ($exist) {\n return false;\n }\n return true;\n }", "public function can_delete () {\r\n\r\n return ...
[ "0.78115165", "0.7799225", "0.77931285", "0.7774248", "0.7762861", "0.772955", "0.7658145", "0.76024574", "0.75723165", "0.7447689", "0.741027", "0.7360865", "0.7339668", "0.73045045", "0.7292303", "0.7275476", "0.72221464", "0.7194365", "0.7111255", "0.710949", "0.70957327",...
0.0
-1
Test creation with only the mandatory values.
public function testCreate() { $token = new JavascriptWebToken('CREDENTIALS', 'PROVIDER'); $this->assertEquals('CREDENTIALS', $token->getCredentials()); $this->assertEquals('PROVIDER', $token->getProviderKey()); $this->assertEquals('anon.', $token->getUsername()); $this->ass...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCreateWithOnlyRequiredFields(): void\n {\n $this->doTestCreate('createWithOnlyRequiredFields.json');\n }", "public function testCreateWithoutRequiredFields(): void\n {\n $requiredFields = static::getRequiredFields();\n\n if(count($requiredFields) > 0) {\n ...
[ "0.7499421", "0.6942836", "0.67695814", "0.6755818", "0.67443407", "0.67061716", "0.64404064", "0.6395215", "0.63654554", "0.6353564", "0.6323331", "0.62996006", "0.62746745", "0.6231337", "0.6206988", "0.61956215", "0.61879426", "0.6187674", "0.61740625", "0.61731875", "0.61...
0.0
-1
Test creation with an empty provider key raises an exception.
public function testCreateWithEmptyProviderKeyBails() { new JavascriptWebToken('CREDENTIALS', ''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testValidationCaseForInvalidTypeOfKeyExpansionServicePassedOnInitialization()\n {\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\RuntimeException::class);\n\n $protocol = n...
[ "0.67588204", "0.67027736", "0.668399", "0.6524192", "0.64295864", "0.635062", "0.62926936", "0.627621", "0.6231925", "0.6185014", "0.6111316", "0.6110822", "0.60911405", "0.60582674", "0.6039716", "0.60265285", "0.5996526", "0.5967178", "0.5964531", "0.59418994", "0.5939724"...
0.7031421
0
Test creation with all values.
public function testCreateWithRolesIsAuthenticated() { $token = new JavascriptWebToken('CREDENTIALS', 'PROVIDER', 'username', ['ROLE_1', 'ROLE_2']); $this->assertEquals('CREDENTIALS', $token->getCredentials()); $this->assertEquals('PROVIDER', $token->getProviderKey()); $this->assert...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function an_user_makes_a_successfull_data_creation()\n {\n $data = factory(Data::class)->create();\n $this->assertDatabaseHas('data', $data->toArray());\n }", "public function testCreateWithAllFields(): void\n {\n $this->doTestCreate('createWithAllFields.json');\n }", "p...
[ "0.6659178", "0.6410194", "0.6331368", "0.62860274", "0.6283626", "0.6271715", "0.62117016", "0.6195569", "0.6187928", "0.61811477", "0.6175902", "0.61753625", "0.617189", "0.617189", "0.61369514", "0.6094646", "0.6094646", "0.6094646", "0.60920155", "0.6039095", "0.603688", ...
0.0
-1
Test serialization and unserialization.
public function testSerializationAndUnSerialization() { $token = new JavascriptWebToken('CREDENTIALS', 'PROVIDER', 'username', ['ROLE_1', 'ROLE_2']); $serialized = $token->serialize(); $token = new JavascriptWebToken('TMP', 'TMP'); $token->unserialize($serialized); $th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetSerialization()\n {\n $this->assertEquals('turtle', $this->fixture->getSerialization('@prefix foo:'));\n\n $this->assertEquals(null, $this->fixture->getSerialization(''));\n }", "public function testSerialize() {\n $index = Phish_Index::load();\n $str = se...
[ "0.7456415", "0.73340505", "0.72956616", "0.6957933", "0.69096947", "0.664388", "0.66271853", "0.64623004", "0.64104533", "0.63058776", "0.6259864", "0.6259069", "0.6255833", "0.6219332", "0.61893016", "0.6144095", "0.6134766", "0.61254364", "0.6109054", "0.61023504", "0.6055...
0.592291
28
Objeto para administrar los parametros de configuracion de la aplicacion.
function __construct($filePath) { $this->_file = parse_ini_file($filePath, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadConfig(){\n\t\t\n\t\t$opt[] = [\n\t\t\t'method' => 'setFormParams',\n\t\t\t'value'=>$this->paramsLoad(3, \\sevian\\s::getReq('command_idx'), \\sevian\\s::getReq('unit_idx'))\n\t\t\t\n\t\t];\n\t\t$this->info = $opt;//$form->getInfo();\n\t}", "protected function setParamConfig()\n {\n $thi...
[ "0.7069604", "0.6942461", "0.6558954", "0.6532898", "0.6524806", "0.6495728", "0.64029807", "0.63170564", "0.6301206", "0.6299428", "0.6274658", "0.60953385", "0.60808784", "0.6076583", "0.60741514", "0.60688365", "0.60583025", "0.6019149", "0.60065746", "0.6000405", "0.59775...
0.0
-1
Se obtiene una matriz multidimesional, con los nombres de las secciones y las configuraciones incluidas.
public function getConfig() { return $this->_file; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMatriz() {\n return $this->matriz;\n }", "public function getMatrix($asArray = false) {}", "public function materias(){\n\t\t\n\t\t$connection = Connection::getInstance();\n\t\t$result \t= $connection->query(\"SELECT grupos.materia_id \n\t\t\t\t\t\t\t\t\t\t FROM usuarios, inscripc...
[ "0.66208315", "0.5924018", "0.574359", "0.5702897", "0.5607321", "0.5604383", "0.54363143", "0.54244596", "0.5405577", "0.53685695", "0.5361659", "0.52460855", "0.5243237", "0.52358735", "0.5226287", "0.5163272", "0.51245505", "0.5121419", "0.5087282", "0.5084231", "0.5031806...
0.0
-1
Extract messages to MessageCatalogue.
public function extract() { if ($this->catalogue) { throw new \RuntimeException('Invalid state'); } $this->catalogue = new MessageCatalogue(); foreach ($this->adminPool->getAdminServiceIds() as $id) { $admin = $this->getAdmin($id); if (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toMessages();", "public function extractMessage($object);", "function &getMessageObjects() {\n\t\t$res=$this->getMessages();\n\t\t$return = array();\n\t\twhile ($arr = db_fetch_array($res)) {\n\t\t\t$return[] = new ArtifactMessage($this, $arr);\n\t\t}\n\t\treturn $return;\n\t}", "public funct...
[ "0.6241932", "0.6075957", "0.5991553", "0.5784521", "0.5774822", "0.5764519", "0.5716393", "0.57058114", "0.5626592", "0.5626592", "0.5618981", "0.5551634", "0.5524553", "0.5514824", "0.5514824", "0.5514824", "0.5514824", "0.5514824", "0.5514824", "0.5514824", "0.550563", "...
0.68977857
0
Register the service provider.
public function register() { $this->registerBindings(); $this->app['events']->listen(BuildingSidebar::class, RegisterOrdersSidebar::class); $this->app['events']->listen(LoadingBackendTranslations::class, function (LoadingBackendTranslations $event) { $event->load('orders', array...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\n }", "public function register()\n {\n //\n if (env('APP_DEBUG', false) && $this->app->isLocal()) {\n $this->a...
[ "0.71774215", "0.7054453", "0.6968271", "0.69677705", "0.6952019", "0.6931252", "0.6926226", "0.6918423", "0.6899592", "0.6895726", "0.6894278", "0.68906504", "0.68906504", "0.6883112", "0.6872877", "0.6865099", "0.68640506", "0.68627584", "0.68624485", "0.68491566", "0.68236...
0.0
-1
Get the services provided by the provider.
public function provides() { return array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public function getServices()\n {\n if (is_null($this->serviceProviders)) {\n $this->serviceProviders = $this->getServiceProviders();\n }\n\n return $this->serviceProviders;\n }", "protected function getServices()\n {\n return $this->services;\n }", "pro...
[ "0.79039633", "0.7667588", "0.76229626", "0.75573224", "0.7470691", "0.7423859", "0.7423859", "0.7423859", "0.7409516", "0.736475", "0.736475", "0.7363987", "0.7322196", "0.71889", "0.7162814", "0.71509963", "0.7137116", "0.70622355", "0.7047945", "0.70362085", "0.70213807", ...
0.0
-1
Returns the static model of the specified AR class. Please note that you should have this exact method in all your CActiveRecord descendants!
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function model() {\n return parent::model(get_called_class());\n }", "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className=__CLA...
[ "0.7574005", "0.7528819", "0.7270635", "0.7269363", "0.72611624", "0.7211197", "0.72105455", "0.7130912", "0.7127844", "0.7127844", "0.7101899", "0.7101899", "0.7101485", "0.70736724", "0.70631427", "0.70631427", "0.70631427", "0.70631427", "0.70631427", "0.70631427", "0.7063...
0.0
-1
Kernel request event handler.
public function onKernelRequest(RequestEvent $event) { $code = IntranetHelper::getStatusCode(); $status_code_map = IntranetHelper::getStatusCodeMap(); // The code below prevents us from getting into redirect loops when this // event subscriber throws an exception below. Essentially we are checking /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onKernelRequest($event){\n return;\n }", "public function kernelRequest(Event $event) {\n // \\Drupal::messenger()->addMessage('Event kernel.request thrown by Subscriber in module crm_awareness.', 'status', TRUE);\n }", "public function onKernelRequest(GetResponseEvent $event){\n ...
[ "0.76329505", "0.74589545", "0.70092165", "0.68535024", "0.67821807", "0.67169565", "0.66462696", "0.6640086", "0.65704256", "0.65598416", "0.6531442", "0.6432175", "0.6414128", "0.63948697", "0.6383292", "0.63677174", "0.63521117", "0.6348874", "0.6348874", "0.6348874", "0.6...
0.6032558
32
Update the specified resource in storage. TODO: create request for
public function update(Request $request, $id) { $request = $request->only(['action_brgy', 'action_prosecutor', 'action_court', 'action_investigation']); $report = $this->recordRepository->update($id,$request); return response()->success($report); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7462326", "0.70982933", "0.70144945", "0.68097603", "0.65425545", "0.6425757", "0.6364105", "0.6202005", "0.6147305", "0.61459816", "0.6136034", "0.6094531", "0.60535717", "0.6050696", "0.6047247", "0.6030886", "0.6008545", "0.59801865", "0.59737986", "0.59737986", "0.5967...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $delete = $this->filecategoryRepository->delete($id); return response()->success($delete); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Sets a new organisationSoegEgenskab
public function setOrganisationSoegEgenskab(?\Digitaliseringskataloget\SF1500\Organisation6\Organisationsystem\OrganisationSoegEgenskab $organisationSoegEgenskab = null) { $this->organisationSoegEgenskab = $organisationSoegEgenskab; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setOrganization() {}", "public function setOrganisation($organisation)\n\t{\n\t\t$this->_organisation = $organisation;\n\t}", "function setOrg( $org )\n {\n $org = trim( $org );\n $this->properties['ORG'] = $org;\n }", "private function createOrg()\n {\n\n ...
[ "0.6576829", "0.63408273", "0.5999782", "0.5829549", "0.5674935", "0.56554294", "0.5598285", "0.5594129", "0.542648", "0.5425764", "0.5354668", "0.5299996", "0.52609926", "0.5252325", "0.5242178", "0.5239741", "0.522871", "0.52141994", "0.52040774", "0.519952", "0.5193937", ...
0.58004093
4
Sets a new organisationEnhedSoegEgenskab
public function setOrganisationEnhedSoegEgenskab(?\Digitaliseringskataloget\SF1500\Organisation6\Organisationsystem\OrganisationEnhedSoegEgenskab $organisationEnhedSoegEgenskab = null) { $this->organisationEnhedSoegEgenskab = $organisationEnhedSoegEgenskab; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setOrganization() {}", "public function setOrganisationSoegEgenskab(?\\Digitaliseringskataloget\\SF1500\\Organisation6\\Organisationsystem\\OrganisationSoegEgenskab $organisationSoegEgenskab = null)\n {\n $this->organisationSoegEgenskab = $organisationSoegEgenskab;\n return $t...
[ "0.6253455", "0.6019148", "0.5968048", "0.595641", "0.5792902", "0.57728934", "0.57655907", "0.5630202", "0.55088437", "0.55031806", "0.5487335", "0.5471978", "0.5465478", "0.546432", "0.54265344", "0.54127496", "0.5385396", "0.53696537", "0.53669924", "0.536689", "0.5366284"...
0.6142836
1
Sets a new organisationFunktionSoegEgenskab
public function setOrganisationFunktionSoegEgenskab(?\Digitaliseringskataloget\SF1500\Organisation6\Organisationsystem\OrganisationFunktionSoegEgenskab $organisationFunktionSoegEgenskab = null) { $this->organisationFunktionSoegEgenskab = $organisationFunktionSoegEgenskab; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setOrganisation($organisation)\n\t{\n\t\t$this->_organisation = $organisation;\n\t}", "protected function setOrganization() {}", "function setOrg( $org )\n {\n $org = trim( $org );\n $this->properties['ORG'] = $org;\n }", "public function testSetSituationFam() {\n\n ...
[ "0.65870106", "0.61544025", "0.58013594", "0.5705426", "0.56412673", "0.5619342", "0.5563112", "0.54149777", "0.53903455", "0.53806293", "0.5331095", "0.5317382", "0.53000027", "0.52723396", "0.5194524", "0.51782894", "0.5172609", "0.5157016", "0.5138413", "0.5134946", "0.511...
0.5295228
13
Sets a new brugerSoegEgenskab
public function setBrugerSoegEgenskab(?\Digitaliseringskataloget\SF1500\Organisation6\Organisationsystem\BrugerSoegEgenskab $brugerSoegEgenskab = null) { $this->brugerSoegEgenskab = $brugerSoegEgenskab; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setSuperada($bsuperada = 'f')\n {\n $this->bsuperada = $bsuperada;\n }", "public function setBeskrivelse($beskrivelse)\n {\n $this->beskrivelse = stripslashes($beskrivelse);\n return $this;\n }", "public function setInteressefaellesskabSoegEgenskab(?\\Digitaliseringska...
[ "0.631509", "0.598548", "0.5941457", "0.58644736", "0.5591374", "0.5577968", "0.5480713", "0.546306", "0.54055375", "0.53879565", "0.5377916", "0.53150284", "0.5296843", "0.52843165", "0.52782583", "0.52714735", "0.52624923", "0.526196", "0.52392006", "0.5219043", "0.52042496...
0.6608439
0
Sets a new interessefaellesskabSoegEgenskab
public function setInteressefaellesskabSoegEgenskab(?\Digitaliseringskataloget\SF1500\Organisation6\Organisationsystem\InteressefaellesskabSoegEgenskab $interessefaellesskabSoegEgenskab = null) { $this->interessefaellesskabSoegEgenskab = $interessefaellesskabSoegEgenskab; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct($absensi)\n {\n $this->absensi = $absensi;\n }", "function setSuperada($bsuperada = 'f')\n {\n $this->bsuperada = $bsuperada;\n }", "function setAukstis($x) {\n $this->aukstis = $x; // privaciai reiksmei priskiriam kintamaji, kuris bus kazkuom pa...
[ "0.576902", "0.5578742", "0.54356354", "0.54074144", "0.5394288", "0.53935", "0.5321104", "0.5285257", "0.5270227", "0.52538097", "0.52518827", "0.5220283", "0.52164", "0.5179266", "0.5164634", "0.51489156", "0.5119781", "0.5088769", "0.50804365", "0.50666374", "0.5061231", ...
0.6949871
0
Sets a new itSystemSoegEgenskab
public function setItSystemSoegEgenskab(?\Digitaliseringskataloget\SF1500\Organisation6\Organisationsystem\ItSystemSoegEgenskab $itSystemSoegEgenskab = null) { $this->itSystemSoegEgenskab = $itSystemSoegEgenskab; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setInteressefaellesskabSoegEgenskab(?\\Digitaliseringskataloget\\SF1500\\Organisation6\\Organisationsystem\\InteressefaellesskabSoegEgenskab $interessefaellesskabSoegEgenskab = null)\n {\n $this->interessefaellesskabSoegEgenskab = $interessefaellesskabSoegEgenskab;\n return $this;\...
[ "0.5718736", "0.54230565", "0.53450125", "0.5292212", "0.51965165", "0.5151355", "0.5147576", "0.5060291", "0.5052695", "0.5034472", "0.5020664", "0.5016013", "0.5007753", "0.5005001", "0.49873668", "0.4972972", "0.49568653", "0.49120185", "0.4899648", "0.48954803", "0.485899...
0.73801684
0
Handle the blog category "created" event.
public function created(BlogCategory $blogCategory) { # ПОПАДАЕМ ПОСЛЕ СОЗДАНИЯ ЗАПИСИ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function created(BlogCategory $blogCategory)\n {\n //\n }", "public function created(Category $category)\n {\n //\n }", "public function created(Category $category)\n {\n //\n }", "public function created(Category $category)\n {\n //\n }", "public...
[ "0.75223494", "0.6698444", "0.6661626", "0.6661626", "0.6362654", "0.626188", "0.6228993", "0.6196854", "0.6154896", "0.60739994", "0.6016805", "0.60099787", "0.59607136", "0.59602344", "0.5934691", "0.5910312", "0.58929914", "0.58851683", "0.5883242", "0.58804995", "0.587426...
0.7122024
1
Handle the blog category "updated" event.
public function updated(BlogCategory $blogCategory) { # ПОПАДАЕМ ПОСЛЕ ОБНОВЛЕНИЯ ЗАПИСИ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updated(BlogCategory $blogCategory)\n {\n //\n }", "public function updated(Category $category)\n {\n //\n }", "public function updated(Category $category)\n {\n //\n }", "public function updateCategory()\n {\n Category::findOrFail($this->...
[ "0.73130655", "0.66730237", "0.6661564", "0.65830755", "0.6246236", "0.6075652", "0.5891221", "0.58715236", "0.5832291", "0.5822952", "0.57896024", "0.57783824", "0.5728552", "0.5720402", "0.5699764", "0.5695626", "0.5688151", "0.5646902", "0.56235224", "0.56153464", "0.56079...
0.6784312
1
Handle the blog category "deleted" event.
public function deleted(BlogCategory $blogCategory) { # ПОПАДАЕМ ПОСЛЕ УДАЛЕНИЯ ЗАПИСИ (softDeleted) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleted(BlogCategory $blogCategory)\n {\n //\n }", "public function deleted(Category $category)\n {\n //\n }", "public function deleted(Category $category)\n {\n //\n }", "public function forceDeleted(BlogCategory $blogCategory)\n {\n //\n ...
[ "0.7552081", "0.6816169", "0.6774611", "0.6756149", "0.6628631", "0.64983225", "0.6482234", "0.6435042", "0.6354558", "0.63398045", "0.6284901", "0.6236919", "0.6224998", "0.620079", "0.6144247", "0.6127965", "0.6122118", "0.61148167", "0.60770875", "0.600813", "0.6007495", ...
0.6985034
1
Handle the blog category "restored" event.
public function restored(BlogCategory $blogCategory) { # ПОПАДАЕМ ПОСЛЕ ВОССТАНОВЛЕНИЯ ЗАПИСИ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function restored(BlogCategory $blogCategory)\n {\n //\n }", "public function restored(Category $category)\n {\n //\n }", "public function restored(Category $category)\n {\n //\n }", "public function restored(BlogPost $blogPost)\n\t{\n\t\t//\n\t}", "function re...
[ "0.72649026", "0.65432936", "0.65432936", "0.6214389", "0.6169603", "0.60192096", "0.5998172", "0.5957952", "0.58951604", "0.5768473", "0.5768473", "0.56988853", "0.5641622", "0.559001", "0.55132025", "0.5377838", "0.5370091", "0.5353559", "0.5271694", "0.52396286", "0.523847...
0.7003671
1
Handle the blog category "force deleted" event.
public function forceDeleted(BlogCategory $blogCategory) { # ПОПАДАЕМ ПОСЛЕ ПРЯМОГО УДАЛЕНИЯ ЗАПИСИ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function forceDeleted(BlogCategory $blogCategory)\n {\n //\n }", "public function forceDeleted(Category $category)\n {\n //\n }", "public function deleted(BlogCategory $blogCategory)\n {\n //\n }", "public function forceDeleted(Category $category)\n {\n ...
[ "0.7492043", "0.70046467", "0.69624126", "0.6943701", "0.6943701", "0.6675738", "0.66446525", "0.66252023", "0.65652", "0.6549068", "0.6538489", "0.6506367", "0.6463943", "0.64293057", "0.6428951", "0.6361386", "0.63513476", "0.6345205", "0.63186806", "0.63098896", "0.6301011...
0.72233695
1
This function inserts a location entry into the location table
public function create_location($location_name) { $location=array('location_id'=>NULL, 'name'=>$location_name); if( !$this->db->insert('Location',$location)) { return FALSE; } return $this->db->insert_id(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insert($location){\n $fields = array(\"location_name\");\n $values = array($location);\n $lastid = $this->db->insert(\"location_tabel\", $fields, $values);\n return $lastid;\n }", "function addLocation($data) {\r\n\r\n\r\n\t\t$this->query('INSERT INTO locations (`id...
[ "0.7276832", "0.7263678", "0.70063186", "0.69364", "0.6879095", "0.6831648", "0.68204045", "0.6727662", "0.6602435", "0.6516491", "0.6327037", "0.6324173", "0.6258634", "0.6219613", "0.6196191", "0.6144236", "0.6108178", "0.6079316", "0.5996928", "0.5968348", "0.5947828", "...
0.6486656
10
This function reads a location using a location_id
public function read_location($location_id) { $query= $this->db->get_where('Location',array('location_id'=>$location_id)); if(!is_null($query->row()->name)) { return FALSE; } return $query->row()->name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_location_by_id($loc_id) {\n $this->db->select('*');\n $this->db->from('locations');\n $this->db->where('id', $loc_id);\n $results = $this->db->get();\n\n if($results->num_rows() > 0) {\n $location = $results['location'];\n } else {\n $location = 'N/A';\n ...
[ "0.70435494", "0.69320786", "0.68579775", "0.64931023", "0.64451975", "0.62570655", "0.61830026", "0.61804414", "0.6158836", "0.6122279", "0.6091461", "0.60720366", "0.6060059", "0.6043644", "0.6000656", "0.5894361", "0.5887906", "0.5882489", "0.58699185", "0.58699185", "0.58...
0.7282506
0
This function deletes a location entry in the location table
public function delete_location($location_id) { $this->db->where('location_id', $location_id); return $this->db->delete('Location'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($location);", "public function delete() {\n\t\t\tif ( isset( $_GET['location_id'] ) ) {\n\t\t\t\t$id = intval( wp_unslash( $_GET['location_id'] ) );\n\t\t\t\t$connection = WPGMP_Database::connect();\n\t\t\t\t$this->query = $connection->prepare( \"DELETE FROM $this->table WHERE $this->uniqu...
[ "0.75766504", "0.7555668", "0.70983255", "0.70792156", "0.70485806", "0.70353085", "0.7017674", "0.6993717", "0.69702154", "0.6947979", "0.6871443", "0.68688333", "0.66519433", "0.6567743", "0.64949095", "0.64291936", "0.6414449", "0.6345211", "0.6317041", "0.62826735", "0.62...
0.679241
12
Register any application services.
public function register() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }", "public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n ...
[ "0.7879658", "0.7600202", "0.74930716", "0.73852855", "0.736794", "0.7306089", "0.7291359", "0.72896826", "0.72802424", "0.7268026", "0.7267702", "0.72658145", "0.7249053", "0.72171587", "0.7208486", "0.7198799", "0.7196415", "0.719478", "0.7176513", "0.7176227", "0.7164647",...
0.0
-1
Bootstrap any application services.
public function boot() { view()->composer('*', function ($view) { $loai_sp = Category::where('status',1)->get(); $view->with('loai_sp',$loai_sp); }); view()->composer('*', function ($view) { $cart = new Cart; $view->wi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\n {\n // Boot here application\n }", "public func...
[ "0.7344842", "0.7212776", "0.7207748", "0.7123287", "0.7109729", "0.70822036", "0.7076881", "0.70718396", "0.7051853", "0.7025475", "0.7011949", "0.70043486", "0.6955807", "0.69322443", "0.69319373", "0.69272774", "0.6911386", "0.69069713", "0.6898877", "0.6898432", "0.689659...
0.0
-1
Display a listing of the resource.
public function index() { return view('welcome'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.728708", "0.7144915", "0.7132209", "0.66401577", "0.66205436", "0.65682197", "0.6526531", "0.65085673", "0.6449452", "0.63749766", "0.63726056", "0.6364582", "0.6364582", "0.6364582", "0.6341498", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.634...
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Create a new controller instance.
public function __construct(Setting $setting) { $this->middleware('auth'); $this->setting = $setting; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this-...
[ "0.82678324", "0.8173564", "0.78118384", "0.7706353", "0.76816905", "0.7659159", "0.74858105", "0.7406485", "0.7298472", "0.7253435", "0.7196091", "0.7174443", "0.7016074", "0.6989523", "0.69837826", "0.69728553", "0.69640046", "0.69357765", "0.6897687", "0.689282", "0.687757...
0.0
-1
Show the application dashboard.
public function index() { return view('settings.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n ...
[ "0.77850926", "0.7760142", "0.7561336", "0.75147176", "0.74653697", "0.7464913", "0.73652893", "0.7351646", "0.7346477", "0.73420244", "0.7326711", "0.7316215", "0.73072463", "0.7287626", "0.72826403", "0.727347", "0.727347", "0.727347", "0.727347", "0.7251768", "0.7251768", ...
0.0
-1
REGISTER SIDEBARS Sidebars & Widgetizes Areas
function bones_register_sidebars() { register_sidebar(array( 'id' => 'sidebar_blog', 'name' => __( 'Blog Sidebar', 'bonestheme' ), 'description' => __( 'Blog Sidebar', 'bonestheme' ), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_sidebars() {\n\n\t\t\t// Get widget areas\n\t\t\tif ( empty( $this->widget_areas ) ) {\n\t\t\t\t$this->widget_areas = $this->get_widget_areas();\n\t\t\t}\n\n\t\t\t// Original widget areas is empty\n\t\t\t$this->orig = array();\n\n\t\t\t// Save widget areas\n\t\t\tif ( ! empty( $this->orig ...
[ "0.8038387", "0.79538476", "0.7930505", "0.77855957", "0.77690387", "0.773587", "0.7727113", "0.77258646", "0.77216333", "0.77103156", "0.77057284", "0.7669056", "0.7643646", "0.7640288", "0.7624431", "0.7588374", "0.7574568", "0.75618887", "0.75311726", "0.75098044", "0.7509...
0.0
-1
Set Auth User base currency
public function setBaseCurrency(SetBaseCurrencyRequest $request) { $message = $this->exchange_service->updateUserBaseCurrency( auth()->user(), $request->base_currency )->message; return Responser::send(200, [], $message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setCurrency()\n {\n $currency = $this->em->getRepository('ClubUserBundle:LocationConfig')->getObjectByKey('default_currency',$this->order->getLocation());\n\n $this->order->setCurrency($currency);\n $this->order->setCurrencyValue(1);\n }", "function setCurrencyCode(){\...
[ "0.63269025", "0.6131675", "0.6108748", "0.60412985", "0.5919966", "0.5913986", "0.5897016", "0.5790924", "0.5787512", "0.5738755", "0.5726778", "0.56876475", "0.56876475", "0.5650384", "0.5650384", "0.56483763", "0.5620562", "0.5605141", "0.5577068", "0.55661565", "0.5533201...
0.6169092
1
List Exchange Rates for Auth User
public function listCurrenciesWithExchangeRate() { $service_response = $this->exchange_service ->getCurrenciesWithExchangeRate( auth()->user(), ); return $service_response->success ? Responser::send(200, $service_response->data, $service_response-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getExchangeRates()\n\t{\n\t\t$date = $this->getDate()->format('d.m.Y');\n\t\t$locale = $this->getLocale();\n\t\t$cacheKey = $date . '-' . $locale;\n\n\t\t// Check the cache\n\t\tif (isset($this->cache[$cacheKey])) {\n\t\t\treturn $this->cache[$cacheKey];\n\t\t}\n\n\t\t$response = $this->requestRem...
[ "0.59216326", "0.5827011", "0.57756233", "0.5728646", "0.56978375", "0.55804366", "0.53898424", "0.5386887", "0.5383655", "0.5354732", "0.5308894", "0.5276614", "0.52638197", "0.52518845", "0.5246922", "0.52315146", "0.52218205", "0.52074677", "0.5197628", "0.5195775", "0.518...
0.5789719
2
Set an AlertThreshold for Auth user
public function setAlertThreshold(SetAlertThresholdRequest $request) { $message = $this->exchange_service->setAlertThreshold( auth()->user(), $request->currency, $request->threshold )->message; return Responser::send(200, [], $message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setThreshold($threshold)\n {\n $this->threshold = $threshold;\n }", "public function beforeFilter() {\n parent::beforeFilter();\n $this->Auth->allow('checkthreshold');\n \n\n }", "public function SetThresh($threshold)\n {\n $this->t...
[ "0.6097758", "0.58039176", "0.5730992", "0.56513774", "0.5360514", "0.5158001", "0.50475264", "0.49350056", "0.49167612", "0.4905111", "0.49037218", "0.48978367", "0.4874143", "0.48601896", "0.48544258", "0.48509738", "0.48378927", "0.48186943", "0.48150748", "0.48000774", "0...
0.6730401
0
Metodos para manejar el CRUD
public function readUsuarios() { $sql = 'SELECT IdRol, Nombre, Apellido, Telefono, Email, u.IdEstado, IdUsuario FROM usuarios u ORDER BY Apellido'; $params = array(null); return Database::getRows($sql, $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setupCreateOperation()\n {\n CRUD::setValidation(SettingRequest::class);\n\n CRUD::field('key')->type('text')->label('ID key');\n CRUD::field('name')->type('text')->label('Nom');\n CRUD::field('type')\n ->type('select_from_array')\n ->label('T...
[ "0.63046396", "0.6294077", "0.6285278", "0.6268046", "0.62634563", "0.6263165", "0.6240544", "0.6218182", "0.62056446", "0.61937183", "0.6158606", "0.61263114", "0.612479", "0.6118679", "0.6118116", "0.61063164", "0.60828584", "0.6075089", "0.6064989", "0.60171056", "0.599811...
0.0
-1
Lists all Tblalarm models.
public function actionIndex() { $searchModel = new TblalarmSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAgendaAlarmListAction(){\n /** @var Object_Agenda $agenda */\n $this->getDeviceSession()->getUserId();\n $agenda = new Object_Agenda();\n $this->_helper->json($agenda->getClass()->getFieldDefinition('Alarm'));\n }", "public function getAll()\n\t{\n\t\t$args = arr...
[ "0.66029", "0.641655", "0.61701655", "0.61107904", "0.6030622", "0.60243577", "0.6000862", "0.5994744", "0.5987366", "0.59515315", "0.59509313", "0.59509313", "0.59509313", "0.59501433", "0.59499896", "0.59300804", "0.5913527", "0.5898412", "0.58959645", "0.58812064", "0.5878...
0.74779886
0
Displays a single Tblalarm model.
public function actionView($id) { return $this->render('view', [ 'model' => $this->findModel($id), ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionIndex()\n {\n $searchModel = new TblalarmSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }...
[ "0.6863721", "0.5985204", "0.5947652", "0.5907846", "0.58892536", "0.5862244", "0.58569527", "0.58285785", "0.58270204", "0.58188057", "0.5812012", "0.5812012", "0.5812012", "0.5812012", "0.5812012", "0.58057535", "0.57951367", "0.5791603", "0.5782145", "0.57811046", "0.57590...
0.0
-1
Creates a new Tblalarm model. If creation is successful, the browser will be redirected to the 'view' page.
public function actionCreate() { $transaction = Yii::$app->db->beginTransaction(); try { $category = ArrayHelper::map(Tblcategoryi::find()->where(['enable' => 1])->andWhere(['enable_view' => 1])->all(), 'id', 'title'); $model = new Tblalarm(); if ($model->load(Yii...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new Talabalar();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ])...
[ "0.7634467", "0.71947604", "0.7154688", "0.7040052", "0.69703335", "0.6967753", "0.69609934", "0.69365865", "0.69061935", "0.6896743", "0.68961936", "0.6879918", "0.6872759", "0.6846145", "0.6824878", "0.6817033", "0.6780959", "0.6775192", "0.6773984", "0.6768338", "0.674973"...
0.74163353
1
Updates an existing Tblalarm model. If update is successful, the browser will be redirected to the 'view' page.
public function actionUpdate($id) { $transaction = Yii::$app->db->beginTransaction(); try { $category = ArrayHelper::map(Tblcategoryi::find()->where(['enable' => 1])->andWhere(['enable_view' => 1])->all(), 'id', 'title'); $model = $this->findModel($id); if ($model...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionUpdate()\n {\n\t\t\t$id=7;\n $model = $this->findModel($id);\n $model->slug = \"asuransi\";\n $model->waktu_update = date(\"Y-m-d H:i:s\");\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update']);\n ...
[ "0.71310127", "0.6913757", "0.6717773", "0.6705382", "0.6693328", "0.66874576", "0.66774994", "0.6676186", "0.6652464", "0.6648165", "0.66164047", "0.66154885", "0.66072947", "0.6599231", "0.659806", "0.6588655", "0.65840274", "0.6564795", "0.65615803", "0.65595883", "0.65584...
0.0
-1
Deletes an existing Tblalarm model. If deletion is successful, the browser will be redirected to the 'index' page.
public function actionDelete($id) { $transaction = Yii::$app->db->beginTransaction(); try { $model = $this->findModel($id); $todayDate = date('Y/m/d'); $model = $this->findModel($id); $advertiseCount = Advertise::find()->where(['enable' => 1])->andWh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionDelete()\n {\n if ($post = Template::validateDeleteForm()) {\n $id = $post['id'];\n $this->findModel($id)->delete();\n }\n return $this->redirect(['index']);\n }", "public function actionDelete()\n\t{\n\t parent::actionDelete();\n\t\t$model=...
[ "0.69846034", "0.68467", "0.6841764", "0.6833891", "0.6808618", "0.6769294", "0.6736195", "0.67261827", "0.6717854", "0.6662536", "0.6662536", "0.6660928", "0.66538006", "0.665326", "0.6650747", "0.66446424", "0.6642207", "0.66253215", "0.6624074", "0.6622085", "0.66208607", ...
0.0
-1
Finds the Tblalarm model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
protected function findModel($id) { if (($model = Tblalarm::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find($id){\n\t\t$db = static::getDatabaseConnection();\n\t\t//Create a select query\n\t\t$query = \"SELECT \" . implode(\",\" , static::$columns).\" FROM \" . static::$tableName . \" WHERE id = :id\";\n\t\t//prepare the query\n\t\t$statement = $db->prepare($query);\n\t\t//bind the column id with :i...
[ "0.68105197", "0.6678467", "0.6621848", "0.64031523", "0.63892", "0.63603026", "0.6339538", "0.6337232", "0.6317563", "0.6293772", "0.6288979", "0.62596446", "0.62428635", "0.6237229", "0.6228757", "0.62198466", "0.6206546", "0.6176235", "0.6170245", "0.6156178", "0.6146553",...
0.6900044
0
Used to dynamically call on Part class methods.
public function __call($method, $params) { return call_user_func_array([$this->part, $method], $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function processApi(){\r\n\t\t\t$service = explode(\"/\", $_GET['x']);\r\n\t\t\t$this->entity = ucfirst($service[0]);\r\n\t\t\t$this->methode = $service[1];\r\n\t\t\t$func = $this->methode.$this->entity;\r\n\t\t\t$this->addLog('--'.$this->methode.$this->entity);\r\n\t\t\tif((int)method_exists($this,$func) >...
[ "0.6112382", "0.5887222", "0.58145136", "0.58145136", "0.58145136", "0.58145136", "0.58068943", "0.5806176", "0.5750365", "0.5714113", "0.56220037", "0.5616709", "0.5608531", "0.5606833", "0.55685174", "0.552679", "0.5520472", "0.54972595", "0.5464452", "0.54644144", "0.54215...
0.53943086
24
Used to dynamically call on Part class properties.
public function __get($property) { try { return $this->part->{$property}; } catch (\Exception $ex) { return; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function properties();", "abstract protected function get_properties();", "function setProperty() {\n $instance = $this->CI->ciwy->current_instance[$this->component_name];\n $properties = func_get_arg(0);\n if (is_array($properties)) {\n foreach($properties as $key => $val) {\n...
[ "0.6687674", "0.63692695", "0.61895967", "0.6180883", "0.6150944", "0.6100913", "0.60526323", "0.6030412", "0.59998614", "0.58740646", "0.58621734", "0.57979953", "0.57975036", "0.57839894", "0.57376176", "0.57233965", "0.5705074", "0.564697", "0.5631568", "0.5630086", "0.558...
0.0
-1
/ This is the method of the Bingo controller which displays the Quotes object's data with the id of 5 in the justone view.
function index() { $this->data['pagebody'] = 'justone'; $source = $this->quotes->get(5); $this->data = array_merge($this->data, $source); $this->render(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index() {\n $this->data['pagebody'] = 'justone';\n // build the list of authors, to pass on to our view\n $full = $this->quotes->all();\n $authorNum = count($full);\n $source = $this->quotes->get($authorNum);\n\n $this->data['who'] = $source['who'];\n ...
[ "0.62914866", "0.62556475", "0.6160483", "0.61188173", "0.60503674", "0.6047461", "0.6003673", "0.59912694", "0.59705144", "0.5957686", "0.5936266", "0.59302026", "0.5908237", "0.59081936", "0.59057647", "0.58989197", "0.5897175", "0.5857955", "0.5845832", "0.58439136", "0.58...
0.67703867
0
/ This is the method of the Bingo controller which displays the Quotes object's data with the id of 6 in the justone view.
function wisdom() { $this->data['pagebody'] = 'justone'; $source = $this->quotes->get(6); $this->data = array_merge($this->data, $source); $this->render(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function index() {\r\n $this->data['pagebody'] = 'justone';\r\n \r\n $source = $this->quotes->get(5);\r\n \r\n $this->data = array_merge($this->data, $source);\r\n \r\n $this->render();\r\n }", "public function index() {\n $this->data['pagebody'] = 'just...
[ "0.6714972", "0.6231096", "0.6143138", "0.61000955", "0.60916793", "0.6068652", "0.6040153", "0.6001079", "0.5981224", "0.5937121", "0.59279346", "0.59232754", "0.59122777", "0.59081686", "0.5902826", "0.5867795", "0.58644533", "0.58193505", "0.5809522", "0.57964545", "0.5788...
0.5999657
8
Lints, or validates, an IAM policy. Currently checks the google.iam.v1.Binding.condition field, which contains a condition expression for a role binding. Successful calls to this method always return an HTTP `200 OK` status code, even if the linter detects an issue in the IAM policy. (iamPolicies.lintPolicy)
public function lintPolicy(LintPolicyRequest $postBody, $optParams = []) { $params = ['postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('lintPolicy', [$params], LintPolicyResponse::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize(Policy $policy): bool\n {\n /** @var \\App\\Area $area */\n $area = $this->find('area');\n\n return $policy->canUpdate(\n $area->team_id, $area->competition_id, $area->id\n );\n }", "public function setIamPolicy($var)\n {\n GPBUtil:...
[ "0.5250953", "0.521445", "0.50115305", "0.50115305", "0.50115305", "0.49290648", "0.49202427", "0.48376778", "0.48376778", "0.48106617", "0.47987488", "0.47174957", "0.46720922", "0.46046153", "0.46046153", "0.45415738", "0.44663948", "0.44056544", "0.4394819", "0.43901896", ...
0.69132173
0
Returns a list of services that allow you to opt into audit logs that are not generated by default. To learn more about audit logs, see the [Logging documentation]( (iamPolicies.queryAuditableServices)
public function queryAuditableServices(QueryAuditableServicesRequest $postBody, $optParams = []) { $params = ['postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('queryAuditableServices', [$params], QueryAuditableServicesResponse::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getListServices () {\n return self::findByStatus(self::STATUS_ACTIVE);\n }", "public function getServices();", "public function getServices()\n {\n return $this->services;\n }", "public function getServices()\n {\n return $this->services;\n }", "pu...
[ "0.6111063", "0.6021254", "0.59460855", "0.59460855", "0.59460855", "0.5925563", "0.5925563", "0.59175617", "0.59153557", "0.5889586", "0.58486766", "0.5790817", "0.57907534", "0.57807815", "0.57783866", "0.57488763", "0.571907", "0.5638905", "0.5588885", "0.55544466", "0.554...
0.6771422
0
TODO: Implement persiste() method.
public function persist($obj) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function persist();", "public function persist() {}", "function persist() ;", "public function persist()\n {\n }", "public function persist()\n {\n //\n }", "public function persist()\n {\n return 1;\n }", "public function persist($data);", "static protected fun...
[ "0.85103893", "0.84754986", "0.8470015", "0.8307271", "0.82072353", "0.76120144", "0.7413233", "0.73545116", "0.72353697", "0.7229123", "0.72126555", "0.71504414", "0.7138415", "0.71230507", "0.705632", "0.70508736", "0.70441693", "0.70331013", "0.698168", "0.6899018", "0.688...
0.7308662
8
Get the stub file for the generator.
protected function getStub() { return __DIR__ . '/stubs/trait.stub'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStubFile(): string\n {\n return $this->getStubFileFromPresetStorage($this->preset, 'seeder.stub');\n }", "protected function getStub()\n {\n return $this->files->get($this->getStubPath().'/default.stub');\n }", "public function getStubFile(): string\n {\n ...
[ "0.83577883", "0.81976575", "0.8165961", "0.8129762", "0.80362254", "0.8004043", "0.7957915", "0.79415196", "0.79104775", "0.7873869", "0.786923", "0.7858761", "0.78551805", "0.7849868", "0.78463316", "0.7844067", "0.78299034", "0.7825267", "0.7817042", "0.7811249", "0.779004...
0.73188674
84
Get the default namespace for the class.
protected function getDefaultNamespace($rootNamespace) { return $rootNamespace . '\Traits'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaultNamespace()\n\t{\n\t\treturn $this->default_namespace;\n\t}", "public function getDefaultNamespace();", "abstract public function getDefaultNameSpace();", "public function getNamespace()\n {\n return $this->getAttribute('metadata.namespace', 'default');\n }", "public ...
[ "0.8448936", "0.821764", "0.7800281", "0.74542356", "0.74156207", "0.7397914", "0.7362119", "0.7336174", "0.72904134", "0.7272925", "0.723129", "0.72085345", "0.7196747", "0.7127158", "0.7018227", "0.7012884", "0.69916", "0.6979542", "0.69777244", "0.6956813", "0.6936764", ...
0.64678067
91
sanitize or / and keywords, they are optional anyway and just needed for readability and to decide what is the mutual starting point for boolean logic on the first node level
public function sanitize($s) { # make sentence well formatted: "(A and(B) or C)" -> "(A and (B) or C)" #$s = preg_replace($this->PREPROCESS_OPERATORS1, '$1 $2$5$3 $4', $s); #$s = preg_replace($this->PREPROCESS_OPERATORS2, '$1 $2$5$3 $4', $s); #$s = preg_replace($this->PREPROCESS_OPERAT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function supportsLogicKeywords(): bool;", "public function isOr();", "function rest_sanitize_boolean($value)\n {\n }", "public static function or_() {\n $result = new qti_variable('single', 'boolean', array('value' => false));\r\n $params = func_get_args();\n // Allow a sing...
[ "0.6231335", "0.6209791", "0.6112906", "0.59193844", "0.56774294", "0.5573987", "0.5539705", "0.55121213", "0.5494223", "0.5468565", "0.5426854", "0.53588367", "0.53409356", "0.5335357", "0.53136945", "0.5303711", "0.52982104", "0.5276695", "0.5276691", "0.5258773", "0.525465...
0.0
-1
not operator becomes 1
private function substitute(&$x) { if ($x == "!" || $x == "not" || $x == "¬") { $x = -1; # xor operator becomes -2 } elseif ($x == "^" || $x == "xor" || $x == "⊕") { $x = -2; # xand operator becomes -3 } elseif ($x == "+" || $x == "xand" || $x == "⊖") { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function yy_r147(){ $this->_retvalue = new Stmt\\Expr('not', $this->yystack[$this->yyidx + 0]->minor); }", "function negate() { # :: Num -> Num\n return -$this->value;\n }", "public function negate()\n\t{\n\t\t$this->not_in = !$this->not_in;\n\t}", "function o_ne($a, $b) {\n\t\t\treturn Obj::sing...
[ "0.6861401", "0.66855174", "0.6611945", "0.65605384", "0.64400756", "0.64400756", "0.6423524", "0.63839453", "0.63315284", "0.61911464", "0.61763114", "0.61369884", "0.61035615", "0.6098328", "0.60749024", "0.60732347", "0.5984738", "0.5984388", "0.5955394", "0.5931643", "0.5...
0.0
-1
convert literal placeholders back to original strings and remove reserved boolean operator keywords from string
private function convertLiteralToList($tail) { # before substitution split sentence to literals $s = $this->sanitize($tail); if (count($s)) { $a = explode(' ', $s); array_walk($a, array($this, 'substitute')); return $a; } return NULL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function unescapeBoolean($bool);", "function prepare_eval($phrase)\n{\n $retVal = \"\";\n $retVal = str_replace(\"!\", \"\\\"\",$phrase);\n $retVal = str_replace(\"#\", \"'\", $retVal);\n return str_replace(\"~\", \"#\", $retVal);\n}", "protected function _clear_operator($str) {\...
[ "0.606175", "0.5674947", "0.5496095", "0.5475485", "0.5401048", "0.5264289", "0.5171866", "0.51709694", "0.51666445", "0.5131951", "0.5128939", "0.51193595", "0.511414", "0.51028115", "0.5081426", "0.5067587", "0.50608873", "0.50413966", "0.503225", "0.5002089", "0.49743825",...
0.0
-1
if it is not yet set and level is n (0 or 1) and OPERATOR is found from string
private function setMutual($s, $level, $n) { # this will take the first boolean AND/OR from the first levels of recursion # calculating from left and make it the mutual starting point if ($level == $n) { preg_match($this->OPERATORS, $s, $groups); if ($groups) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function parseOperator(TokenInterface $token);", "abstract function getOperator() : string ;", "function identify_operand(){\n global $token;\n global $identifier;\n global $label;\n switch ($token->data) {\n case 'string':\n $identifier->stringSearch = True;\n ...
[ "0.57558286", "0.5612808", "0.55412173", "0.5512435", "0.52748734", "0.52469224", "0.5216043", "0.5198736", "0.5196284", "0.51802784", "0.51482755", "0.51482755", "0.51095086", "0.50924915", "0.5086636", "0.505188", "0.50175476", "0.4979749", "0.4979749", "0.49522918", "0.495...
0.4828055
25
sub routine for open and close parentheses
private function subRecursiveParenthesesGroups(&$root, $tail, $level, $n) { # join tail to string # only if string is not empty if ($x = trim(implode('', $tail))) { # only id mutual is not set, # try to retrieve mutual boolean starting point if ($this->mutual ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insertparen($inparms){ \n if ($this->selectedNode >= 0) {\n if ($inparms['ptype'] == 'open') {\n $this->_query->insert(new queryElement('(', 'p'), $this->selectedNode);\n if ($this->selectedOperator > $this->selectedNode) {\n $this-...
[ "0.6278216", "0.62656116", "0.6223409", "0.59748745", "0.58937603", "0.5881608", "0.5880318", "0.5866443", "0.5841091", "0.5802723", "0.57891566", "0.5698434", "0.5671004", "0.5619261", "0.5587921", "0.5535531", "0.55239004", "0.5521584", "0.5514959", "0.5475387", "0.5430265"...
0.44179547
85
collect sub and final result to these variables
private function recursiveParenthesesGroups($i=0, $level=0) { list($tail, $root) = [[], []]; while ($i < $this->literal_string_length) { $char = substr($this->literal_string, $i, 1); # create a new node if ( if ($char == $this->OPEN_PARENTHESES) { $th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFinal()\n {\n }", "function intermediate() {}", "public function collect();", "function extract()\n {\n }", "private function getResult(): void\n {\n $matches = $this->getNeedlesResult();\n foreach ($matches as $n_key => $match) {\n if (is...
[ "0.5275692", "0.52105784", "0.51045465", "0.5034777", "0.50084394", "0.4996921", "0.49502286", "0.49502286", "0.49028453", "0.4867414", "0.48280042", "0.4792536", "0.47873583", "0.47209057", "0.47034994", "0.47013786", "0.46625718", "0.465845", "0.46411496", "0.46374464", "0....
0.0
-1
""" main method """
public function parse($input_string) { $this->input_string = trim($input_string); $this->setLiterals($input_string); return $this->recursiveParenthesesGroups(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function main()\n\t{\n\t}", "public function main()\r\n {\r\n \r\n }", "public static function main(){\n\t\t\t\n\t\t}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function m...
[ "0.8554008", "0.8539641", "0.851743", "0.8298197", "0.8298197", "0.8298197", "0.8298197", "0.8298197", "0.8298197", "0.8298197", "0.8298197", "0.8298197", "0.8298197", "0.8298197", "0.8298197", "0.8298197", "0.8298197", "0.8298197", "0.8298197", "0.8298197", "0.8298197", "0...
0.0
-1
if input is string, parse it first
public function evaluate($input, $table=array()) { if (is_string($input)) { $input = $this->parse($input); } // assume input is well formed so that we can calculate the truth value if (is_array($input)) { return $this->truthValue($input[1], !$input[0], $table, FAL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function parse(string $input);", "abstract public function parse($string);", "public function parse($string);", "public function getParsedInput();", "public function parse($input) {\n\t//--\n\treturn (array) $this->loadWithSource((array)$this->loadFromString((string)$input));\n\t//--\n}", "public ...
[ "0.7826728", "0.69849175", "0.69031763", "0.6446347", "0.6369607", "0.6347991", "0.62561387", "0.62323385", "0.6208592", "0.616453", "0.61327237", "0.61275005", "0.6066773", "0.60617614", "0.6013526", "0.6011265", "0.6011265", "0.6011265", "0.6011265", "0.59944946", "0.598277...
0.0
-1
xand, one or more, but not all single true is false, single false is false
private function some($a) { return $this->any($a) && !$this->all($a); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isAnd();", "protected static function logicalAND(){\n\t\t$values = func_get_args();\n\t\tif(is_array($values[0])){\n\t\t\t$values = $values[0];\n\t\t}\n\t\treturn self::junction('AND', $values);\n\t}", "static function logicalAnd()\n {\n try {\n return call_user_func_array(...
[ "0.74021274", "0.70463425", "0.6942415", "0.69396913", "0.6837641", "0.6666485", "0.6411244", "0.63768554", "0.63559246", "0.6050755", "0.60026705", "0.59410304", "0.5855419", "0.5771337", "0.57544744", "0.5744675", "0.5730817", "0.5711116", "0.57043093", "0.5642526", "0.5558...
0.56146514
20
or, at least one, may be all, maybe one
private function any($a) { return !empty(array_filter($a)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function all();", "public function isOr();", "protected function isMulti()\n\t{\n \treturn isset($this->results[0]);\n\t}", "public function getIsMultiple();", "function _eor() {\r\n\tforeach(func_get_args() as $a) { if (!empty($a)) return $a; }\r\n\treturn null;\r\n}", "public abstrac...
[ "0.58283746", "0.57536", "0.55696625", "0.5467285", "0.544191", "0.5361271", "0.5272775", "0.5247004", "0.5247004", "0.5247004", "0.52318573", "0.5212341", "0.5198526", "0.5178096", "0.5157721", "0.5155324", "0.5155324", "0.5155324", "0.5155324", "0.5155324", "0.5155324", "...
0.4729498
82
all, may be one
private function all($a) { return count(array_filter($a)) == count($a); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function all();", "public static function all();", "public static function all();", "public static function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "public function all();", "publi...
[ "0.76775575", "0.7456108", "0.7456108", "0.7456108", "0.72935855", "0.72935855", "0.72935855", "0.72935855", "0.72935855", "0.72935855", "0.72935855", "0.72935855", "0.72935855", "0.72935855", "0.72935855", "0.72935855", "0.72935855", "0.72935855", "0.72935855", "0.72935855", ...
0.0
-1
xor, only one of many single true is true, single false is true
private function one($a) { return count($a) == 1 || count(array_filter($a)) == 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function variant_xor($left, $right) {}", "public function testXorRule()\n {\n $rule = $this->getRuleBuilder()->fromArray(array(\n 'false',\n 'true',\n 'false'\n ), 'xor');\n $this->assertTrue($rule->validate());\n\n $rule = $this->getRuleBuilder()->...
[ "0.74873817", "0.71788675", "0.7095928", "0.6982807", "0.69719154", "0.6579137", "0.65178514", "0.61088914", "0.5910252", "0.5815082", "0.578028", "0.5679187", "0.5663545", "0.56599814", "0.56169987", "0.5572195", "0.55670065", "0.5481009", "0.5461369", "0.541034", "0.5298797...
0.0
-1
if item is not a list, check the truth value
private function truthValue($current_item, $mutual, $table, $negate, $xor, $xand) { if (!is_array($current_item)) { // see if translation table is given if ($table && isset($table[$current_item])) { $current_item = $table[$current_item]; } // cast ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function checkItem($item)\n {\n if ($item && !(is_array($item) || ($item instanceof \\ArrayAccess && $item instanceof \\Traversable))) {\n throw new UnexpectedTypeException($item, 'false or array');\n }\n }", "protected function is_array_item($item) {\n if (is_obje...
[ "0.7022458", "0.6522862", "0.6434926", "0.64278257", "0.61383533", "0.6054842", "0.6050075", "0.60213923", "0.59726304", "0.59271574", "0.5921141", "0.591758", "0.5915323", "0.5911135", "0.591046", "0.5876615", "0.5862566", "0.5848603", "0.5837345", "0.5809014", "0.5770026", ...
0.5185566
92
check parentheses and wrappers characters that they match
public function validate($input_string, $open=NULL, $close=NULL, $wrappers=NULL, $escape_char=NULL) { // for example (, [, { $open = $open ? $open : $this->OPEN_PARENTHESES; // for example: }, ], ) $close = $close ? $close : $this->CLOSE_PARENTHESES; // multiple wrapper chars acc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_escape_2($char)\n{\n\tif ($char === \".\" || $char === \"|\" || $char === \"(\" || $char === \")\" || $char === \"*\" || $char === \"+\")\n\t\treturn true;\n\treturn false;\n}", "public function testMatchesWithSurroundingLatinCharsAndLeadingPunctuation()\n {\n // insert start with punctuati...
[ "0.6375523", "0.62695706", "0.5993317", "0.59751755", "0.5872149", "0.58387923", "0.5814791", "0.57946444", "0.57855535", "0.57797015", "0.5694149", "0.5680376", "0.5659688", "0.5654301", "0.56273216", "0.56207126", "0.5612031", "0.5609077", "0.55909073", "0.55811775", "0.557...
0.60404205
2
Increments by 1 the number of assertions
public function incAssertions() { $this->assertions += 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function assertionCount(/* ... */)\n {\n return $this->_assertionCount;\n }", "#[@test]\n public function incActualCalls_increasesBy1() {\n $this->sut->incActualCalls();\n $this->assertEquals(1, $this->sut->getActualCalls());\n }", "public function incrementFailures(): bool;", "pu...
[ "0.6779922", "0.6744223", "0.6716259", "0.6409548", "0.6282011", "0.6221124", "0.62100166", "0.61761993", "0.61443913", "0.60896987", "0.588711", "0.5808428", "0.57891285", "0.57549226", "0.57466", "0.5738516", "0.56915593", "0.5687001", "0.56814003", "0.5667603", "0.56671506...
0.84521425
0
prints out the necessary content of this page
public function displayContent(){ include('/includes/homepage.inc.php'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printContent()\t{\n\n\t\t$this->content .= $this->doc->endPage();\n\t\techo $this->content;\n\t}", "public function printContent() {}", "public function printContent() {}", "public function printContent() {}", "public function printContent() {}", "public function printContent() {}", "public fu...
[ "0.7768717", "0.77353793", "0.77353793", "0.77353793", "0.7735166", "0.7735166", "0.7735166", "0.7735166", "0.7735166", "0.7735166", "0.7735166", "0.7735166", "0.7735166", "0.7735166", "0.7735166", "0.7735166", "0.7735166", "0.77350867", "0.77350867", "0.77350867", "0.7735086...
0.6595331
79
Add income associated with user and update balance on account
public function addIncome($amount, $username) { $account = Account::findOne([ 'username' => $username, ]); $account->balance += $amount; $account->update(true, ['balance']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addBalance(KittyInterface $kitty, UserInterface $user, $balance);", "private function updateBalance()\n {\n if (!auth()->user()->hasRole('admin')) {\n auth()->user()->update([\n 'credit' => auth()->user()->credit - $this->totalCost()\n ]);\n }\...
[ "0.7186446", "0.70116407", "0.6971003", "0.682782", "0.6742104", "0.67020196", "0.6411656", "0.6388643", "0.6381214", "0.63696676", "0.6346531", "0.63418406", "0.63284004", "0.6308818", "0.630253", "0.6275052", "0.6158905", "0.6147994", "0.612545", "0.61162007", "0.610759", ...
0.7166952
1
Add expense associated with user and update balance on account
public function addExpense($amount) { $account = Account::findOne([ 'username' => $this->getCurrentUser()->username, ]); $account->balance -= $amount; $account->update(true, ['balance']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function updateBalance()\n {\n if (!auth()->user()->hasRole('admin')) {\n auth()->user()->update([\n 'credit' => auth()->user()->credit - $this->totalCost()\n ]);\n }\n }", "public function addBalance(KittyInterface $kitty, UserInterface $user, $bal...
[ "0.6630428", "0.6629469", "0.6460036", "0.6426899", "0.64147335", "0.64030373", "0.62770855", "0.62143904", "0.6143566", "0.61303705", "0.6088098", "0.60440975", "0.60353595", "0.60353154", "0.60291684", "0.60246396", "0.60186255", "0.6007792", "0.5983248", "0.59716815", "0.5...
0.7496407
0
Create a new job instance.
public function __construct(Request $request, LoanApplication $application) { $this->request = $request; $this->application = $application; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createJob( $creationParameters ){ return $this->APICallSub( '/jobs', array( 'create' => $creationParameters ), \"Could not create new job with query \" . $creationParameters['query'] . \" and operation \" . $creationParameters['operation'] ); }", "abstract public function makeJob();", "abstract...
[ "0.6920934", "0.6904838", "0.6904838", "0.6868104", "0.6808779", "0.65273094", "0.6518345", "0.64923275", "0.6489805", "0.6467702", "0.6427481", "0.64067507", "0.63930124", "0.6390954", "0.6374191", "0.63040626", "0.6256694", "0.624258", "0.6201882", "0.6178255", "0.60741466"...
0.0
-1