id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
224,600
rafasamp/sonus
src/Rafasamp/Sonus/Sonus.php
Sonus.getSupportedVideoDecoders
public static function getSupportedVideoDecoders() { // Run terminal command $command = self::getConverterPath().' -decoders'; $output = shell_exec($command); // PREG pattern to retrive version information $output = preg_match_all("/[V]([.]|\w)([.]|\w)([.]|\w)([.]|\w)([.]|\...
php
public static function getSupportedVideoDecoders() { // Run terminal command $command = self::getConverterPath().' -decoders'; $output = shell_exec($command); // PREG pattern to retrive version information $output = preg_match_all("/[V]([.]|\w)([.]|\w)([.]|\w)([.]|\w)([.]|\...
[ "public", "static", "function", "getSupportedVideoDecoders", "(", ")", "{", "// Run terminal command", "$", "command", "=", "self", "::", "getConverterPath", "(", ")", ".", "' -decoders'", ";", "$", "output", "=", "shell_exec", "(", "$", "command", ")", ";", "...
Returns all video formats ffmpeg can decode @return array
[ "Returns", "all", "video", "formats", "ffmpeg", "can", "decode" ]
bdf49840c5de4e72a7b767eec399d3338f1f9779
https://github.com/rafasamp/sonus/blob/bdf49840c5de4e72a7b767eec399d3338f1f9779/src/Rafasamp/Sonus/Sonus.php#L167-L183
224,601
rafasamp/sonus
src/Rafasamp/Sonus/Sonus.php
Sonus.canEncode
public static function canEncode($format) { $formats = array_merge(self::getSupportedAudioEncoders(), self::getSupportedVideoEncoders()); // Return boolean if they can be encoded or not if(!in_array($format, $formats)) { return false; } else { return...
php
public static function canEncode($format) { $formats = array_merge(self::getSupportedAudioEncoders(), self::getSupportedVideoEncoders()); // Return boolean if they can be encoded or not if(!in_array($format, $formats)) { return false; } else { return...
[ "public", "static", "function", "canEncode", "(", "$", "format", ")", "{", "$", "formats", "=", "array_merge", "(", "self", "::", "getSupportedAudioEncoders", "(", ")", ",", "self", "::", "getSupportedVideoEncoders", "(", ")", ")", ";", "// Return boolean if the...
Returns boolean if ffmpeg is able to encode to this format @param string $format ffmpeg format name @return boolean
[ "Returns", "boolean", "if", "ffmpeg", "is", "able", "to", "encode", "to", "this", "format" ]
bdf49840c5de4e72a7b767eec399d3338f1f9779
https://github.com/rafasamp/sonus/blob/bdf49840c5de4e72a7b767eec399d3338f1f9779/src/Rafasamp/Sonus/Sonus.php#L190-L201
224,602
rafasamp/sonus
src/Rafasamp/Sonus/Sonus.php
Sonus.canDecode
public static function canDecode($format) { // Get an array with all supported encoding formats $formats = array_merge(self::getSupportedAudioDecoders(), self::getSupportedVideoDecoders()); // Return boolean if they can be encoded or not if(!in_array($format, $formats)) { ...
php
public static function canDecode($format) { // Get an array with all supported encoding formats $formats = array_merge(self::getSupportedAudioDecoders(), self::getSupportedVideoDecoders()); // Return boolean if they can be encoded or not if(!in_array($format, $formats)) { ...
[ "public", "static", "function", "canDecode", "(", "$", "format", ")", "{", "// Get an array with all supported encoding formats", "$", "formats", "=", "array_merge", "(", "self", "::", "getSupportedAudioDecoders", "(", ")", ",", "self", "::", "getSupportedVideoDecoders"...
Returns boolean if ffmpeg is able to decode to this format @param string $format ffmpeg format name @return boolean
[ "Returns", "boolean", "if", "ffmpeg", "is", "able", "to", "decode", "to", "this", "format" ]
bdf49840c5de4e72a7b767eec399d3338f1f9779
https://github.com/rafasamp/sonus/blob/bdf49840c5de4e72a7b767eec399d3338f1f9779/src/Rafasamp/Sonus/Sonus.php#L208-L220
224,603
rafasamp/sonus
src/Rafasamp/Sonus/Sonus.php
Sonus.getMediaInfo
public static function getMediaInfo($input, $type = null) { // Just making sure everything goes smooth if (substr($input, 0, 2) == '-i') { $input = substr($input, 3); } switch ($type) { case 'json': $command = self::getProbeP...
php
public static function getMediaInfo($input, $type = null) { // Just making sure everything goes smooth if (substr($input, 0, 2) == '-i') { $input = substr($input, 3); } switch ($type) { case 'json': $command = self::getProbeP...
[ "public", "static", "function", "getMediaInfo", "(", "$", "input", ",", "$", "type", "=", "null", ")", "{", "// Just making sure everything goes smooth", "if", "(", "substr", "(", "$", "input", ",", "0", ",", "2", ")", "==", "'-i'", ")", "{", "$", "input...
Returns array with file information @param string $input file input @param string $type output format @return array, json, xml, csv
[ "Returns", "array", "with", "file", "information" ]
bdf49840c5de4e72a7b767eec399d3338f1f9779
https://github.com/rafasamp/sonus/blob/bdf49840c5de4e72a7b767eec399d3338f1f9779/src/Rafasamp/Sonus/Sonus.php#L228-L262
224,604
rafasamp/sonus
src/Rafasamp/Sonus/Sonus.php
Sonus.overwrite
public function overwrite($var = true) { switch ($var) { case true: array_push($this->parameters, '-y'); return $this; break; case false: array_push($this->parameters, '-n'); return $this; ...
php
public function overwrite($var = true) { switch ($var) { case true: array_push($this->parameters, '-y'); return $this; break; case false: array_push($this->parameters, '-n'); return $this; ...
[ "public", "function", "overwrite", "(", "$", "var", "=", "true", ")", "{", "switch", "(", "$", "var", ")", "{", "case", "true", ":", "array_push", "(", "$", "this", "->", "parameters", ",", "'-y'", ")", ";", "return", "$", "this", ";", "break", ";"...
Overwrite output file if it exists @param boolean $var @return boolean
[ "Overwrite", "output", "file", "if", "it", "exists" ]
bdf49840c5de4e72a7b767eec399d3338f1f9779
https://github.com/rafasamp/sonus/blob/bdf49840c5de4e72a7b767eec399d3338f1f9779/src/Rafasamp/Sonus/Sonus.php#L380-L398
224,605
rafasamp/sonus
src/Rafasamp/Sonus/Sonus.php
Sonus.bitrate
public function bitrate($var, $type = 'audio') { // Value must be numeric if (!is_numeric($var)) { return false; } switch ($type) { case 'audio': array_push($this->parameters, '-b:a '.$var.'k'); return $this; ...
php
public function bitrate($var, $type = 'audio') { // Value must be numeric if (!is_numeric($var)) { return false; } switch ($type) { case 'audio': array_push($this->parameters, '-b:a '.$var.'k'); return $this; ...
[ "public", "function", "bitrate", "(", "$", "var", ",", "$", "type", "=", "'audio'", ")", "{", "// Value must be numeric", "if", "(", "!", "is_numeric", "(", "$", "var", ")", ")", "{", "return", "false", ";", "}", "switch", "(", "$", "type", ")", "{",...
Sets the constant bitrate @param int $var bitrate @return boolean
[ "Sets", "the", "constant", "bitrate" ]
bdf49840c5de4e72a7b767eec399d3338f1f9779
https://github.com/rafasamp/sonus/blob/bdf49840c5de4e72a7b767eec399d3338f1f9779/src/Rafasamp/Sonus/Sonus.php#L455-L479
224,606
rafasamp/sonus
src/Rafasamp/Sonus/Sonus.php
Sonus.getProgress
public static function getProgress($job, $format = null) { // Get the temporary directory $tmpdir = self::getTempPath(); // The code below has been adapted from Jimbo // http://stackoverflow.com/questions/11441517/ffmpeg-progress-bar-encoding-percentage-in-php $content = @fi...
php
public static function getProgress($job, $format = null) { // Get the temporary directory $tmpdir = self::getTempPath(); // The code below has been adapted from Jimbo // http://stackoverflow.com/questions/11441517/ffmpeg-progress-bar-encoding-percentage-in-php $content = @fi...
[ "public", "static", "function", "getProgress", "(", "$", "job", ",", "$", "format", "=", "null", ")", "{", "// Get the temporary directory", "$", "tmpdir", "=", "self", "::", "getTempPath", "(", ")", ";", "// The code below has been adapted from Jimbo", "// http://s...
Returns given job progress @param string $job id @param string $format format to output data @return array
[ "Returns", "given", "job", "progress" ]
bdf49840c5de4e72a7b767eec399d3338f1f9779
https://github.com/rafasamp/sonus/blob/bdf49840c5de4e72a7b767eec399d3338f1f9779/src/Rafasamp/Sonus/Sonus.php#L575-L638
224,607
rafasamp/sonus
src/Rafasamp/Sonus/Sonus.php
Sonus.destroyProgress
public static function destroyProgress($job) { // Get temporary file path $file = $tmpdir.$job.'.sonustmp'; // Check if file exists if (is_file($file)) { // Delete file $output = unlink($tmpdir.$job.'.sonustmp'); return $output; ...
php
public static function destroyProgress($job) { // Get temporary file path $file = $tmpdir.$job.'.sonustmp'; // Check if file exists if (is_file($file)) { // Delete file $output = unlink($tmpdir.$job.'.sonustmp'); return $output; ...
[ "public", "static", "function", "destroyProgress", "(", "$", "job", ")", "{", "// Get temporary file path", "$", "file", "=", "$", "tmpdir", ".", "$", "job", ".", "'.sonustmp'", ";", "// Check if file exists", "if", "(", "is_file", "(", "$", "file", ")", ")"...
Deletes job temporary file @param string $job id @return boolean
[ "Deletes", "job", "temporary", "file" ]
bdf49840c5de4e72a7b767eec399d3338f1f9779
https://github.com/rafasamp/sonus/blob/bdf49840c5de4e72a7b767eec399d3338f1f9779/src/Rafasamp/Sonus/Sonus.php#L645-L659
224,608
rafasamp/sonus
src/Rafasamp/Sonus/Sonus.php
Sonus.destroyAllProgress
public static function destroyAllProgress() { // Get all filenames within the temporary folder $files = glob($tmpdir.'*'); // Iterate through files $output = array(); foreach ($files as $file) { if (is_file($file)) { // Retur...
php
public static function destroyAllProgress() { // Get all filenames within the temporary folder $files = glob($tmpdir.'*'); // Iterate through files $output = array(); foreach ($files as $file) { if (is_file($file)) { // Retur...
[ "public", "static", "function", "destroyAllProgress", "(", ")", "{", "// Get all filenames within the temporary folder", "$", "files", "=", "glob", "(", "$", "tmpdir", ".", "'*'", ")", ";", "// Iterate through files", "$", "output", "=", "array", "(", ")", ";", ...
Deletes all temporary files @return boolean
[ "Deletes", "all", "temporary", "files" ]
bdf49840c5de4e72a7b767eec399d3338f1f9779
https://github.com/rafasamp/sonus/blob/bdf49840c5de4e72a7b767eec399d3338f1f9779/src/Rafasamp/Sonus/Sonus.php#L665-L689
224,609
Troopers/AlertifyBundle
Handler/AlertifySessionHandler.php
AlertifySessionHandler.getDefaultParametersFromContext
protected function getDefaultParametersFromContext($context = null) { if (count($this->defaultParameters['contexts'])) { //If context is not given, just take the default one if ($context === null) { $context = $this->defaultParameters['default']['context']; ...
php
protected function getDefaultParametersFromContext($context = null) { if (count($this->defaultParameters['contexts'])) { //If context is not given, just take the default one if ($context === null) { $context = $this->defaultParameters['default']['context']; ...
[ "protected", "function", "getDefaultParametersFromContext", "(", "$", "context", "=", "null", ")", "{", "if", "(", "count", "(", "$", "this", "->", "defaultParameters", "[", "'contexts'", "]", ")", ")", "{", "//If context is not given, just take the default one", "i...
Get the configuration for the given context. @param string $context The actual context @return array
[ "Get", "the", "configuration", "for", "the", "given", "context", "." ]
eded39af141d056627718d2ba7dee4e458fb7187
https://github.com/Troopers/AlertifyBundle/blob/eded39af141d056627718d2ba7dee4e458fb7187/Handler/AlertifySessionHandler.php#L72-L88
224,610
burnbright/silverstripe-importexport
code/gridfield/GridFieldImporter.php
GridFieldImporter.getLoader
public function getLoader(GridField $gridField) { if (!$this->loader) { $this->loader = $this->scaffoldLoader($gridField); } return $this->loader; }
php
public function getLoader(GridField $gridField) { if (!$this->loader) { $this->loader = $this->scaffoldLoader($gridField); } return $this->loader; }
[ "public", "function", "getLoader", "(", "GridField", "$", "gridField", ")", "{", "if", "(", "!", "$", "this", "->", "loader", ")", "{", "$", "this", "->", "loader", "=", "$", "this", "->", "scaffoldLoader", "(", "$", "gridField", ")", ";", "}", "retu...
Get the BulkLoader @return BetterBulkLoader
[ "Get", "the", "BulkLoader" ]
673ca4f63ce69d2128c2cd31daac64ee5bb2ecb3
https://github.com/burnbright/silverstripe-importexport/blob/673ca4f63ce69d2128c2cd31daac64ee5bb2ecb3/code/gridfield/GridFieldImporter.php#L48-L55
224,611
burnbright/silverstripe-importexport
code/gridfield/GridFieldImporter.php
GridFieldImporter.scaffoldLoader
public function scaffoldLoader(GridField $gridField) { $gridlist = $gridField->getList(); $class = ($gridlist instanceof HasManyList) ? "ListBulkLoader" : "BetterBulkLoader"; //set the correct constructor argument $arg = ($class === "ListBulkLoader" || is_...
php
public function scaffoldLoader(GridField $gridField) { $gridlist = $gridField->getList(); $class = ($gridlist instanceof HasManyList) ? "ListBulkLoader" : "BetterBulkLoader"; //set the correct constructor argument $arg = ($class === "ListBulkLoader" || is_...
[ "public", "function", "scaffoldLoader", "(", "GridField", "$", "gridField", ")", "{", "$", "gridlist", "=", "$", "gridField", "->", "getList", "(", ")", ";", "$", "class", "=", "(", "$", "gridlist", "instanceof", "HasManyList", ")", "?", "\"ListBulkLoader\""...
Scaffold a bulk loader, if none is provided
[ "Scaffold", "a", "bulk", "loader", "if", "none", "is", "provided" ]
673ca4f63ce69d2128c2cd31daac64ee5bb2ecb3
https://github.com/burnbright/silverstripe-importexport/blob/673ca4f63ce69d2128c2cd31daac64ee5bb2ecb3/code/gridfield/GridFieldImporter.php#L60-L73
224,612
burnbright/silverstripe-importexport
code/gridfield/GridFieldImporter.php
GridFieldImporter.getUploadField
public function getUploadField(GridField $gridField) { $uploadField = UploadField::create( $gridField->Name."_ImportUploadField", 'Upload CSV' ) ->setForm($gridField->getForm()) ->setConfig('url', $gridField->Link('importer/upload')) ->setConfi...
php
public function getUploadField(GridField $gridField) { $uploadField = UploadField::create( $gridField->Name."_ImportUploadField", 'Upload CSV' ) ->setForm($gridField->getForm()) ->setConfig('url', $gridField->Link('importer/upload')) ->setConfi...
[ "public", "function", "getUploadField", "(", "GridField", "$", "gridField", ")", "{", "$", "uploadField", "=", "UploadField", "::", "create", "(", "$", "gridField", "->", "Name", ".", "\"_ImportUploadField\"", ",", "'Upload CSV'", ")", "->", "setForm", "(", "$...
Return a configured UploadField instance @param GridField $gridField Current GridField @return UploadField Configured UploadField instance
[ "Return", "a", "configured", "UploadField", "instance" ]
673ca4f63ce69d2128c2cd31daac64ee5bb2ecb3
https://github.com/burnbright/silverstripe-importexport/blob/673ca4f63ce69d2128c2cd31daac64ee5bb2ecb3/code/gridfield/GridFieldImporter.php#L125-L143
224,613
burnbright/silverstripe-importexport
code/gridfield/GridFieldImporter.php
GridFieldImporter.handleImporter
public function handleImporter($gridField, $request = null) { $controller = $gridField->getForm()->getController(); $handler = new GridFieldImporter_Request($gridField, $this, $controller); return $handler->handleRequest($request, DataModel::inst()); }
php
public function handleImporter($gridField, $request = null) { $controller = $gridField->getForm()->getController(); $handler = new GridFieldImporter_Request($gridField, $this, $controller); return $handler->handleRequest($request, DataModel::inst()); }
[ "public", "function", "handleImporter", "(", "$", "gridField", ",", "$", "request", "=", "null", ")", "{", "$", "controller", "=", "$", "gridField", "->", "getForm", "(", ")", "->", "getController", "(", ")", ";", "$", "handler", "=", "new", "GridFieldIm...
Pass importer requests to a new GridFieldImporter_Request
[ "Pass", "importer", "requests", "to", "a", "new", "GridFieldImporter_Request" ]
673ca4f63ce69d2128c2cd31daac64ee5bb2ecb3
https://github.com/burnbright/silverstripe-importexport/blob/673ca4f63ce69d2128c2cd31daac64ee5bb2ecb3/code/gridfield/GridFieldImporter.php#L160-L166
224,614
neos/setup
Classes/Step/DatabaseStep.php
DatabaseStep.getAvailableDrivers
protected function getAvailableDrivers() { $supportedDrivers = [ 'pdo_mysql' => 'MySQL/MariaDB via PDO', 'mysqli' => 'MySQL/MariaDB via mysqli', 'pdo_pgsql' => 'PostgreSQL via PDO' ]; $availableDrivers = []; foreach ($supportedDrivers as $driver =...
php
protected function getAvailableDrivers() { $supportedDrivers = [ 'pdo_mysql' => 'MySQL/MariaDB via PDO', 'mysqli' => 'MySQL/MariaDB via mysqli', 'pdo_pgsql' => 'PostgreSQL via PDO' ]; $availableDrivers = []; foreach ($supportedDrivers as $driver =...
[ "protected", "function", "getAvailableDrivers", "(", ")", "{", "$", "supportedDrivers", "=", "[", "'pdo_mysql'", "=>", "'MySQL/MariaDB via PDO'", ",", "'mysqli'", "=>", "'MySQL/MariaDB via mysqli'", ",", "'pdo_pgsql'", "=>", "'PostgreSQL via PDO'", "]", ";", "$", "ava...
Return an array with driver. This is built on supported drivers (those we actually provide migration for in Flow and Neos), filtered to show only available options (needed extension loaded, actually usable in current setup). @return array
[ "Return", "an", "array", "with", "driver", "." ]
7b5437efe8113e997007be6896628aa9f5c39d2f
https://github.com/neos/setup/blob/7b5437efe8113e997007be6896628aa9f5c39d2f/Classes/Step/DatabaseStep.php#L208-L224
224,615
joomla-framework/github-api
src/Package/Issues/Assignees.php
Assignees.check
public function check($owner, $repo, $assignee) { // Build the request path. $path = '/repos/' . $owner . '/' . $repo . '/assignees/' . $assignee; try { $response = $this->client->get($this->fetchUrl($path)); if ($response->code == 204) { return true; } throw new UnexpectedResponseExcepti...
php
public function check($owner, $repo, $assignee) { // Build the request path. $path = '/repos/' . $owner . '/' . $repo . '/assignees/' . $assignee; try { $response = $this->client->get($this->fetchUrl($path)); if ($response->code == 204) { return true; } throw new UnexpectedResponseExcepti...
[ "public", "function", "check", "(", "$", "owner", ",", "$", "repo", ",", "$", "assignee", ")", "{", "// Build the request path.", "$", "path", "=", "'/repos/'", ".", "$", "owner", ".", "'/'", ".", "$", "repo", ".", "'/assignees/'", ".", "$", "assignee", ...
Check assignee. You may check to see if a particular user is an assignee for a repository. If the given assignee login belongs to an assignee for the repository, a 204 header with no content is returned. Otherwise a 404 status code is returned. @param string $owner The name of the owner of the GitHub repositor...
[ "Check", "assignee", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Issues/Assignees.php#L62-L87
224,616
joomla-framework/github-api
src/Package/Issues/Assignees.php
Assignees.add
public function add($owner, $repo, $number, array $assignees) { // Build the request path. $path = "/repos/$owner/$repo/issues/$number/assignees"; $data = json_encode( array( 'assignees' => $assignees, ) ); return $this->processResponse($this->client->post($this->fetchUrl($path), $data), 201); }
php
public function add($owner, $repo, $number, array $assignees) { // Build the request path. $path = "/repos/$owner/$repo/issues/$number/assignees"; $data = json_encode( array( 'assignees' => $assignees, ) ); return $this->processResponse($this->client->post($this->fetchUrl($path), $data), 201); }
[ "public", "function", "add", "(", "$", "owner", ",", "$", "repo", ",", "$", "number", ",", "array", "$", "assignees", ")", "{", "// Build the request path.", "$", "path", "=", "\"/repos/$owner/$repo/issues/$number/assignees\"", ";", "$", "data", "=", "json_encod...
Add assignees to an Issue This call adds the users passed in the assignees key (as their logins) to the issue. @param string $owner The name of the owner of the GitHub repository. @param string $repo The name of the GitHub repository. @param integer $number The issue number to add assigne...
[ "Add", "assignees", "to", "an", "Issue" ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Issues/Assignees.php#L104-L116
224,617
joomla-framework/github-api
src/Package/Issues/Assignees.php
Assignees.remove
public function remove($owner, $repo, $number, array $assignees) { // Build the request path. $path = "/repos/$owner/$repo/issues/$number/assignees"; $data = json_encode( array( 'assignees' => $assignees, ) ); return $this->processResponse($this->client->delete($this->fetchUrl($path), array(), nu...
php
public function remove($owner, $repo, $number, array $assignees) { // Build the request path. $path = "/repos/$owner/$repo/issues/$number/assignees"; $data = json_encode( array( 'assignees' => $assignees, ) ); return $this->processResponse($this->client->delete($this->fetchUrl($path), array(), nu...
[ "public", "function", "remove", "(", "$", "owner", ",", "$", "repo", ",", "$", "number", ",", "array", "$", "assignees", ")", "{", "// Build the request path.", "$", "path", "=", "\"/repos/$owner/$repo/issues/$number/assignees\"", ";", "$", "data", "=", "json_en...
Remove assignees from an Issue This call removes the users passed in the assignees key (as their logins) from the issue. @param string $owner The name of the owner of the GitHub repository. @param string $repo The name of the GitHub repository. @param integer $number The issue number to a...
[ "Remove", "assignees", "from", "an", "Issue" ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Issues/Assignees.php#L133-L145
224,618
acacha/users
src/Models/UserInvitation.php
UserInvitation.setInitialState
public function setInitialState() { $this->setAttribute($this->getStateColumn(), $this->getInitialState()); $this->token = hash_hmac('sha256', str_random(40), env('APP_KEY')); }
php
public function setInitialState() { $this->setAttribute($this->getStateColumn(), $this->getInitialState()); $this->token = hash_hmac('sha256', str_random(40), env('APP_KEY')); }
[ "public", "function", "setInitialState", "(", ")", "{", "$", "this", "->", "setAttribute", "(", "$", "this", "->", "getStateColumn", "(", ")", ",", "$", "this", "->", "getInitialState", "(", ")", ")", ";", "$", "this", "->", "token", "=", "hash_hmac", ...
Set the initial state. @return void
[ "Set", "the", "initial", "state", "." ]
af74be23d225bc9a23ee049579abb1596ae683c0
https://github.com/acacha/users/blob/af74be23d225bc9a23ee049579abb1596ae683c0/src/Models/UserInvitation.php#L67-L71
224,619
joomla-framework/github-api
src/Package/Issues.php
Issues.create
public function create($user, $repo, $title, $body = null, $assignee = null, $milestone = null, array $labels = array(), array $assignees = array() ) { // Build the request path. $path = '/repos/' . $user . '/' . $repo . '/issues'; // Ensure that we have a non-associative array. if (!empty($labels)) { ...
php
public function create($user, $repo, $title, $body = null, $assignee = null, $milestone = null, array $labels = array(), array $assignees = array() ) { // Build the request path. $path = '/repos/' . $user . '/' . $repo . '/issues'; // Ensure that we have a non-associative array. if (!empty($labels)) { ...
[ "public", "function", "create", "(", "$", "user", ",", "$", "repo", ",", "$", "title", ",", "$", "body", "=", "null", ",", "$", "assignee", "=", "null", ",", "$", "milestone", "=", "null", ",", "array", "$", "labels", "=", "array", "(", ")", ",",...
Create an issue. @param string $user The name of the owner of the GitHub repository. @param string $repo The name of the GitHub repository. @param string $title The title of the new issue. @param string $body The body text for the new issue. @param string $assignee The...
[ "Create", "an", "issue", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Issues.php#L46-L86
224,620
joomla-framework/github-api
src/Package/Issues.php
Issues.edit
public function edit($user, $repo, $issueId, $state = null, $title = null, $body = null, $assignee = null, $milestone = null, array $labels = null ) { // Build the request path. $path = '/repos/' . $user . '/' . $repo . '/issues/' . (int) $issueId; // Create the data object. $data = new \stdClass; // If...
php
public function edit($user, $repo, $issueId, $state = null, $title = null, $body = null, $assignee = null, $milestone = null, array $labels = null ) { // Build the request path. $path = '/repos/' . $user . '/' . $repo . '/issues/' . (int) $issueId; // Create the data object. $data = new \stdClass; // If...
[ "public", "function", "edit", "(", "$", "user", ",", "$", "repo", ",", "$", "issueId", ",", "$", "state", "=", "null", ",", "$", "title", "=", "null", ",", "$", "body", "=", "null", ",", "$", "assignee", "=", "null", ",", "$", "milestone", "=", ...
Edit an issue. @param string $user The name of the owner of the GitHub repository. @param string $repo The name of the GitHub repository. @param integer $issueId The issue number. @param string $state The optional new state for the issue. [open, closed] @param string $title ...
[ "Edit", "an", "issue", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Issues.php#L106-L163
224,621
joomla-framework/github-api
src/Package/Issues.php
Issues.getList
public function getList($filter = null, $state = null, $labels = null, $sort = null, $direction = null, \DateTime $since = null, $page = 0, $limit = 0 ) { // Build the request path. $uri = new Uri($this->fetchUrl('/issues', $page, $limit)); if ($filter) { $uri->setVar('filter', $filter); } if ($sta...
php
public function getList($filter = null, $state = null, $labels = null, $sort = null, $direction = null, \DateTime $since = null, $page = 0, $limit = 0 ) { // Build the request path. $uri = new Uri($this->fetchUrl('/issues', $page, $limit)); if ($filter) { $uri->setVar('filter', $filter); } if ($sta...
[ "public", "function", "getList", "(", "$", "filter", "=", "null", ",", "$", "state", "=", "null", ",", "$", "labels", "=", "null", ",", "$", "sort", "=", "null", ",", "$", "direction", "=", "null", ",", "\\", "DateTime", "$", "since", "=", "null", ...
List issues. @param string $filter The filter type: assigned, created, mentioned, subscribed. @param string $state The optional state to filter requests by. [open, closed] @param string $labels The list of comma separated Label names. Example: bug,ui,@high. @param string $sort ...
[ "List", "issues", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Issues.php#L203-L242
224,622
joomla-framework/github-api
src/Package/Issues.php
Issues.getListByRepository
public function getListByRepository($user, $repo, $milestone = null, $state = null, $assignee = null, $mentioned = null, $labels = null, $sort = null, $direction = null, \DateTime $since = null, $page = 0, $limit = 0 ) { // Build the request path. $path = '/repos/' . $user . '/' . $repo . '/issues'; $uri = n...
php
public function getListByRepository($user, $repo, $milestone = null, $state = null, $assignee = null, $mentioned = null, $labels = null, $sort = null, $direction = null, \DateTime $since = null, $page = 0, $limit = 0 ) { // Build the request path. $path = '/repos/' . $user . '/' . $repo . '/issues'; $uri = n...
[ "public", "function", "getListByRepository", "(", "$", "user", ",", "$", "repo", ",", "$", "milestone", "=", "null", ",", "$", "state", "=", "null", ",", "$", "assignee", "=", "null", ",", "$", "mentioned", "=", "null", ",", "$", "labels", "=", "null...
List issues for a repository. @param string $user The name of the owner of the GitHub repository. @param string $repo The name of the GitHub repository. @param string $milestone The milestone number, 'none', or *. @param string $state The optional state to filter requests by. ...
[ "List", "issues", "for", "a", "repository", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Issues.php#L265-L316
224,623
joomla-framework/github-api
src/Package/Issues.php
Issues.lock
public function lock($user, $repo, $issueId) { // Build the request path. $path = "/repos/$user/$repo/issues/" . (int) $issueId . '/lock'; return $this->processResponse($this->client->put($this->fetchUrl($path), array()), 204); }
php
public function lock($user, $repo, $issueId) { // Build the request path. $path = "/repos/$user/$repo/issues/" . (int) $issueId . '/lock'; return $this->processResponse($this->client->put($this->fetchUrl($path), array()), 204); }
[ "public", "function", "lock", "(", "$", "user", ",", "$", "repo", ",", "$", "issueId", ")", "{", "// Build the request path.", "$", "path", "=", "\"/repos/$user/$repo/issues/\"", ".", "(", "int", ")", "$", "issueId", ".", "'/lock'", ";", "return", "$", "th...
Lock an issue. @param string $user The name of the owner of the GitHub repository. @param string $repo The name of the GitHub repository. @param integer $issueId The issue number. @return object @since 1.4.0 @throws \DomainException
[ "Lock", "an", "issue", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Issues.php#L330-L336
224,624
joomla-framework/github-api
src/Package/Issues.php
Issues.unlock
public function unlock($user, $repo, $issueId) { // Build the request path. $path = "/repos/$user/$repo/issues/" . (int) $issueId . '/lock'; return $this->processResponse($this->client->delete($this->fetchUrl($path)), 204); }
php
public function unlock($user, $repo, $issueId) { // Build the request path. $path = "/repos/$user/$repo/issues/" . (int) $issueId . '/lock'; return $this->processResponse($this->client->delete($this->fetchUrl($path)), 204); }
[ "public", "function", "unlock", "(", "$", "user", ",", "$", "repo", ",", "$", "issueId", ")", "{", "// Build the request path.", "$", "path", "=", "\"/repos/$user/$repo/issues/\"", ".", "(", "int", ")", "$", "issueId", ".", "'/lock'", ";", "return", "$", "...
Unlock an issue. @param string $user The name of the owner of the GitHub repository. @param string $repo The name of the GitHub repository. @param integer $issueId The issue number. @return object @since 1.4.0 @throws \DomainException
[ "Unlock", "an", "issue", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Issues.php#L350-L356
224,625
codebach/PianoSoloWeatherBundle
Http/WeatherCsvResponse.php
WeatherCsvResponse.createCsvResponse
public function createCsvResponse() { $handle = fopen('php://memory', 'r+'); fputcsv($handle, array('Date', 'City', 'Temperature', 'Description')); foreach ($this->weathers as $weather) { fputcsv($handle, array( $weather->getWdate(), $weather->get...
php
public function createCsvResponse() { $handle = fopen('php://memory', 'r+'); fputcsv($handle, array('Date', 'City', 'Temperature', 'Description')); foreach ($this->weathers as $weather) { fputcsv($handle, array( $weather->getWdate(), $weather->get...
[ "public", "function", "createCsvResponse", "(", ")", "{", "$", "handle", "=", "fopen", "(", "'php://memory'", ",", "'r+'", ")", ";", "fputcsv", "(", "$", "handle", ",", "array", "(", "'Date'", ",", "'City'", ",", "'Temperature'", ",", "'Description'", ")",...
Creates CSV Response of Weathers @return Response
[ "Creates", "CSV", "Response", "of", "Weathers" ]
f6b3ce0a86dbd8ab4e23d4e2d3031e6d4af0e269
https://github.com/codebach/PianoSoloWeatherBundle/blob/f6b3ce0a86dbd8ab4e23d4e2d3031e6d4af0e269/Http/WeatherCsvResponse.php#L43-L67
224,626
netz98/n98-deployer
src/Deployer/RoleManager.php
RoleManager.addServerToRoles
public static function addServerToRoles($server, array $roles) { foreach ($roles as $role) { self::$roles[$role][] = $server; } }
php
public static function addServerToRoles($server, array $roles) { foreach ($roles as $role) { self::$roles[$role][] = $server; } }
[ "public", "static", "function", "addServerToRoles", "(", "$", "server", ",", "array", "$", "roles", ")", "{", "foreach", "(", "$", "roles", "as", "$", "role", ")", "{", "self", "::", "$", "roles", "[", "$", "role", "]", "[", "]", "=", "$", "server"...
Asign a Server to a Role @param string $server @param array $roles
[ "Asign", "a", "Server", "to", "a", "Role" ]
cf7b7c790f45c41ed338b8a33b498eeaaaa765e9
https://github.com/netz98/n98-deployer/blob/cf7b7c790f45c41ed338b8a33b498eeaaaa765e9/src/Deployer/RoleManager.php#L64-L70
224,627
joomla-framework/github-api
src/Package/Pulls.php
Pulls.create
public function create($user, $repo, $title, $base, $head, $body = '') { // Build the request path. $path = '/repos/' . $user . '/' . $repo . '/pulls'; // Build the request data. $data = json_encode( array( 'title' => $title, 'base' => $base, 'head' => $head, 'body' => $body, ) ); ...
php
public function create($user, $repo, $title, $base, $head, $body = '') { // Build the request path. $path = '/repos/' . $user . '/' . $repo . '/pulls'; // Build the request data. $data = json_encode( array( 'title' => $title, 'base' => $base, 'head' => $head, 'body' => $body, ) ); ...
[ "public", "function", "create", "(", "$", "user", ",", "$", "repo", ",", "$", "title", ",", "$", "base", ",", "$", "head", ",", "$", "body", "=", "''", ")", "{", "// Build the request path.", "$", "path", "=", "'/repos/'", ".", "$", "user", ".", "'...
Create a pull request. @param string $user The name of the owner of the GitHub repository. @param string $repo The name of the GitHub repository. @param string $title The title of the new pull request. @param string $base The branch (or git ref) you want your changes pulled into. This should be an e...
[ "Create", "a", "pull", "request", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Pulls.php#L43-L60
224,628
joomla-framework/github-api
src/Package/Pulls.php
Pulls.edit
public function edit($user, $repo, $pullId, $title = null, $body = null, $state = null, $base = null) { // Build the request path. $path = '/repos/' . $user . '/' . $repo . '/pulls/' . (int) $pullId; // Create the data object. $data = new \stdClass; // If a title is set add it to the data object. if (iss...
php
public function edit($user, $repo, $pullId, $title = null, $body = null, $state = null, $base = null) { // Build the request path. $path = '/repos/' . $user . '/' . $repo . '/pulls/' . (int) $pullId; // Create the data object. $data = new \stdClass; // If a title is set add it to the data object. if (iss...
[ "public", "function", "edit", "(", "$", "user", ",", "$", "repo", ",", "$", "pullId", ",", "$", "title", "=", "null", ",", "$", "body", "=", "null", ",", "$", "state", "=", "null", ",", "$", "base", "=", "null", ")", "{", "// Build the request path...
Update a pull request. @param string $user The name of the owner of the GitHub repository. @param string $repo The name of the GitHub repository. @param integer $pullId The pull request number. @param string $title The optional new title for the pull request. @param string $body The opti...
[ "Update", "a", "pull", "request", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Pulls.php#L113-L150
224,629
joomla-framework/github-api
src/Package/Pulls.php
Pulls.getCommits
public function getCommits($user, $repo, $pullId, $page = 0, $limit = 0) { // Build the request path. $path = '/repos/' . $user . '/' . $repo . '/pulls/' . (int) $pullId . '/commits'; // Send the request. return $this->processResponse($this->client->get($this->fetchUrl($path, $page, $limit))); }
php
public function getCommits($user, $repo, $pullId, $page = 0, $limit = 0) { // Build the request path. $path = '/repos/' . $user . '/' . $repo . '/pulls/' . (int) $pullId . '/commits'; // Send the request. return $this->processResponse($this->client->get($this->fetchUrl($path, $page, $limit))); }
[ "public", "function", "getCommits", "(", "$", "user", ",", "$", "repo", ",", "$", "pullId", ",", "$", "page", "=", "0", ",", "$", "limit", "=", "0", ")", "{", "// Build the request path.", "$", "path", "=", "'/repos/'", ".", "$", "user", ".", "'/'", ...
List commits on a pull request. @param string $user The name of the owner of the GitHub repository. @param string $repo The name of the GitHub repository. @param integer $pullId The pull request number. @param integer $page The page number from which to get items. @param integer $limit The...
[ "List", "commits", "on", "a", "pull", "request", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Pulls.php#L187-L194
224,630
joomla-framework/github-api
src/Package/Search.php
Search.issues
public function issues($owner, $repo, $state, $keyword) { if (\in_array($state, array('open', 'close')) == false) { throw new \UnexpectedValueException('State must be either "open" or "closed"'); } // Build the request path. $path = '/legacy/issues/search/' . $owner . '/' . $repo . '/' . $state . '/' . $...
php
public function issues($owner, $repo, $state, $keyword) { if (\in_array($state, array('open', 'close')) == false) { throw new \UnexpectedValueException('State must be either "open" or "closed"'); } // Build the request path. $path = '/legacy/issues/search/' . $owner . '/' . $repo . '/' . $state . '/' . $...
[ "public", "function", "issues", "(", "$", "owner", ",", "$", "repo", ",", "$", "state", ",", "$", "keyword", ")", "{", "if", "(", "\\", "in_array", "(", "$", "state", ",", "array", "(", "'open'", ",", "'close'", ")", ")", "==", "false", ")", "{",...
Search issues. @param string $owner The name of the owner of the repository. @param string $repo The name of the repository. @param string $state The state - open or closed. @param string $keyword The search term. @return object @since 1.0 @throws \UnexpectedValueException @deprecated The...
[ "Search", "issues", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Search.php#L37-L51
224,631
codebach/PianoSoloWeatherBundle
Controller/WeatherController.php
WeatherController.generateCsvAction
public function generateCsvAction($city, $days) { if ($this->getParameter('pianosolo.weather.options.download_csv') === TRUE) { $weatherHandler = $this->get('pianosolo.weather'); $weathers = $weatherHandler->getForecastObject($city, $days); if (!empty($weathers)) { ...
php
public function generateCsvAction($city, $days) { if ($this->getParameter('pianosolo.weather.options.download_csv') === TRUE) { $weatherHandler = $this->get('pianosolo.weather'); $weathers = $weatherHandler->getForecastObject($city, $days); if (!empty($weathers)) { ...
[ "public", "function", "generateCsvAction", "(", "$", "city", ",", "$", "days", ")", "{", "if", "(", "$", "this", "->", "getParameter", "(", "'pianosolo.weather.options.download_csv'", ")", "===", "TRUE", ")", "{", "$", "weatherHandler", "=", "$", "this", "->...
Downloads Weather List of City as CSV @param mixed (int|string) $city @param integer $days @return Response @throws NotFoundHttpException
[ "Downloads", "Weather", "List", "of", "City", "as", "CSV" ]
f6b3ce0a86dbd8ab4e23d4e2d3031e6d4af0e269
https://github.com/codebach/PianoSoloWeatherBundle/blob/f6b3ce0a86dbd8ab4e23d4e2d3031e6d4af0e269/Controller/WeatherController.php#L22-L40
224,632
acacha/users
src/Http/Controllers/APILoggedUserController.php
APILoggedUserController.update
public function update(LoggedUserUpdate $request) { $user = Auth::user(); $user->update($request->only(['name','email','password'])); return $user; }
php
public function update(LoggedUserUpdate $request) { $user = Auth::user(); $user->update($request->only(['name','email','password'])); return $user; }
[ "public", "function", "update", "(", "LoggedUserUpdate", "$", "request", ")", "{", "$", "user", "=", "Auth", "::", "user", "(", ")", ";", "$", "user", "->", "update", "(", "$", "request", "->", "only", "(", "[", "'name'", ",", "'email'", ",", "'passw...
Update logged user. @return Response
[ "Update", "logged", "user", "." ]
af74be23d225bc9a23ee049579abb1596ae683c0
https://github.com/acacha/users/blob/af74be23d225bc9a23ee049579abb1596ae683c0/src/Http/Controllers/APILoggedUserController.php#L30-L36
224,633
netz98/n98-deployer
src/Deployer/Service/GetReleasesNameService.php
GetReleasesNameService.execute
public static function execute() { $release = null; // Get release-name from branch $input = \Deployer\input(); if ($input->hasOption('branch')) { $branch = $input->getOption('branch'); if (!empty($branch)) { $release = $branch; } ...
php
public static function execute() { $release = null; // Get release-name from branch $input = \Deployer\input(); if ($input->hasOption('branch')) { $branch = $input->getOption('branch'); if (!empty($branch)) { $release = $branch; } ...
[ "public", "static", "function", "execute", "(", ")", "{", "$", "release", "=", "null", ";", "// Get release-name from branch", "$", "input", "=", "\\", "Deployer", "\\", "input", "(", ")", ";", "if", "(", "$", "input", "->", "hasOption", "(", "'branch'", ...
Determine the release name by branch or tag, otherwise uses datetime string this method is an overwrite of the Deployer release-name logic @return string
[ "Determine", "the", "release", "name", "by", "branch", "or", "tag", "otherwise", "uses", "datetime", "string" ]
cf7b7c790f45c41ed338b8a33b498eeaaaa765e9
https://github.com/netz98/n98-deployer/blob/cf7b7c790f45c41ed338b8a33b498eeaaaa765e9/src/Deployer/Service/GetReleasesNameService.php#L22-L55
224,634
phootwork/collection
src/Map.php
Map.set
public function set($key, $element) { $key = $this->extractKey($key); $this->collection[$key] = $element; return $this; }
php
public function set($key, $element) { $key = $this->extractKey($key); $this->collection[$key] = $element; return $this; }
[ "public", "function", "set", "(", "$", "key", ",", "$", "element", ")", "{", "$", "key", "=", "$", "this", "->", "extractKey", "(", "$", "key", ")", ";", "$", "this", "->", "collection", "[", "$", "key", "]", "=", "$", "element", ";", "return", ...
Sets an element with the given key on that map @param string key @param mixed $element @return Map $this
[ "Sets", "an", "element", "with", "the", "given", "key", "on", "that", "map" ]
e745fe3735a6f2099015d11ea7b917634ebf76f3
https://github.com/phootwork/collection/blob/e745fe3735a6f2099015d11ea7b917634ebf76f3/src/Map.php#L43-L48
224,635
phootwork/collection
src/Map.php
Map.get
public function get($key, $default = null) { $key = $this->extractKey($key); if (isset($this->collection[$key])) { return $this->collection[$key]; } else { return $default; } }
php
public function get($key, $default = null) { $key = $this->extractKey($key); if (isset($this->collection[$key])) { return $this->collection[$key]; } else { return $default; } }
[ "public", "function", "get", "(", "$", "key", ",", "$", "default", "=", "null", ")", "{", "$", "key", "=", "$", "this", "->", "extractKey", "(", "$", "key", ")", ";", "if", "(", "isset", "(", "$", "this", "->", "collection", "[", "$", "key", "]...
Returns the element for the given key or your value, if the key doesn't exist. @param string $key @param mixed $default the return value, if the key doesn't exist @return mixed
[ "Returns", "the", "element", "for", "the", "given", "key", "or", "your", "value", "if", "the", "key", "doesn", "t", "exist", "." ]
e745fe3735a6f2099015d11ea7b917634ebf76f3
https://github.com/phootwork/collection/blob/e745fe3735a6f2099015d11ea7b917634ebf76f3/src/Map.php#L57-L64
224,636
phootwork/collection
src/Map.php
Map.getKey
public function getKey($value) { foreach ($this->collection as $k => $v) { if ($v === $value) { return $k; } } return null; }
php
public function getKey($value) { foreach ($this->collection as $k => $v) { if ($v === $value) { return $k; } } return null; }
[ "public", "function", "getKey", "(", "$", "value", ")", "{", "foreach", "(", "$", "this", "->", "collection", "as", "$", "k", "=>", "$", "v", ")", "{", "if", "(", "$", "v", "===", "$", "value", ")", "{", "return", "$", "k", ";", "}", "}", "re...
Returns the key for the given value @param mixed $value the value @return mixed
[ "Returns", "the", "key", "for", "the", "given", "value" ]
e745fe3735a6f2099015d11ea7b917634ebf76f3
https://github.com/phootwork/collection/blob/e745fe3735a6f2099015d11ea7b917634ebf76f3/src/Map.php#L72-L80
224,637
phootwork/collection
src/Map.php
Map.setAll
public function setAll($collection) { foreach ($collection as $key => $element) { $this->set($key, $element); } return $this; }
php
public function setAll($collection) { foreach ($collection as $key => $element) { $this->set($key, $element); } return $this; }
[ "public", "function", "setAll", "(", "$", "collection", ")", "{", "foreach", "(", "$", "collection", "as", "$", "key", "=>", "$", "element", ")", "{", "$", "this", "->", "set", "(", "$", "key", ",", "$", "element", ")", ";", "}", "return", "$", "...
Sets many elements on that map @param array|Iterator $collection @return Map $this
[ "Sets", "many", "elements", "on", "that", "map" ]
e745fe3735a6f2099015d11ea7b917634ebf76f3
https://github.com/phootwork/collection/blob/e745fe3735a6f2099015d11ea7b917634ebf76f3/src/Map.php#L88-L94
224,638
phootwork/collection
src/Map.php
Map.remove
public function remove($key) { $key = $this->extractKey($key); if (isset($this->collection[$key])) { $element = $this->collection[$key]; unset($this->collection[$key]); return $element; } }
php
public function remove($key) { $key = $this->extractKey($key); if (isset($this->collection[$key])) { $element = $this->collection[$key]; unset($this->collection[$key]); return $element; } }
[ "public", "function", "remove", "(", "$", "key", ")", "{", "$", "key", "=", "$", "this", "->", "extractKey", "(", "$", "key", ")", ";", "if", "(", "isset", "(", "$", "this", "->", "collection", "[", "$", "key", "]", ")", ")", "{", "$", "element...
Removes and returns an element from the map by the given key. Returns null if the key does not exist. @param string $key @return mixed the element at the given key
[ "Removes", "and", "returns", "an", "element", "from", "the", "map", "by", "the", "given", "key", ".", "Returns", "null", "if", "the", "key", "does", "not", "exist", "." ]
e745fe3735a6f2099015d11ea7b917634ebf76f3
https://github.com/phootwork/collection/blob/e745fe3735a6f2099015d11ea7b917634ebf76f3/src/Map.php#L103-L111
224,639
phootwork/collection
src/Map.php
Map.has
public function has($key) { $key = $this->extractKey($key); return isset($this->collection[$key]); }
php
public function has($key) { $key = $this->extractKey($key); return isset($this->collection[$key]); }
[ "public", "function", "has", "(", "$", "key", ")", "{", "$", "key", "=", "$", "this", "->", "extractKey", "(", "$", "key", ")", ";", "return", "isset", "(", "$", "this", "->", "collection", "[", "$", "key", "]", ")", ";", "}" ]
Returns whether the key exist. @param string $key @return boolean
[ "Returns", "whether", "the", "key", "exist", "." ]
e745fe3735a6f2099015d11ea7b917634ebf76f3
https://github.com/phootwork/collection/blob/e745fe3735a6f2099015d11ea7b917634ebf76f3/src/Map.php#L137-L140
224,640
phootwork/collection
src/Map.php
Map.findKey
public function findKey() { if (func_num_args() == 1) { $callback = func_get_arg(0); } else { $query = func_get_arg(0); $callback = func_get_arg(1); } $index = func_num_args() == 1 ? $this->find($callback) : $this->find($query, $callback); if ($index !== null) { $index = $this->getKey($index); ...
php
public function findKey() { if (func_num_args() == 1) { $callback = func_get_arg(0); } else { $query = func_get_arg(0); $callback = func_get_arg(1); } $index = func_num_args() == 1 ? $this->find($callback) : $this->find($query, $callback); if ($index !== null) { $index = $this->getKey($index); ...
[ "public", "function", "findKey", "(", ")", "{", "if", "(", "func_num_args", "(", ")", "==", "1", ")", "{", "$", "callback", "=", "func_get_arg", "(", "0", ")", ";", "}", "else", "{", "$", "query", "=", "func_get_arg", "(", "0", ")", ";", "$", "ca...
Searches the collection with a given callback and returns the key for the first element if found. The callback function takes one or two parameters: function ($element [, $query]) {} The callback must return a boolean @param mixed $query OPTIONAL the provided query @param callable $callback the callback function @r...
[ "Searches", "the", "collection", "with", "a", "given", "callback", "and", "returns", "the", "key", "for", "the", "first", "element", "if", "found", "." ]
e745fe3735a6f2099015d11ea7b917634ebf76f3
https://github.com/phootwork/collection/blob/e745fe3735a6f2099015d11ea7b917634ebf76f3/src/Map.php#L190-L204
224,641
phootwork/collection
src/Map.php
Map.findLastKey
public function findLastKey() { if (func_num_args() == 1) { $callback = func_get_arg(0); } else { $query = func_get_arg(0); $callback = func_get_arg(1); } $index = func_num_args() == 1 ? $this->findLast($callback) : $this->findLast($query, $callback); if ($index !== null) { $index = $this->getKey...
php
public function findLastKey() { if (func_num_args() == 1) { $callback = func_get_arg(0); } else { $query = func_get_arg(0); $callback = func_get_arg(1); } $index = func_num_args() == 1 ? $this->findLast($callback) : $this->findLast($query, $callback); if ($index !== null) { $index = $this->getKey...
[ "public", "function", "findLastKey", "(", ")", "{", "if", "(", "func_num_args", "(", ")", "==", "1", ")", "{", "$", "callback", "=", "func_get_arg", "(", "0", ")", ";", "}", "else", "{", "$", "query", "=", "func_get_arg", "(", "0", ")", ";", "$", ...
Searches the collection with a given callback and returns the key for the last element if found. The callback function takes one or two parameters: function ($element [, $query]) {} The callback must return a boolean @param mixed $query OPTIONAL the provided query @param callable $callback the callback function @re...
[ "Searches", "the", "collection", "with", "a", "given", "callback", "and", "returns", "the", "key", "for", "the", "last", "element", "if", "found", "." ]
e745fe3735a6f2099015d11ea7b917634ebf76f3
https://github.com/phootwork/collection/blob/e745fe3735a6f2099015d11ea7b917634ebf76f3/src/Map.php#L219-L233
224,642
hnhdigital-os/laravel-model-json
src/JsonColumnTrait.php
JsonColumnTrait.checkValuesUponSave
public function checkValuesUponSave() { foreach ($this->getJsonColumns() as $column_name) { if (isset($this->attributes[$column_name]) && !is_string($this->attributes[$column_name])) { if (is_array($this->attributes[$column_name])) { $this->attributes[$column_...
php
public function checkValuesUponSave() { foreach ($this->getJsonColumns() as $column_name) { if (isset($this->attributes[$column_name]) && !is_string($this->attributes[$column_name])) { if (is_array($this->attributes[$column_name])) { $this->attributes[$column_...
[ "public", "function", "checkValuesUponSave", "(", ")", "{", "foreach", "(", "$", "this", "->", "getJsonColumns", "(", ")", "as", "$", "column_name", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "attributes", "[", "$", "column_name", "]", ")", ...
Checks values and ensures the json values are in the correct format. @return void
[ "Checks", "values", "and", "ensures", "the", "json", "values", "are", "in", "the", "correct", "format", "." ]
092511d2ce76ffbd1e3a94c9bed48df9ce0be643
https://github.com/hnhdigital-os/laravel-model-json/blob/092511d2ce76ffbd1e3a94c9bed48df9ce0be643/src/JsonColumnTrait.php#L66-L77
224,643
hnhdigital-os/laravel-model-json
src/JsonColumnTrait.php
JsonColumnTrait.inspectJson
public function inspectJson() { if (!empty($this->json_columns)) { foreach ($this->json_columns as $column_name) { if (!in_array($column_name, static::$protected_columns)) { $this->processJson($column_name, $this->attributes[$column_name]); } ...
php
public function inspectJson() { if (!empty($this->json_columns)) { foreach ($this->json_columns as $column_name) { if (!in_array($column_name, static::$protected_columns)) { $this->processJson($column_name, $this->attributes[$column_name]); } ...
[ "public", "function", "inspectJson", "(", ")", "{", "if", "(", "!", "empty", "(", "$", "this", "->", "json_columns", ")", ")", "{", "foreach", "(", "$", "this", "->", "json_columns", "as", "$", "column_name", ")", "{", "if", "(", "!", "in_array", "("...
Decodes each of the declared JSON attributes and allocates them to the json value object. Binds closures based on the column name to access and update the values. @return void
[ "Decodes", "each", "of", "the", "declared", "JSON", "attributes", "and", "allocates", "them", "to", "the", "json", "value", "object", ".", "Binds", "closures", "based", "on", "the", "column", "name", "to", "access", "and", "update", "the", "values", "." ]
092511d2ce76ffbd1e3a94c9bed48df9ce0be643
https://github.com/hnhdigital-os/laravel-model-json/blob/092511d2ce76ffbd1e3a94c9bed48df9ce0be643/src/JsonColumnTrait.php#L117-L126
224,644
hnhdigital-os/laravel-model-json
src/JsonColumnTrait.php
JsonColumnTrait.processJson
public function processJson($column_name, &$value) { if (empty($value) || $value === 'null') { $value = []; } $defaults = (!empty($this->json_defaults[$column_name])) ? $this->json_defaults[$column_name] : []; $options = (!empty($this->json_options[$column_name])) ? $this...
php
public function processJson($column_name, &$value) { if (empty($value) || $value === 'null') { $value = []; } $defaults = (!empty($this->json_defaults[$column_name])) ? $this->json_defaults[$column_name] : []; $options = (!empty($this->json_options[$column_name])) ? $this...
[ "public", "function", "processJson", "(", "$", "column_name", ",", "&", "$", "value", ")", "{", "if", "(", "empty", "(", "$", "value", ")", "||", "$", "value", "===", "'null'", ")", "{", "$", "value", "=", "[", "]", ";", "}", "$", "defaults", "="...
Process the json column. @param string $column_name @param mixed &$value @return void @SuppressWarnings(PHPMD.StaticAccess)
[ "Process", "the", "json", "column", "." ]
092511d2ce76ffbd1e3a94c9bed48df9ce0be643
https://github.com/hnhdigital-os/laravel-model-json/blob/092511d2ce76ffbd1e3a94c9bed48df9ce0be643/src/JsonColumnTrait.php#L138-L154
224,645
hnhdigital-os/laravel-model-json
src/JsonColumnTrait.php
JsonColumnTrait.getOriginal
public function getOriginal($key = null, $default = null) { $original = parent::getOriginal($key, $default); if (!empty($this->json_values)) { if ($key === null) { foreach ($this->json_values as $column_name => &$json_data) { $original[$column_name] = ...
php
public function getOriginal($key = null, $default = null) { $original = parent::getOriginal($key, $default); if (!empty($this->json_values)) { if ($key === null) { foreach ($this->json_values as $column_name => &$json_data) { $original[$column_name] = ...
[ "public", "function", "getOriginal", "(", "$", "key", "=", "null", ",", "$", "default", "=", "null", ")", "{", "$", "original", "=", "parent", "::", "getOriginal", "(", "$", "key", ",", "$", "default", ")", ";", "if", "(", "!", "empty", "(", "$", ...
Get the model's original attribute values. @param string|null $key @param mixed $default @return array
[ "Get", "the", "model", "s", "original", "attribute", "values", "." ]
092511d2ce76ffbd1e3a94c9bed48df9ce0be643
https://github.com/hnhdigital-os/laravel-model-json/blob/092511d2ce76ffbd1e3a94c9bed48df9ce0be643/src/JsonColumnTrait.php#L185-L208
224,646
hnhdigital-os/laravel-model-json
src/JsonColumnTrait.php
JsonColumnTrait.fromJson
public function fromJson($value, $asObject = false) { if (is_array($value)) { return $value; } return json_decode($value, !$asObject); }
php
public function fromJson($value, $asObject = false) { if (is_array($value)) { return $value; } return json_decode($value, !$asObject); }
[ "public", "function", "fromJson", "(", "$", "value", ",", "$", "asObject", "=", "false", ")", "{", "if", "(", "is_array", "(", "$", "value", ")", ")", "{", "return", "$", "value", ";", "}", "return", "json_decode", "(", "$", "value", ",", "!", "$",...
Decode the given JSON back into an array or object. @param string $value @param bool $asObject @return mixed
[ "Decode", "the", "given", "JSON", "back", "into", "an", "array", "or", "object", "." ]
092511d2ce76ffbd1e3a94c9bed48df9ce0be643
https://github.com/hnhdigital-os/laravel-model-json/blob/092511d2ce76ffbd1e3a94c9bed48df9ce0be643/src/JsonColumnTrait.php#L218-L225
224,647
atorscho/membership
src/Membership.php
Membership.user
public function user(?string $attribute = null) { if ($this->isGuest()) { return null; } $user = auth()->user(); if ($attribute) { return $user->{$attribute}; } return $user; }
php
public function user(?string $attribute = null) { if ($this->isGuest()) { return null; } $user = auth()->user(); if ($attribute) { return $user->{$attribute}; } return $user; }
[ "public", "function", "user", "(", "?", "string", "$", "attribute", "=", "null", ")", "{", "if", "(", "$", "this", "->", "isGuest", "(", ")", ")", "{", "return", "null", ";", "}", "$", "user", "=", "auth", "(", ")", "->", "user", "(", ")", ";",...
Retrieve currently authenticated user or its attribute value. @param string|null $attribute Optional. @return \Illuminate\Contracts\Auth\Authenticatable|string|null
[ "Retrieve", "currently", "authenticated", "user", "or", "its", "attribute", "value", "." ]
c39ee69b5bc33702912fb16ef4f4736eaf1e6d71
https://github.com/atorscho/membership/blob/c39ee69b5bc33702912fb16ef4f4736eaf1e6d71/src/Membership.php#L42-L55
224,648
atorscho/membership
src/Membership.php
Membership.registerGatePolicies
public function registerGatePolicies(): void { if (!\Schema::hasTable('permissions')) { return; } $permissions = Permission::all(['handle', 'type']); foreach ($permissions as $permission) { Gate::define($permission->code, function (Authenticatable $user, ?Mo...
php
public function registerGatePolicies(): void { if (!\Schema::hasTable('permissions')) { return; } $permissions = Permission::all(['handle', 'type']); foreach ($permissions as $permission) { Gate::define($permission->code, function (Authenticatable $user, ?Mo...
[ "public", "function", "registerGatePolicies", "(", ")", ":", "void", "{", "if", "(", "!", "\\", "Schema", "::", "hasTable", "(", "'permissions'", ")", ")", "{", "return", ";", "}", "$", "permissions", "=", "Permission", "::", "all", "(", "[", "'handle'",...
Register Gate policies in order to integrate Membership into Laravel Authorization system.
[ "Register", "Gate", "policies", "in", "order", "to", "integrate", "Membership", "into", "Laravel", "Authorization", "system", "." ]
c39ee69b5bc33702912fb16ef4f4736eaf1e6d71
https://github.com/atorscho/membership/blob/c39ee69b5bc33702912fb16ef4f4736eaf1e6d71/src/Membership.php#L61-L74
224,649
joomla-framework/github-api
src/Package/Graphql.php
Graphql.execute
public function execute($query, array $variables = array()) { // Build the request path. $path = '/graphql'; $headers = array( 'Accept' => 'application/vnd.github.v4+json', 'Content-Type' => 'application/json', ); $data = array( 'query' => $query, ); if (!empty($variables)) { $data...
php
public function execute($query, array $variables = array()) { // Build the request path. $path = '/graphql'; $headers = array( 'Accept' => 'application/vnd.github.v4+json', 'Content-Type' => 'application/json', ); $data = array( 'query' => $query, ); if (!empty($variables)) { $data...
[ "public", "function", "execute", "(", "$", "query", ",", "array", "$", "variables", "=", "array", "(", ")", ")", "{", "// Build the request path.", "$", "path", "=", "'/graphql'", ";", "$", "headers", "=", "array", "(", "'Accept'", "=>", "'application/vnd.gi...
Execute a query against the GraphQL API. @param string $query The query to perform. @param array $variables An optional array of variables to include in the request. @return string @since 1.6.0
[ "Execute", "a", "query", "against", "the", "GraphQL", "API", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Graphql.php#L32-L55
224,650
joomla-framework/github-api
src/Package/Orgs.php
Orgs.edit
public function edit($org, $billingEmail = '', $company = '', $email = '', $location = '', $name = '') { // Build the request path. $path = '/orgs/' . $org; $args = array('billing_email', 'company', 'email', 'location', 'name'); $data = array(); $fArgs = \func_get_args(); foreach ($args as $i => $arg) ...
php
public function edit($org, $billingEmail = '', $company = '', $email = '', $location = '', $name = '') { // Build the request path. $path = '/orgs/' . $org; $args = array('billing_email', 'company', 'email', 'location', 'name'); $data = array(); $fArgs = \func_get_args(); foreach ($args as $i => $arg) ...
[ "public", "function", "edit", "(", "$", "org", ",", "$", "billingEmail", "=", "''", ",", "$", "company", "=", "''", ",", "$", "email", "=", "''", ",", "$", "location", "=", "''", ",", "$", "name", "=", "''", ")", "{", "// Build the request path.", ...
Edit an organization. @param string $org The organization name. @param string $billingEmail Billing email address. This address is not publicized. @param string $company The company name. @param string $email The email address. @param string $location The location name. @pa...
[ "Edit", "an", "organization", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Orgs.php#L84-L107
224,651
joomla-framework/github-api
src/Package/Repositories/Commits.php
Commits.getList
public function getList($user, $repo, $sha = '', $path = '', $author = '', \DateTime $since = null, \DateTime $until = null) { // Build the request path. $rPath = '/repos/' . $user . '/' . $repo . '/commits'; $uri = new Uri($this->fetchUrl($rPath)); if ($sha) { $uri->setVar('sha', $sha); } if ($pat...
php
public function getList($user, $repo, $sha = '', $path = '', $author = '', \DateTime $since = null, \DateTime $until = null) { // Build the request path. $rPath = '/repos/' . $user . '/' . $repo . '/commits'; $uri = new Uri($this->fetchUrl($rPath)); if ($sha) { $uri->setVar('sha', $sha); } if ($pat...
[ "public", "function", "getList", "(", "$", "user", ",", "$", "repo", ",", "$", "sha", "=", "''", ",", "$", "path", "=", "''", ",", "$", "author", "=", "''", ",", "\\", "DateTime", "$", "since", "=", "null", ",", "\\", "DateTime", "$", "until", ...
List commits on a repository. A special note on pagination: Due to the way Git works, commits are paginated based on SHA instead of page number. Please follow the link headers as outlined in the pagination overview instead of constructing page links yourself. @param string $user The name of the owner of the ...
[ "List", "commits", "on", "a", "repository", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Repositories/Commits.php#L45-L79
224,652
joomla-framework/github-api
src/Package/Repositories/Commits.php
Commits.getSha
public function getSha($user, $repo, $ref) { // Build the request path. $path = '/repos/' . $user . '/' . $repo . '/commits/' . $ref; // Send the request. $response = $this->client->get($this->fetchUrl($path)); // Validate the response code. if ($response->code != 200) { // Decode the error response...
php
public function getSha($user, $repo, $ref) { // Build the request path. $path = '/repos/' . $user . '/' . $repo . '/commits/' . $ref; // Send the request. $response = $this->client->get($this->fetchUrl($path)); // Validate the response code. if ($response->code != 200) { // Decode the error response...
[ "public", "function", "getSha", "(", "$", "user", ",", "$", "repo", ",", "$", "ref", ")", "{", "// Build the request path.", "$", "path", "=", "'/repos/'", ".", "$", "user", ".", "'/'", ".", "$", "repo", ".", "'/commits/'", ".", "$", "ref", ";", "// ...
Get the SHA-1 of a commit reference. @param string $user The name of the owner of the GitHub repository. @param string $repo The name of the GitHub repository. @param string $ref The commit reference @return string @since 1.4.0 @throws UnexpectedResponseException
[ "Get", "the", "SHA", "-", "1", "of", "a", "commit", "reference", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Repositories/Commits.php#L114-L133
224,653
php-poppler/php-poppler
Driver/Pdftohtml.php
Pdftohtml.create
public static function create(LoggerInterface $logger = null, $configuration = array()) { if (!$configuration instanceof ConfigurationInterface) { $configuration = new Configuration($configuration); } $binaries = $configuration->get('pdftohtml.binaries', 'pdftohtml'); i...
php
public static function create(LoggerInterface $logger = null, $configuration = array()) { if (!$configuration instanceof ConfigurationInterface) { $configuration = new Configuration($configuration); } $binaries = $configuration->get('pdftohtml.binaries', 'pdftohtml'); i...
[ "public", "static", "function", "create", "(", "LoggerInterface", "$", "logger", "=", "null", ",", "$", "configuration", "=", "array", "(", ")", ")", "{", "if", "(", "!", "$", "configuration", "instanceof", "ConfigurationInterface", ")", "{", "$", "configura...
Creates an Pdftohtml driver. @param LoggerInterface $logger @param array|Configuration $configuration @return Pdftohtml
[ "Creates", "an", "Pdftohtml", "driver", "." ]
033427289ec4f1ff00656a0e02410a84c529ace4
https://github.com/php-poppler/php-poppler/blob/033427289ec4f1ff00656a0e02410a84c529ace4/Driver/Pdftohtml.php#L57-L74
224,654
acacha/users
src/Services/UserInvitations.php
UserInvitations.send
public function send(UserInvitationModel $invitation) { Mail::to($invitation->email)->send(new UserInvitation($invitation)); }
php
public function send(UserInvitationModel $invitation) { Mail::to($invitation->email)->send(new UserInvitation($invitation)); }
[ "public", "function", "send", "(", "UserInvitationModel", "$", "invitation", ")", "{", "Mail", "::", "to", "(", "$", "invitation", "->", "email", ")", "->", "send", "(", "new", "UserInvitation", "(", "$", "invitation", ")", ")", ";", "}" ]
Send user invitation. @param UserInvitationModel $invitation
[ "Send", "user", "invitation", "." ]
af74be23d225bc9a23ee049579abb1596ae683c0
https://github.com/acacha/users/blob/af74be23d225bc9a23ee049579abb1596ae683c0/src/Services/UserInvitations.php#L21-L24
224,655
Troopers/AlertifyBundle
Controller/AlertifyController.php
AlertifyController.confirmAction
public function confirmAction(Request $request) { $confirmCallback = $request->get('confirm_callback'); if ($confirmCallback === '') { $confirmCallback = null; } return [ 'title' => $request->get('title'), 'body' => ...
php
public function confirmAction(Request $request) { $confirmCallback = $request->get('confirm_callback'); if ($confirmCallback === '') { $confirmCallback = null; } return [ 'title' => $request->get('title'), 'body' => ...
[ "public", "function", "confirmAction", "(", "Request", "$", "request", ")", "{", "$", "confirmCallback", "=", "$", "request", "->", "get", "(", "'confirm_callback'", ")", ";", "if", "(", "$", "confirmCallback", "===", "''", ")", "{", "$", "confirmCallback", ...
Confirm modal. @param Request $request An HTTP request. @Route("/confirm", name="alertify_confirm", options={"expose"=true}) @Template("TroopersAlertifyBundle::confirm.html.twig") @return array
[ "Confirm", "modal", "." ]
eded39af141d056627718d2ba7dee4e458fb7187
https://github.com/Troopers/AlertifyBundle/blob/eded39af141d056627718d2ba7dee4e458fb7187/Controller/AlertifyController.php#L24-L43
224,656
netz98/n98-deployer
src/Deployer/Service/GetReleasesListService.php
GetReleasesListService.execute
public static function execute() { \Deployer\cd('{{deploy_path}}'); // If there is no releases return empty list. $cmdReleaseDirs = '[ -d releases ] && [ "$(ls -A releases)" ]'; $hasReleaseDirs = \Deployer\test($cmdReleaseDirs); if (!$hasReleaseDirs) { return [];...
php
public static function execute() { \Deployer\cd('{{deploy_path}}'); // If there is no releases return empty list. $cmdReleaseDirs = '[ -d releases ] && [ "$(ls -A releases)" ]'; $hasReleaseDirs = \Deployer\test($cmdReleaseDirs); if (!$hasReleaseDirs) { return [];...
[ "public", "static", "function", "execute", "(", ")", "{", "\\", "Deployer", "\\", "cd", "(", "'{{deploy_path}}'", ")", ";", "// If there is no releases return empty list.", "$", "cmdReleaseDirs", "=", "'[ -d releases ] && [ \"$(ls -A releases)\" ]'", ";", "$", "hasRelease...
Returns a list of releases on server. @return array
[ "Returns", "a", "list", "of", "releases", "on", "server", "." ]
cf7b7c790f45c41ed338b8a33b498eeaaaa765e9
https://github.com/netz98/n98-deployer/blob/cf7b7c790f45c41ed338b8a33b498eeaaaa765e9/src/Deployer/Service/GetReleasesListService.php#L22-L68
224,657
neos/setup
Classes/Core/MessageRenderer.php
MessageRenderer.showMessages
public function showMessages(array $messages, $extraHeaderHtml = '') { if ($messages === []) { throw new \InvalidArgumentException('No messages given for rendering', 1416914970); } /** @var \Neos\Flow\Package\PackageManagerInterface $packageManager */ $packageManager = $...
php
public function showMessages(array $messages, $extraHeaderHtml = '') { if ($messages === []) { throw new \InvalidArgumentException('No messages given for rendering', 1416914970); } /** @var \Neos\Flow\Package\PackageManagerInterface $packageManager */ $packageManager = $...
[ "public", "function", "showMessages", "(", "array", "$", "messages", ",", "$", "extraHeaderHtml", "=", "''", ")", "{", "if", "(", "$", "messages", "===", "[", "]", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'No messages given for renderi...
Display a message. As we cannot rely on any Flow requirements being fulfilled here, we have to statically include the CSS styles at this point, and have to in-line the Neos logo. @param array <\Neos\Error\Messages\Message> $messages Array of messages (at least one message must be passed) @param string $extraHeaderHtml...
[ "Display", "a", "message", ".", "As", "we", "cannot", "rely", "on", "any", "Flow", "requirements", "being", "fulfilled", "here", "we", "have", "to", "statically", "include", "the", "CSS", "styles", "at", "this", "point", "and", "have", "to", "in", "-", "...
7b5437efe8113e997007be6896628aa9f5c39d2f
https://github.com/neos/setup/blob/7b5437efe8113e997007be6896628aa9f5c39d2f/Classes/Core/MessageRenderer.php#L52-L98
224,658
joomla-framework/github-api
src/Package/Repositories/Hooks.php
Hooks.edit
public function edit($user, $repo, $id, $name, $config, array $events = array('push'), array $addEvents = array(), array $removeEvents = array(), $active = true ) { // Check to ensure all events are in the allowed list foreach ($events as $event) { if (!\in_array($event, $this->hookEvents)) { throw ...
php
public function edit($user, $repo, $id, $name, $config, array $events = array('push'), array $addEvents = array(), array $removeEvents = array(), $active = true ) { // Check to ensure all events are in the allowed list foreach ($events as $event) { if (!\in_array($event, $this->hookEvents)) { throw ...
[ "public", "function", "edit", "(", "$", "user", ",", "$", "repo", ",", "$", "id", ",", "$", "name", ",", "$", "config", ",", "array", "$", "events", "=", "array", "(", "'push'", ")", ",", "array", "$", "addEvents", "=", "array", "(", ")", ",", ...
Edit a hook. @param string $user The name of the owner of the GitHub repository. @param string $repo The name of the GitHub repository. @param integer $id ID of the hook to edit. @param string $name The name of the service being called. @param array $config ...
[ "Edit", "a", "hook", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Repositories/Hooks.php#L104-L150
224,659
neos/setup
Classes/Core/RequestHandler.php
RequestHandler.checkBasicRequirementsAndDisplayLoadingScreen
protected function checkBasicRequirementsAndDisplayLoadingScreen() { $messageRenderer = new MessageRenderer($this->bootstrap); $basicRequirements = new BasicRequirements(); $result = $basicRequirements->findError(); if ($result instanceof Error) { $messageRenderer->showMe...
php
protected function checkBasicRequirementsAndDisplayLoadingScreen() { $messageRenderer = new MessageRenderer($this->bootstrap); $basicRequirements = new BasicRequirements(); $result = $basicRequirements->findError(); if ($result instanceof Error) { $messageRenderer->showMe...
[ "protected", "function", "checkBasicRequirementsAndDisplayLoadingScreen", "(", ")", "{", "$", "messageRenderer", "=", "new", "MessageRenderer", "(", "$", "this", "->", "bootstrap", ")", ";", "$", "basicRequirements", "=", "new", "BasicRequirements", "(", ")", ";", ...
Check the basic requirements, and display a loading screen on initial request. @return void
[ "Check", "the", "basic", "requirements", "and", "display", "a", "loading", "screen", "on", "initial", "request", "." ]
7b5437efe8113e997007be6896628aa9f5c39d2f
https://github.com/neos/setup/blob/7b5437efe8113e997007be6896628aa9f5c39d2f/Classes/Core/RequestHandler.php#L89-L116
224,660
neos/setup
Classes/Core/RequestHandler.php
RequestHandler.resolveDependencies
protected function resolveDependencies() { $objectManager = $this->bootstrap->getObjectManager(); $componentChainFactory = $objectManager->get(ComponentChainFactory::class); $configurationManager = $objectManager->get(ConfigurationManager::class); $this->settings = $configurationMana...
php
protected function resolveDependencies() { $objectManager = $this->bootstrap->getObjectManager(); $componentChainFactory = $objectManager->get(ComponentChainFactory::class); $configurationManager = $objectManager->get(ConfigurationManager::class); $this->settings = $configurationMana...
[ "protected", "function", "resolveDependencies", "(", ")", "{", "$", "objectManager", "=", "$", "this", "->", "bootstrap", "->", "getObjectManager", "(", ")", ";", "$", "componentChainFactory", "=", "$", "objectManager", "->", "get", "(", "ComponentChainFactory", ...
Create a HTTP component chain that adds our own routing configuration component only for this request handler. @return void
[ "Create", "a", "HTTP", "component", "chain", "that", "adds", "our", "own", "routing", "configuration", "component", "only", "for", "this", "request", "handler", "." ]
7b5437efe8113e997007be6896628aa9f5c39d2f
https://github.com/neos/setup/blob/7b5437efe8113e997007be6896628aa9f5c39d2f/Classes/Core/RequestHandler.php#L124-L133
224,661
neos/setup
Classes/Core/RequestHandler.php
RequestHandler.checkPhpBinary
protected function checkPhpBinary($phpBinaryPathAndFilename) { $phpVersion = null; if ($this->phpBinaryExistsAndIsExecutableFile($phpBinaryPathAndFilename)) { if (DIRECTORY_SEPARATOR === '/') { $phpCommand = '"' . escapeshellcmd(Files::getUnixStylePath($phpBinaryPathAndFi...
php
protected function checkPhpBinary($phpBinaryPathAndFilename) { $phpVersion = null; if ($this->phpBinaryExistsAndIsExecutableFile($phpBinaryPathAndFilename)) { if (DIRECTORY_SEPARATOR === '/') { $phpCommand = '"' . escapeshellcmd(Files::getUnixStylePath($phpBinaryPathAndFi...
[ "protected", "function", "checkPhpBinary", "(", "$", "phpBinaryPathAndFilename", ")", "{", "$", "phpVersion", "=", "null", ";", "if", "(", "$", "this", "->", "phpBinaryExistsAndIsExecutableFile", "(", "$", "phpBinaryPathAndFilename", ")", ")", "{", "if", "(", "D...
Checks if the given PHP binary is executable and of the same version as the currently running one. @param string $phpBinaryPathAndFilename @return Message An error or warning message or NULL if the PHP binary was detected successfully
[ "Checks", "if", "the", "given", "PHP", "binary", "is", "executable", "and", "of", "the", "same", "version", "as", "the", "currently", "running", "one", "." ]
7b5437efe8113e997007be6896628aa9f5c39d2f
https://github.com/neos/setup/blob/7b5437efe8113e997007be6896628aa9f5c39d2f/Classes/Core/RequestHandler.php#L173-L208
224,662
neos/setup
Classes/Core/RequestHandler.php
RequestHandler.detectPhpBinaryPathAndFilename
protected function detectPhpBinaryPathAndFilename() { if (defined('PHP_BINARY') && PHP_BINARY !== '' && dirname(PHP_BINARY) === PHP_BINDIR) { if ($this->checkPhpBinary(PHP_BINARY) === null) { return [PHP_BINARY, null]; } } $environmentPaths = explode(...
php
protected function detectPhpBinaryPathAndFilename() { if (defined('PHP_BINARY') && PHP_BINARY !== '' && dirname(PHP_BINARY) === PHP_BINDIR) { if ($this->checkPhpBinary(PHP_BINARY) === null) { return [PHP_BINARY, null]; } } $environmentPaths = explode(...
[ "protected", "function", "detectPhpBinaryPathAndFilename", "(", ")", "{", "if", "(", "defined", "(", "'PHP_BINARY'", ")", "&&", "PHP_BINARY", "!==", "''", "&&", "dirname", "(", "PHP_BINARY", ")", "===", "PHP_BINDIR", ")", "{", "if", "(", "$", "this", "->", ...
Traverse the PATH locations and check for the existence of a valid PHP binary. If found, the path and filename are returned, if not NULL is returned. We only use PHP_BINARY if it's set to a file in the path PHP_BINDIR. This is because PHP_BINARY might, for example, be "/opt/local/sbin/php54-fpm" while PHP_BINDIR conta...
[ "Traverse", "the", "PATH", "locations", "and", "check", "for", "the", "existence", "of", "a", "valid", "PHP", "binary", ".", "If", "found", "the", "path", "and", "filename", "are", "returned", "if", "not", "NULL", "is", "returned", "." ]
7b5437efe8113e997007be6896628aa9f5c39d2f
https://github.com/neos/setup/blob/7b5437efe8113e997007be6896628aa9f5c39d2f/Classes/Core/RequestHandler.php#L220-L244
224,663
neos/setup
Classes/Core/RequestHandler.php
RequestHandler.phpBinaryExistsAndIsExecutableFile
protected function phpBinaryExistsAndIsExecutableFile($phpBinaryPathAndFilename) { $phpBinaryPathAndFilename = escapeshellarg(Files::getUnixStylePath($phpBinaryPathAndFilename)); if (DIRECTORY_SEPARATOR === '/') { $command = sprintf('test -f %s && test -x %s', $phpBinaryPathAndFilename, ...
php
protected function phpBinaryExistsAndIsExecutableFile($phpBinaryPathAndFilename) { $phpBinaryPathAndFilename = escapeshellarg(Files::getUnixStylePath($phpBinaryPathAndFilename)); if (DIRECTORY_SEPARATOR === '/') { $command = sprintf('test -f %s && test -x %s', $phpBinaryPathAndFilename, ...
[ "protected", "function", "phpBinaryExistsAndIsExecutableFile", "(", "$", "phpBinaryPathAndFilename", ")", "{", "$", "phpBinaryPathAndFilename", "=", "escapeshellarg", "(", "Files", "::", "getUnixStylePath", "(", "$", "phpBinaryPathAndFilename", ")", ")", ";", "if", "(",...
Checks if PHP binary file exists bypassing open_basedir violation. If PHP binary is not within open_basedir path, it is impossible to access this binary in any other way than exec() or system(). So we must check existence of this file with system tools. @param string $phpBinaryPathAndFilename @return boolean
[ "Checks", "if", "PHP", "binary", "file", "exists", "bypassing", "open_basedir", "violation", "." ]
7b5437efe8113e997007be6896628aa9f5c39d2f
https://github.com/neos/setup/blob/7b5437efe8113e997007be6896628aa9f5c39d2f/Classes/Core/RequestHandler.php#L256-L271
224,664
atorscho/membership
src/Permission.php
Permission.search
public static function search(string $handle, array $attributes = ['*']) { $handle = explode('.', $handle); $type = array_shift($handle); if (!$handle) { throw new InvalidArgumentException('The search argument is not properly formatted.'); } $handle = $handle[...
php
public static function search(string $handle, array $attributes = ['*']) { $handle = explode('.', $handle); $type = array_shift($handle); if (!$handle) { throw new InvalidArgumentException('The search argument is not properly formatted.'); } $handle = $handle[...
[ "public", "static", "function", "search", "(", "string", "$", "handle", ",", "array", "$", "attributes", "=", "[", "'*'", "]", ")", "{", "$", "handle", "=", "explode", "(", "'.'", ",", "$", "handle", ")", ";", "$", "type", "=", "array_shift", "(", ...
Find a permission using its type and handle.
[ "Find", "a", "permission", "using", "its", "type", "and", "handle", "." ]
c39ee69b5bc33702912fb16ef4f4736eaf1e6d71
https://github.com/atorscho/membership/blob/c39ee69b5bc33702912fb16ef4f4736eaf1e6d71/src/Permission.php#L65-L77
224,665
atorscho/membership
src/Permission.php
Permission.isGrantedTo
public function isGrantedTo($user): bool { $userModel = config('auth.providers.users.model'); if (is_int($user) && !$userModel::find($user)) { return false; } return $this->users()->where('user_id', is_int($user) ? $user : $user->id)->exists(); }
php
public function isGrantedTo($user): bool { $userModel = config('auth.providers.users.model'); if (is_int($user) && !$userModel::find($user)) { return false; } return $this->users()->where('user_id', is_int($user) ? $user : $user->id)->exists(); }
[ "public", "function", "isGrantedTo", "(", "$", "user", ")", ":", "bool", "{", "$", "userModel", "=", "config", "(", "'auth.providers.users.model'", ")", ";", "if", "(", "is_int", "(", "$", "user", ")", "&&", "!", "$", "userModel", "::", "find", "(", "$...
Check whether the permission is granted to a user. @param int|Authenticatable $group @return bool
[ "Check", "whether", "the", "permission", "is", "granted", "to", "a", "user", "." ]
c39ee69b5bc33702912fb16ef4f4736eaf1e6d71
https://github.com/atorscho/membership/blob/c39ee69b5bc33702912fb16ef4f4736eaf1e6d71/src/Permission.php#L134-L143
224,666
joomla-framework/github-api
src/Package/Repositories.php
Repositories.getListContributors
public function getListContributors($owner, $repo, $anon = false) { // Build the request path. $uri = new Uri($this->fetchUrl('/repos/' . $owner . '/' . $repo . '/contributors')); if ($anon) { $uri->setVar('anon', 'true'); } // Send the request. return $this->processResponse($this->client->get($uri)...
php
public function getListContributors($owner, $repo, $anon = false) { // Build the request path. $uri = new Uri($this->fetchUrl('/repos/' . $owner . '/' . $repo . '/contributors')); if ($anon) { $uri->setVar('anon', 'true'); } // Send the request. return $this->processResponse($this->client->get($uri)...
[ "public", "function", "getListContributors", "(", "$", "owner", ",", "$", "repo", ",", "$", "anon", "=", "false", ")", "{", "// Build the request path.", "$", "uri", "=", "new", "Uri", "(", "$", "this", "->", "fetchUrl", "(", "'/repos/'", ".", "$", "owne...
List contributors. @param string $owner Repository owner. @param string $repo Repository name. @param boolean $anon Set to 1 or true to include anonymous contributors in results. @return object @since 1.0
[ "List", "contributors", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Repositories.php#L310-L322
224,667
joomla-framework/github-api
src/Package/Repositories.php
Repositories.getBranch
public function getBranch($owner, $repo, $branch) { return $this->branches->get($owner, $repo, $branch); }
php
public function getBranch($owner, $repo, $branch) { return $this->branches->get($owner, $repo, $branch); }
[ "public", "function", "getBranch", "(", "$", "owner", ",", "$", "repo", ",", "$", "branch", ")", "{", "return", "$", "this", "->", "branches", "->", "get", "(", "$", "owner", ",", "$", "repo", ",", "$", "branch", ")", ";", "}" ]
Get a Branch. @param string $owner Repository owner. @param string $repo Repository name. @param string $branch Branch name. @return object @since 1.0 @deprecated 2.0 Use Joomla\Github\Package\Repositories\Branches::get() instead
[ "Get", "a", "Branch", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Repositories.php#L418-L421
224,668
fojuth/plupload
src/Fojuth/Plupload/UploadHandler.php
UploadHandler.upload
public function upload(\Symfony\Component\HttpFoundation\File\UploadedFile $file) { // We simply move the uploaded file to the target directory $result = $file->move(\Config::get('plupload::plupload.upload_dir'), $file->getClientOriginalName()); // Return the result of the upload return $this->res...
php
public function upload(\Symfony\Component\HttpFoundation\File\UploadedFile $file) { // We simply move the uploaded file to the target directory $result = $file->move(\Config::get('plupload::plupload.upload_dir'), $file->getClientOriginalName()); // Return the result of the upload return $this->res...
[ "public", "function", "upload", "(", "\\", "Symfony", "\\", "Component", "\\", "HttpFoundation", "\\", "File", "\\", "UploadedFile", "$", "file", ")", "{", "// We simply move the uploaded file to the target directory", "$", "result", "=", "$", "file", "->", "move", ...
The main upload method. @param \Symfony\Component\HttpFoundation\File\UploadedFile $file Uploaded file instance. @return string
[ "The", "main", "upload", "method", "." ]
9d27e62516761352863cd08b7a2342326d69dd5c
https://github.com/fojuth/plupload/blob/9d27e62516761352863cd08b7a2342326d69dd5c/src/Fojuth/Plupload/UploadHandler.php#L21-L28
224,669
mlambley/swagception
src/SwaggerSchema.php
SwaggerSchema.checkFilter
public function checkFilter($path) { //No filters? Include all paths. if (empty($this->filters)) { return true; } //Match either with or without braces. $cleanPath = str_replace(array('{', '}'), array('', ''), $path); foreach ($this->filters as $filter) {...
php
public function checkFilter($path) { //No filters? Include all paths. if (empty($this->filters)) { return true; } //Match either with or without braces. $cleanPath = str_replace(array('{', '}'), array('', ''), $path); foreach ($this->filters as $filter) {...
[ "public", "function", "checkFilter", "(", "$", "path", ")", "{", "//No filters? Include all paths.", "if", "(", "empty", "(", "$", "this", "->", "filters", ")", ")", "{", "return", "true", ";", "}", "//Match either with or without braces.", "$", "cleanPath", "="...
Checks whether the path should be included, based on the previously specified filters. @param string $path @return bool
[ "Checks", "whether", "the", "path", "should", "be", "included", "based", "on", "the", "previously", "specified", "filters", "." ]
2ca006c158a0465be537ba05903d7d940ac92085
https://github.com/mlambley/swagception/blob/2ca006c158a0465be537ba05903d7d940ac92085/src/SwaggerSchema.php#L177-L192
224,670
joomla-framework/github-api
src/Package/Authorization.php
Authorization.deleteGrant
public function deleteGrant($id) { // Build the request path. $path = '/authorizations/grants/' . $id; // Send the request. return $this->processResponse($this->client->delete($this->fetchUrl($path)), 204); }
php
public function deleteGrant($id) { // Build the request path. $path = '/authorizations/grants/' . $id; // Send the request. return $this->processResponse($this->client->delete($this->fetchUrl($path)), 204); }
[ "public", "function", "deleteGrant", "(", "$", "id", ")", "{", "// Build the request path.", "$", "path", "=", "'/authorizations/grants/'", ".", "$", "id", ";", "// Send the request.", "return", "$", "this", "->", "processResponse", "(", "$", "this", "->", "clie...
Delete a grant Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. @param integer $id ID of the authorization to delete @return object @since 1.5.0 @throws \DomainException
[ "Delete", "a", "grant" ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Authorization.php#L82-L89
224,671
joomla-framework/github-api
src/Package/Authorization.php
Authorization.getListGrants
public function getListGrants() { // Build the request path. $path = '/authorizations/grants'; // Send the request. return $this->processResponse($this->client->get($this->fetchUrl($path))); }
php
public function getListGrants() { // Build the request path. $path = '/authorizations/grants'; // Send the request. return $this->processResponse($this->client->get($this->fetchUrl($path))); }
[ "public", "function", "getListGrants", "(", ")", "{", "// Build the request path.", "$", "path", "=", "'/authorizations/grants'", ";", "// Send the request.", "return", "$", "this", "->", "processResponse", "(", "$", "this", "->", "client", "->", "get", "(", "$", ...
List your grants. You can use this API to list the set of OAuth applications that have been granted access to your account. @return object @since 1.5.0 @throws \DomainException
[ "List", "your", "grants", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Authorization.php#L221-L228
224,672
joomla-framework/github-api
src/Package/Authorization.php
Authorization.revokeGrantForApplication
public function revokeGrantForApplication($clientId, $accessToken) { // Build the request path. $path = "/applications/$clientId/grants/$accessToken"; // Send the request. return $this->processResponse($this->client->delete($this->fetchUrl($path)), 204); }
php
public function revokeGrantForApplication($clientId, $accessToken) { // Build the request path. $path = "/applications/$clientId/grants/$accessToken"; // Send the request. return $this->processResponse($this->client->delete($this->fetchUrl($path)), 204); }
[ "public", "function", "revokeGrantForApplication", "(", "$", "clientId", ",", "$", "accessToken", ")", "{", "// Build the request path.", "$", "path", "=", "\"/applications/$clientId/grants/$accessToken\"", ";", "// Send the request.", "return", "$", "this", "->", "proces...
Revoke a grant for an application OAuth application owners can revoke a grant for their OAuth application and a specific user. @param integer $clientId The application client ID @param integer $accessToken The access token to revoke @return object @since 1.5.0 @throws \DomainException
[ "Revoke", "a", "grant", "for", "an", "application" ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Authorization.php#L373-L380
224,673
laravel-notification-channels/bearychat
src/Exceptions/CouldNotSendNotification.php
CouldNotSendNotification.invalidMessage
public static function invalidMessage($message) { $type = is_object($message) ? get_class($message) : gettype($message); return new static('The message should be an instance of '.Message::class.". Given `{$type}` is invalid.", 1); }
php
public static function invalidMessage($message) { $type = is_object($message) ? get_class($message) : gettype($message); return new static('The message should be an instance of '.Message::class.". Given `{$type}` is invalid.", 1); }
[ "public", "static", "function", "invalidMessage", "(", "$", "message", ")", "{", "$", "type", "=", "is_object", "(", "$", "message", ")", "?", "get_class", "(", "$", "message", ")", ":", "gettype", "(", "$", "message", ")", ";", "return", "new", "stati...
Thrown when an invalid message was passed. @param mixed $message @return static
[ "Thrown", "when", "an", "invalid", "message", "was", "passed", "." ]
c0fdc1918c14b72bdc40157e72cc125962347b06
https://github.com/laravel-notification-channels/bearychat/blob/c0fdc1918c14b72bdc40157e72cc125962347b06/src/Exceptions/CouldNotSendNotification.php#L16-L21
224,674
laravel-notification-channels/bearychat
src/Exceptions/CouldNotSendNotification.php
CouldNotSendNotification.sendingFailed
public static function sendingFailed($webhook, $payload) { if (! is_string($payload)) { $payload = json_encode($payload, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT); } return new static("Failed sending to BearyChat with webhook {$webhook} .\n{$payload}",...
php
public static function sendingFailed($webhook, $payload) { if (! is_string($payload)) { $payload = json_encode($payload, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT); } return new static("Failed sending to BearyChat with webhook {$webhook} .\n{$payload}",...
[ "public", "static", "function", "sendingFailed", "(", "$", "webhook", ",", "$", "payload", ")", "{", "if", "(", "!", "is_string", "(", "$", "payload", ")", ")", "{", "$", "payload", "=", "json_encode", "(", "$", "payload", ",", "JSON_UNESCAPED_UNICODE", ...
Thrown when sending failed. @param string $webhook @param mixed $payload @return static
[ "Thrown", "when", "sending", "failed", "." ]
c0fdc1918c14b72bdc40157e72cc125962347b06
https://github.com/laravel-notification-channels/bearychat/blob/c0fdc1918c14b72bdc40157e72cc125962347b06/src/Exceptions/CouldNotSendNotification.php#L30-L37
224,675
joomla-framework/github-api
src/Package/Activity/Notifications.php
Notifications.markReadThread
public function markReadThread($id, $unread = true, $read = true) { // Build the request path. $path = '/notifications/threads/' . $id; $data = array( 'unread' => $unread, 'read' => $read, ); return $this->processResponse( $this->client->patch($this->fetchUrl($path), json_encode($data)), 205 ...
php
public function markReadThread($id, $unread = true, $read = true) { // Build the request path. $path = '/notifications/threads/' . $id; $data = array( 'unread' => $unread, 'read' => $read, ); return $this->processResponse( $this->client->patch($this->fetchUrl($path), json_encode($data)), 205 ...
[ "public", "function", "markReadThread", "(", "$", "id", ",", "$", "unread", "=", "true", ",", "$", "read", "=", "true", ")", "{", "// Build the request path.", "$", "path", "=", "'/notifications/threads/'", ".", "$", "id", ";", "$", "data", "=", "array", ...
Mark a thread as read. @param integer $id The thread id. @param boolean $unread Changes the unread status of the threads. @param boolean $read Inverse of “unread”. @return object @since 1.0
[ "Mark", "a", "thread", "as", "read", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Activity/Notifications.php#L215-L229
224,676
joomla-framework/github-api
src/Package/Activity/Notifications.php
Notifications.setThreadSubscription
public function setThreadSubscription($id, $subscribed, $ignored) { // Build the request path. $path = '/notifications/threads/' . $id . '/subscription'; $data = array( 'subscribed' => $subscribed, 'ignored' => $ignored, ); return $this->processResponse( $this->client->put($this->fetchUrl($path...
php
public function setThreadSubscription($id, $subscribed, $ignored) { // Build the request path. $path = '/notifications/threads/' . $id . '/subscription'; $data = array( 'subscribed' => $subscribed, 'ignored' => $ignored, ); return $this->processResponse( $this->client->put($this->fetchUrl($path...
[ "public", "function", "setThreadSubscription", "(", "$", "id", ",", "$", "subscribed", ",", "$", "ignored", ")", "{", "// Build the request path.", "$", "path", "=", "'/notifications/threads/'", ".", "$", "id", ".", "'/subscription'", ";", "$", "data", "=", "a...
Set a Thread Subscription. This lets you subscribe to a thread, or ignore it. Subscribing to a thread is unnecessary if the user is already subscribed to the repository. Ignoring a thread will mute all future notifications (until you comment or get @mentioned). @param integer $id The thread id. @param b...
[ "Set", "a", "Thread", "Subscription", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Activity/Notifications.php#L268-L281
224,677
neos/setup
Classes/Condition/DatabaseConnectionCondition.php
DatabaseConnectionCondition.isMet
public function isMet() { $settings = $this->configurationManager->getConfiguration(\Neos\Flow\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'Neos.Flow'); try { \Doctrine\DBAL\DriverManager::getConnection($settings['persistence']['backendOptions'])->connect(); ...
php
public function isMet() { $settings = $this->configurationManager->getConfiguration(\Neos\Flow\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'Neos.Flow'); try { \Doctrine\DBAL\DriverManager::getConnection($settings['persistence']['backendOptions'])->connect(); ...
[ "public", "function", "isMet", "(", ")", "{", "$", "settings", "=", "$", "this", "->", "configurationManager", "->", "getConfiguration", "(", "\\", "Neos", "\\", "Flow", "\\", "Configuration", "\\", "ConfigurationManager", "::", "CONFIGURATION_TYPE_SETTINGS", ",",...
Returns TRUE if the condition is satisfied, otherwise FALSE @return boolean
[ "Returns", "TRUE", "if", "the", "condition", "is", "satisfied", "otherwise", "FALSE" ]
7b5437efe8113e997007be6896628aa9f5c39d2f
https://github.com/neos/setup/blob/7b5437efe8113e997007be6896628aa9f5c39d2f/Classes/Condition/DatabaseConnectionCondition.php#L26-L36
224,678
acacha/users
src/Http/Controllers/APIForgotPasswordController.php
APIForgotPasswordController.massiveSendResetLinkEmail
public function massiveSendResetLinkEmail(Request $request) { $this->validate($request, ['ids' => 'required']); $errors = []; foreach ($request->input('ids') as $id) { $user = User::find($id); $response = Password::broker()->sendResetLink([ 'email' => $user->email ])...
php
public function massiveSendResetLinkEmail(Request $request) { $this->validate($request, ['ids' => 'required']); $errors = []; foreach ($request->input('ids') as $id) { $user = User::find($id); $response = Password::broker()->sendResetLink([ 'email' => $user->email ])...
[ "public", "function", "massiveSendResetLinkEmail", "(", "Request", "$", "request", ")", "{", "$", "this", "->", "validate", "(", "$", "request", ",", "[", "'ids'", "=>", "'required'", "]", ")", ";", "$", "errors", "=", "[", "]", ";", "foreach", "(", "$...
Send a reset link to the given users. @param Request $request @return JsonResponse
[ "Send", "a", "reset", "link", "to", "the", "given", "users", "." ]
af74be23d225bc9a23ee049579abb1596ae683c0
https://github.com/acacha/users/blob/af74be23d225bc9a23ee049579abb1596ae683c0/src/Http/Controllers/APIForgotPasswordController.php#L46-L63
224,679
phootwork/collection
src/AbstractList.php
AbstractList.findIndex
public function findIndex() { if (func_num_args() == 1) { $callback = func_get_arg(0); } else { $query = func_get_arg(0); $callback = func_get_arg(1); } $index = func_num_args() == 1 ? $this->find($callback) : $this->find($query, $callback); if ($index !== null) { $index = $this->indexOf($index...
php
public function findIndex() { if (func_num_args() == 1) { $callback = func_get_arg(0); } else { $query = func_get_arg(0); $callback = func_get_arg(1); } $index = func_num_args() == 1 ? $this->find($callback) : $this->find($query, $callback); if ($index !== null) { $index = $this->indexOf($index...
[ "public", "function", "findIndex", "(", ")", "{", "if", "(", "func_num_args", "(", ")", "==", "1", ")", "{", "$", "callback", "=", "func_get_arg", "(", "0", ")", ";", "}", "else", "{", "$", "query", "=", "func_get_arg", "(", "0", ")", ";", "$", "...
Searches the collection with a given callback and returns the index for the first element if found. The callback function takes one or two parameters: function ($element [, $query]) {} The callback must return a boolean @param mixed $query OPTIONAL the provided query @param callable $callback the callback function ...
[ "Searches", "the", "collection", "with", "a", "given", "callback", "and", "returns", "the", "index", "for", "the", "first", "element", "if", "found", "." ]
e745fe3735a6f2099015d11ea7b917634ebf76f3
https://github.com/phootwork/collection/blob/e745fe3735a6f2099015d11ea7b917634ebf76f3/src/AbstractList.php#L83-L97
224,680
phootwork/collection
src/AbstractList.php
AbstractList.findLastIndex
public function findLastIndex() { if (func_num_args() == 1) { $callback = func_get_arg(0); } else { $query = func_get_arg(0); $callback = func_get_arg(1); } $index = func_num_args() == 1 ? $this->findLast($callback) : $this->findLast($query, $callback); if ($index !== null) { $index = $this->in...
php
public function findLastIndex() { if (func_num_args() == 1) { $callback = func_get_arg(0); } else { $query = func_get_arg(0); $callback = func_get_arg(1); } $index = func_num_args() == 1 ? $this->findLast($callback) : $this->findLast($query, $callback); if ($index !== null) { $index = $this->in...
[ "public", "function", "findLastIndex", "(", ")", "{", "if", "(", "func_num_args", "(", ")", "==", "1", ")", "{", "$", "callback", "=", "func_get_arg", "(", "0", ")", ";", "}", "else", "{", "$", "query", "=", "func_get_arg", "(", "0", ")", ";", "$",...
Searches the collection with a given callback and returns the index for the last element if found. The callback function takes one or two parameters: function ($element [, $query]) {} The callback must return a boolean @param mixed $query OPTIONAL the provided query @param callable $callback the callback function @...
[ "Searches", "the", "collection", "with", "a", "given", "callback", "and", "returns", "the", "index", "for", "the", "last", "element", "if", "found", "." ]
e745fe3735a6f2099015d11ea7b917634ebf76f3
https://github.com/phootwork/collection/blob/e745fe3735a6f2099015d11ea7b917634ebf76f3/src/AbstractList.php#L112-L126
224,681
phootwork/collection
src/AbstractCollection.php
AbstractCollection.every
public function every(callable $callback) { $match = true; foreach ($this->collection as $element) { $match = $match && $callback($element); } return $match; }
php
public function every(callable $callback) { $match = true; foreach ($this->collection as $element) { $match = $match && $callback($element); } return $match; }
[ "public", "function", "every", "(", "callable", "$", "callback", ")", "{", "$", "match", "=", "true", ";", "foreach", "(", "$", "this", "->", "collection", "as", "$", "element", ")", "{", "$", "match", "=", "$", "match", "&&", "$", "callback", "(", ...
Tests whether all elements in the collection pass the test implemented by the provided function. Returns <code>true</code> for an empty collection. @param callable $callback @return boolean
[ "Tests", "whether", "all", "elements", "in", "the", "collection", "pass", "the", "test", "implemented", "by", "the", "provided", "function", "." ]
e745fe3735a6f2099015d11ea7b917634ebf76f3
https://github.com/phootwork/collection/blob/e745fe3735a6f2099015d11ea7b917634ebf76f3/src/AbstractCollection.php#L63-L70
224,682
phootwork/collection
src/AbstractCollection.php
AbstractCollection.some
public function some(callable $callback) { $match = false; foreach ($this->collection as $element) { $match = $match || $callback($element); } return $match; }
php
public function some(callable $callback) { $match = false; foreach ($this->collection as $element) { $match = $match || $callback($element); } return $match; }
[ "public", "function", "some", "(", "callable", "$", "callback", ")", "{", "$", "match", "=", "false", ";", "foreach", "(", "$", "this", "->", "collection", "as", "$", "element", ")", "{", "$", "match", "=", "$", "match", "||", "$", "callback", "(", ...
Tests whether at least one element in the collection passes the test implemented by the provided function. Returns <code>false</code> for an empty collection. @param callable $callback @return boolean
[ "Tests", "whether", "at", "least", "one", "element", "in", "the", "collection", "passes", "the", "test", "implemented", "by", "the", "provided", "function", "." ]
e745fe3735a6f2099015d11ea7b917634ebf76f3
https://github.com/phootwork/collection/blob/e745fe3735a6f2099015d11ea7b917634ebf76f3/src/AbstractCollection.php#L80-L87
224,683
phootwork/collection
src/AbstractCollection.php
AbstractCollection.search
public function search() { if (func_num_args() == 1) { $callback = func_get_arg(0); } else { $query = func_get_arg(0); $callback = func_get_arg(1); } foreach ($this->collection as $element) { $return = func_num_args() == 1 ? $callback($element) : $callback($element, $query); if ($return) { ...
php
public function search() { if (func_num_args() == 1) { $callback = func_get_arg(0); } else { $query = func_get_arg(0); $callback = func_get_arg(1); } foreach ($this->collection as $element) { $return = func_num_args() == 1 ? $callback($element) : $callback($element, $query); if ($return) { ...
[ "public", "function", "search", "(", ")", "{", "if", "(", "func_num_args", "(", ")", "==", "1", ")", "{", "$", "callback", "=", "func_get_arg", "(", "0", ")", ";", "}", "else", "{", "$", "query", "=", "func_get_arg", "(", "0", ")", ";", "$", "cal...
Searches the collection for query using the callback function on each element The callback function takes one or two parameters: function ($element [, $query]) {} The callback must return a boolean @param mixed $query (optional) @param callable $callback @return boolean
[ "Searches", "the", "collection", "for", "query", "using", "the", "callback", "function", "on", "each", "element" ]
e745fe3735a6f2099015d11ea7b917634ebf76f3
https://github.com/phootwork/collection/blob/e745fe3735a6f2099015d11ea7b917634ebf76f3/src/AbstractCollection.php#L102-L118
224,684
fojuth/plupload
src/Fojuth/Plupload/Controllers/PluploadController.php
PluploadController.gate
public function gate() { // The upload handler class name can be set as a GET parameter, but it must exist in the config file if (true === isset($_GET['upload_handler'])) { $handler = (string) str_replace('::', '\\', $_GET['upload_handler']); $class_name = \Config::get('plupload::pluploa...
php
public function gate() { // The upload handler class name can be set as a GET parameter, but it must exist in the config file if (true === isset($_GET['upload_handler'])) { $handler = (string) str_replace('::', '\\', $_GET['upload_handler']); $class_name = \Config::get('plupload::pluploa...
[ "public", "function", "gate", "(", ")", "{", "// The upload handler class name can be set as a GET parameter, but it must exist in the config file", "if", "(", "true", "===", "isset", "(", "$", "_GET", "[", "'upload_handler'", "]", ")", ")", "{", "$", "handler", "=", ...
Instantiate the upload handler and start the upload process. @throws \LogicException
[ "Instantiate", "the", "upload", "handler", "and", "start", "the", "upload", "process", "." ]
9d27e62516761352863cd08b7a2342326d69dd5c
https://github.com/fojuth/plupload/blob/9d27e62516761352863cd08b7a2342326d69dd5c/src/Fojuth/Plupload/Controllers/PluploadController.php#L19-L40
224,685
netz98/n98-deployer
src/Deployer/Config/ReleaseConfig.php
ReleaseConfig.register
public static function register() { \Deployer\set('release_path_app', function () { return ReleaseConfig::getReleasePathAppDir(); }); \Deployer\set('shared_path_app', function () { return ReleaseConfig::getSharedPathAppDir(); }); \Deployer\set('release_name', function () { return GetRelease...
php
public static function register() { \Deployer\set('release_path_app', function () { return ReleaseConfig::getReleasePathAppDir(); }); \Deployer\set('shared_path_app', function () { return ReleaseConfig::getSharedPathAppDir(); }); \Deployer\set('release_name', function () { return GetRelease...
[ "public", "static", "function", "register", "(", ")", "{", "\\", "Deployer", "\\", "set", "(", "'release_path_app'", ",", "function", "(", ")", "{", "return", "ReleaseConfig", "::", "getReleasePathAppDir", "(", ")", ";", "}", ")", ";", "\\", "Deployer", "\...
Register Config Proxies that are executed when config is fetched the first time
[ "Register", "Config", "Proxies", "that", "are", "executed", "when", "config", "is", "fetched", "the", "first", "time" ]
cf7b7c790f45c41ed338b8a33b498eeaaaa765e9
https://github.com/netz98/n98-deployer/blob/cf7b7c790f45c41ed338b8a33b498eeaaaa765e9/src/Deployer/Config/ReleaseConfig.php#L22-L29
224,686
burnbright/silverstripe-importexport
code/bulkloader/ListBulkLoader.php
ListBulkLoader.processAll
protected function processAll($filepath, $preview = false) { $iterator = $this->getSource()->getIterator(); $results = new BetterBulkLoader_Result(); foreach ($iterator as $record) { if ($id = $this->processRecord($record, $this->columnMap, $results, $preview)) { ...
php
protected function processAll($filepath, $preview = false) { $iterator = $this->getSource()->getIterator(); $results = new BetterBulkLoader_Result(); foreach ($iterator as $record) { if ($id = $this->processRecord($record, $this->columnMap, $results, $preview)) { ...
[ "protected", "function", "processAll", "(", "$", "filepath", ",", "$", "preview", "=", "false", ")", "{", "$", "iterator", "=", "$", "this", "->", "getSource", "(", ")", "->", "getIterator", "(", ")", ";", "$", "results", "=", "new", "BetterBulkLoader_Re...
Add records to the list.
[ "Add", "records", "to", "the", "list", "." ]
673ca4f63ce69d2128c2cd31daac64ee5bb2ecb3
https://github.com/burnbright/silverstripe-importexport/blob/673ca4f63ce69d2128c2cd31daac64ee5bb2ecb3/code/bulkloader/ListBulkLoader.php#L41-L52
224,687
netz98/n98-deployer
src/Deployer/Task/BuildTasks.php
BuildTasks.generateSharedDirs
public static function generateSharedDirs() { /** @var array $dirs */ $dirs = \Deployer\get('shared_dirs'); foreach ($dirs as $dir) { $cmd = "mkdir -p {{deploy_path}}/shared/$dir"; \Deployer\run($cmd); } }
php
public static function generateSharedDirs() { /** @var array $dirs */ $dirs = \Deployer\get('shared_dirs'); foreach ($dirs as $dir) { $cmd = "mkdir -p {{deploy_path}}/shared/$dir"; \Deployer\run($cmd); } }
[ "public", "static", "function", "generateSharedDirs", "(", ")", "{", "/** @var array $dirs */", "$", "dirs", "=", "\\", "Deployer", "\\", "get", "(", "'shared_dirs'", ")", ";", "foreach", "(", "$", "dirs", "as", "$", "dir", ")", "{", "$", "cmd", "=", "\"...
Generate Shared Dirs @todo validate if this method is still needed? recipe/deploy/shared.php should suffice
[ "Generate", "Shared", "Dirs" ]
cf7b7c790f45c41ed338b8a33b498eeaaaa765e9
https://github.com/netz98/n98-deployer/blob/cf7b7c790f45c41ed338b8a33b498eeaaaa765e9/src/Deployer/Task/BuildTasks.php#L58-L67
224,688
netz98/n98-deployer
src/Deployer/Task/BuildTasks.php
BuildTasks.changeOwnerAndMode
public static function changeOwnerAndMode() { $dirs = \Deployer\get('change_owner_mode_dirs'); if (empty($dirs)) { return; } foreach ($dirs as $key => $dirData) { $dir = $dirData['dir']; $owner = $dirData['owner']; $mode = $dirData['m...
php
public static function changeOwnerAndMode() { $dirs = \Deployer\get('change_owner_mode_dirs'); if (empty($dirs)) { return; } foreach ($dirs as $key => $dirData) { $dir = $dirData['dir']; $owner = $dirData['owner']; $mode = $dirData['m...
[ "public", "static", "function", "changeOwnerAndMode", "(", ")", "{", "$", "dirs", "=", "\\", "Deployer", "\\", "get", "(", "'change_owner_mode_dirs'", ")", ";", "if", "(", "empty", "(", "$", "dirs", ")", ")", "{", "return", ";", "}", "foreach", "(", "$...
Fix File Ownership and access rights for both deploy user and webserver_user
[ "Fix", "File", "Ownership", "and", "access", "rights", "for", "both", "deploy", "user", "and", "webserver_user" ]
cf7b7c790f45c41ed338b8a33b498eeaaaa765e9
https://github.com/netz98/n98-deployer/blob/cf7b7c790f45c41ed338b8a33b498eeaaaa765e9/src/Deployer/Task/BuildTasks.php#L72-L88
224,689
acacha/users
src/Traits/ExposePermissions.php
ExposePermissions.getCanAttribute
public function getCanAttribute() { $permissions = []; foreach (Permission::all() as $permission) { if (Auth::check() && Auth::user()->can($permission->name)) { $permissions[$permission->name] = true; } else { $permissions[$permission->name] = ...
php
public function getCanAttribute() { $permissions = []; foreach (Permission::all() as $permission) { if (Auth::check() && Auth::user()->can($permission->name)) { $permissions[$permission->name] = true; } else { $permissions[$permission->name] = ...
[ "public", "function", "getCanAttribute", "(", ")", "{", "$", "permissions", "=", "[", "]", ";", "foreach", "(", "Permission", "::", "all", "(", ")", "as", "$", "permission", ")", "{", "if", "(", "Auth", "::", "check", "(", ")", "&&", "Auth", "::", ...
Get all user permissions in a flat array. @return array
[ "Get", "all", "user", "permissions", "in", "a", "flat", "array", "." ]
af74be23d225bc9a23ee049579abb1596ae683c0
https://github.com/acacha/users/blob/af74be23d225bc9a23ee049579abb1596ae683c0/src/Traits/ExposePermissions.php#L20-L31
224,690
neos/setup
Classes/Core/BasicRequirements.php
BasicRequirements.findError
public function findError() { $requiredEnvironmentError = $this->ensureRequiredEnvironment(); if ($requiredEnvironmentError !== null) { return $this->setErrorTitle($requiredEnvironmentError, 'Environment requirements not fulfilled'); } $filePermissionsError = $this->chec...
php
public function findError() { $requiredEnvironmentError = $this->ensureRequiredEnvironment(); if ($requiredEnvironmentError !== null) { return $this->setErrorTitle($requiredEnvironmentError, 'Environment requirements not fulfilled'); } $filePermissionsError = $this->chec...
[ "public", "function", "findError", "(", ")", "{", "$", "requiredEnvironmentError", "=", "$", "this", "->", "ensureRequiredEnvironment", "(", ")", ";", "if", "(", "$", "requiredEnvironmentError", "!==", "null", ")", "{", "return", "$", "this", "->", "setErrorTi...
Ensure that the environment and file permission requirements are fulfilled. @return \Neos\Error\Messages\Error if requirements are fulfilled, NULL is returned. else, an Error object is returned.
[ "Ensure", "that", "the", "environment", "and", "file", "permission", "requirements", "are", "fulfilled", "." ]
7b5437efe8113e997007be6896628aa9f5c39d2f
https://github.com/neos/setup/blob/7b5437efe8113e997007be6896628aa9f5c39d2f/Classes/Core/BasicRequirements.php#L77-L90
224,691
neos/setup
Classes/Core/BasicRequirements.php
BasicRequirements.checkFilePermissions
protected function checkFilePermissions() { foreach ($this->requiredWritableFolders as $folder) { $folderPath = FLOW_PATH_ROOT . $folder; if (!is_dir($folderPath) && !\Neos\Utility\Files::is_link($folderPath)) { try { \Neos\Utility\Files::createDir...
php
protected function checkFilePermissions() { foreach ($this->requiredWritableFolders as $folder) { $folderPath = FLOW_PATH_ROOT . $folder; if (!is_dir($folderPath) && !\Neos\Utility\Files::is_link($folderPath)) { try { \Neos\Utility\Files::createDir...
[ "protected", "function", "checkFilePermissions", "(", ")", "{", "foreach", "(", "$", "this", "->", "requiredWritableFolders", "as", "$", "folder", ")", "{", "$", "folderPath", "=", "FLOW_PATH_ROOT", ".", "$", "folder", ";", "if", "(", "!", "is_dir", "(", "...
Check write permissions for folders used for writing files @return mixed
[ "Check", "write", "permissions", "for", "folders", "used", "for", "writing", "files" ]
7b5437efe8113e997007be6896628aa9f5c39d2f
https://github.com/neos/setup/blob/7b5437efe8113e997007be6896628aa9f5c39d2f/Classes/Core/BasicRequirements.php#L153-L170
224,692
joomla-framework/github-api
src/Package/Repositories/Comments.php
Comments.edit
public function edit($user, $repo, $id, $comment) { // Build the request path. $path = '/repos/' . $user . '/' . $repo . '/comments/' . $id; $data = json_encode( array( 'body' => $comment, ) ); // Send the request. return $this->processResponse( $this->client->patch($this->fetchUrl($path), $...
php
public function edit($user, $repo, $id, $comment) { // Build the request path. $path = '/repos/' . $user . '/' . $repo . '/comments/' . $id; $data = json_encode( array( 'body' => $comment, ) ); // Send the request. return $this->processResponse( $this->client->patch($this->fetchUrl($path), $...
[ "public", "function", "edit", "(", "$", "user", ",", "$", "repo", ",", "$", "id", ",", "$", "comment", ")", "{", "// Build the request path.", "$", "path", "=", "'/repos/'", ".", "$", "user", ".", "'/'", ".", "$", "repo", ".", "'/comments/'", ".", "$...
Update a commit comment. @param string $user The name of the owner of the GitHub repository. @param string $repo The name of the GitHub repository. @param string $id The ID of the comment to edit. @param string $comment The text of the comment. @return object @since 1.0
[ "Update", "a", "commit", "comment", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Repositories/Comments.php#L103-L118
224,693
joomla-framework/github-api
src/Package/Repositories/Comments.php
Comments.create
public function create($user, $repo, $sha, $comment, $line, $filepath, $position) { // Build the request path. $path = '/repos/' . $user . '/' . $repo . '/commits/' . $sha . '/comments'; $data = json_encode( array( 'body' => $comment, 'path' => $filepath, 'position' => (int) $position, ...
php
public function create($user, $repo, $sha, $comment, $line, $filepath, $position) { // Build the request path. $path = '/repos/' . $user . '/' . $repo . '/commits/' . $sha . '/comments'; $data = json_encode( array( 'body' => $comment, 'path' => $filepath, 'position' => (int) $position, ...
[ "public", "function", "create", "(", "$", "user", ",", "$", "repo", ",", "$", "sha", ",", "$", "comment", ",", "$", "line", ",", "$", "filepath", ",", "$", "position", ")", "{", "// Build the request path.", "$", "path", "=", "'/repos/'", ".", "$", "...
Create a commit comment. @param string $user The name of the owner of the GitHub repository. @param string $repo The name of the GitHub repository. @param string $sha The SHA of the commit to comment on. @param string $comment The text of the comment. @param integer $line The ...
[ "Create", "a", "commit", "comment", "." ]
27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04
https://github.com/joomla-framework/github-api/blob/27dcf6ab6389f68cf01903fcec6ab7b5cdc30e04/src/Package/Repositories/Comments.php#L158-L177
224,694
alxmsl/AppStoreClient
source/Client.php
Client.verifyReceipt
public function verifyReceipt($receipt) { $Request = $this->getRequest($this->getEndpointUrl()); $Request->addPostField('receipt-data', $receipt) ->addPostField('password', $this->getPassword()); $data = $Request->send(); try { return ResponsePayload::initializeBy...
php
public function verifyReceipt($receipt) { $Request = $this->getRequest($this->getEndpointUrl()); $Request->addPostField('receipt-data', $receipt) ->addPostField('password', $this->getPassword()); $data = $Request->send(); try { return ResponsePayload::initializeBy...
[ "public", "function", "verifyReceipt", "(", "$", "receipt", ")", "{", "$", "Request", "=", "$", "this", "->", "getRequest", "(", "$", "this", "->", "getEndpointUrl", "(", ")", ")", ";", "$", "Request", "->", "addPostField", "(", "'receipt-data'", ",", "$...
Method for receipts data verification @param string $receipt base64 encoded receipt @return Status|RenewableStatus|ResponsePayload iTunes status for receipt
[ "Method", "for", "receipts", "data", "verification" ]
95b6e9ea9f8b717760cf648f4a2e83d6fe3103b4
https://github.com/alxmsl/AppStoreClient/blob/95b6e9ea9f8b717760cf648f4a2e83d6fe3103b4/source/Client.php#L43-L57
224,695
burnbright/silverstripe-importexport
code/bulkloader/BetterBulkLoader_Result.php
BetterBulkLoader_Result.getMessageList
public function getMessageList() { $output = array(); if ($this->CreatedCount()) { $output['created'] = _t( 'BulkLoader.IMPORTEDRECORDS', "Imported {count} new records.", array('count' => $this->CreatedCount()) ); } if ($this->...
php
public function getMessageList() { $output = array(); if ($this->CreatedCount()) { $output['created'] = _t( 'BulkLoader.IMPORTEDRECORDS', "Imported {count} new records.", array('count' => $this->CreatedCount()) ); } if ($this->...
[ "public", "function", "getMessageList", "(", ")", "{", "$", "output", "=", "array", "(", ")", ";", "if", "(", "$", "this", "->", "CreatedCount", "(", ")", ")", "{", "$", "output", "[", "'created'", "]", "=", "_t", "(", "'BulkLoader.IMPORTEDRECORDS'", "...
Get an array of messages describing the result. @return array messages
[ "Get", "an", "array", "of", "messages", "describing", "the", "result", "." ]
673ca4f63ce69d2128c2cd31daac64ee5bb2ecb3
https://github.com/burnbright/silverstripe-importexport/blob/673ca4f63ce69d2128c2cd31daac64ee5bb2ecb3/code/bulkloader/BetterBulkLoader_Result.php#L37-L70
224,696
hnhdigital-os/laravel-model-json
src/JsonColumnValue.php
JsonColumnValue.getOriginal
public function getOriginal($key = null, $default = null) { if ($key === null) { return $this->internal_original_data; } elseif (array_key_exists($key, $this->internal_original_data)) { return $this->internal_original_data[$key]; } return $default; }
php
public function getOriginal($key = null, $default = null) { if ($key === null) { return $this->internal_original_data; } elseif (array_key_exists($key, $this->internal_original_data)) { return $this->internal_original_data[$key]; } return $default; }
[ "public", "function", "getOriginal", "(", "$", "key", "=", "null", ",", "$", "default", "=", "null", ")", "{", "if", "(", "$", "key", "===", "null", ")", "{", "return", "$", "this", "->", "internal_original_data", ";", "}", "elseif", "(", "array_key_ex...
Get the json data original values. @param string|null $key @param mixed $default @return array
[ "Get", "the", "json", "data", "original", "values", "." ]
092511d2ce76ffbd1e3a94c9bed48df9ce0be643
https://github.com/hnhdigital-os/laravel-model-json/blob/092511d2ce76ffbd1e3a94c9bed48df9ce0be643/src/JsonColumnValue.php#L71-L80
224,697
hnhdigital-os/laravel-model-json
src/JsonColumnValue.php
JsonColumnValue.getCurrent
public function getCurrent() { $data = []; foreach (get_object_vars($this) as $key => $value) { if (substr($key, 0, 8) !== 'internal') { $data[$key] = $value; } } return $data; }
php
public function getCurrent() { $data = []; foreach (get_object_vars($this) as $key => $value) { if (substr($key, 0, 8) !== 'internal') { $data[$key] = $value; } } return $data; }
[ "public", "function", "getCurrent", "(", ")", "{", "$", "data", "=", "[", "]", ";", "foreach", "(", "get_object_vars", "(", "$", "this", ")", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "substr", "(", "$", "key", ",", "0", ",", "...
Get the current data as an array. @return array
[ "Get", "the", "current", "data", "as", "an", "array", "." ]
092511d2ce76ffbd1e3a94c9bed48df9ce0be643
https://github.com/hnhdigital-os/laravel-model-json/blob/092511d2ce76ffbd1e3a94c9bed48df9ce0be643/src/JsonColumnValue.php#L87-L97
224,698
hnhdigital-os/laravel-model-json
src/JsonColumnValue.php
JsonColumnValue.getJson
public function getJson() { $dirty = $this->getDirty(); if (count($dirty)) { $this->internal_original_value = $this->__toString(); } return $this->internal_original_value; }
php
public function getJson() { $dirty = $this->getDirty(); if (count($dirty)) { $this->internal_original_value = $this->__toString(); } return $this->internal_original_value; }
[ "public", "function", "getJson", "(", ")", "{", "$", "dirty", "=", "$", "this", "->", "getDirty", "(", ")", ";", "if", "(", "count", "(", "$", "dirty", ")", ")", "{", "$", "this", "->", "internal_original_value", "=", "$", "this", "->", "__toString",...
Get the current data json encoded. @return string
[ "Get", "the", "current", "data", "json", "encoded", "." ]
092511d2ce76ffbd1e3a94c9bed48df9ce0be643
https://github.com/hnhdigital-os/laravel-model-json/blob/092511d2ce76ffbd1e3a94c9bed48df9ce0be643/src/JsonColumnValue.php#L104-L112
224,699
hnhdigital-os/laravel-model-json
src/JsonColumnValue.php
JsonColumnValue.getDirty
public function getDirty() { $dirty = []; foreach ($this->getCurrent() as $key => $value) { // Value is a default value and `no_saving_default_values` option has been enabled if (array_key_exists('no_saving_default_values', $this->internal_options) && $this->...
php
public function getDirty() { $dirty = []; foreach ($this->getCurrent() as $key => $value) { // Value is a default value and `no_saving_default_values` option has been enabled if (array_key_exists('no_saving_default_values', $this->internal_options) && $this->...
[ "public", "function", "getDirty", "(", ")", "{", "$", "dirty", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "getCurrent", "(", ")", "as", "$", "key", "=>", "$", "value", ")", "{", "// Value is a default value and `no_saving_default_values` option has...
Add json data values that have changed. @return array
[ "Add", "json", "data", "values", "that", "have", "changed", "." ]
092511d2ce76ffbd1e3a94c9bed48df9ce0be643
https://github.com/hnhdigital-os/laravel-model-json/blob/092511d2ce76ffbd1e3a94c9bed48df9ce0be643/src/JsonColumnValue.php#L119-L145