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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
191,500 | pravednik/xmlBundle | Model/XmlGenerator.php | XmlGenerator.getDomDocument | protected function getDomDocument()
{
if(null === $this->domDocument)
{
$this->domDocument = new \DOMDocument($this->getVersion(), $this->getEncoding());
$this->domDocument->formatOutput = $this->formatOutputFlag;
}
return $this->domDocument;
} | php | protected function getDomDocument()
{
if(null === $this->domDocument)
{
$this->domDocument = new \DOMDocument($this->getVersion(), $this->getEncoding());
$this->domDocument->formatOutput = $this->formatOutputFlag;
}
return $this->domDocument;
} | [
"protected",
"function",
"getDomDocument",
"(",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"domDocument",
")",
"{",
"$",
"this",
"->",
"domDocument",
"=",
"new",
"\\",
"DOMDocument",
"(",
"$",
"this",
"->",
"getVersion",
"(",
")",
",",
"$",... | Gets DomDocument object
@return \DOMDocument | [
"Gets",
"DomDocument",
"object"
] | fa3a0852097209eb6840ef01224b4ddb004790b5 | https://github.com/pravednik/xmlBundle/blob/fa3a0852097209eb6840ef01224b4ddb004790b5/Model/XmlGenerator.php#L470-L479 |
191,501 | pravednik/xmlBundle | Model/XmlGenerator.php | XmlGenerator.prepareElementName | protected function prepareElementName(&$elementName)
{
$tempElementName = explode('_', $elementName);
$elementName = isset($tempElementName[0]) && is_numeric($tempElementName[0])
? $tempElementName[1]
: $elementName;
} | php | protected function prepareElementName(&$elementName)
{
$tempElementName = explode('_', $elementName);
$elementName = isset($tempElementName[0]) && is_numeric($tempElementName[0])
? $tempElementName[1]
: $elementName;
} | [
"protected",
"function",
"prepareElementName",
"(",
"&",
"$",
"elementName",
")",
"{",
"$",
"tempElementName",
"=",
"explode",
"(",
"'_'",
",",
"$",
"elementName",
")",
";",
"$",
"elementName",
"=",
"isset",
"(",
"$",
"tempElementName",
"[",
"0",
"]",
")",... | Support for multiple elements with the same name
@param string $elementName
@return void | [
"Support",
"for",
"multiple",
"elements",
"with",
"the",
"same",
"name"
] | fa3a0852097209eb6840ef01224b4ddb004790b5 | https://github.com/pravednik/xmlBundle/blob/fa3a0852097209eb6840ef01224b4ddb004790b5/Model/XmlGenerator.php#L500-L506 |
191,502 | letrunghieu/favicon | src/Html.php | Html.output | public static function output($noOldApple = false, $noAndroid = false, $noMs = false, $tileColor = '#FFFFFF', $browserConfigFile = '', $appName = '')
{
$result = array();
if (!$noMs)
{
if (!$browserConfigFile)
{
$result[] = '<meta name="msapplic... | php | public static function output($noOldApple = false, $noAndroid = false, $noMs = false, $tileColor = '#FFFFFF', $browserConfigFile = '', $appName = '')
{
$result = array();
if (!$noMs)
{
if (!$browserConfigFile)
{
$result[] = '<meta name="msapplic... | [
"public",
"static",
"function",
"output",
"(",
"$",
"noOldApple",
"=",
"false",
",",
"$",
"noAndroid",
"=",
"false",
",",
"$",
"noMs",
"=",
"false",
",",
"$",
"tileColor",
"=",
"'#FFFFFF'",
",",
"$",
"browserConfigFile",
"=",
"''",
",",
"$",
"appName",
... | Write meta and link tags
@param bool $noOldApple exclude old apple touch link
@param bool $noAndroid exclude android manifest.json file
@param bool $noMs exclude msapplication meta tags
@param tring $tileColor the color of Windows tile
@param string $browserConfigFile the path to browserconfig.xml file or null to disa... | [
"Write",
"meta",
"and",
"link",
"tags"
] | 79785e47e956d0baea1b5ac6e306a553e91dac0e | https://github.com/letrunghieu/favicon/blob/79785e47e956d0baea1b5ac6e306a553e91dac0e/src/Html.php#L25-L72 |
191,503 | gushphp/gush | src/Helper/ProcessHelper.php | ProcessHelper.runCommand | public function runCommand($command, $allowFailures = false, $callback = null)
{
if (is_string($command)) {
$command = $this->parseProcessArguments($command);
}
$builder = new ProcessBuilder($command);
$builder
->setWorkingDirectory(getcwd())
->se... | php | public function runCommand($command, $allowFailures = false, $callback = null)
{
if (is_string($command)) {
$command = $this->parseProcessArguments($command);
}
$builder = new ProcessBuilder($command);
$builder
->setWorkingDirectory(getcwd())
->se... | [
"public",
"function",
"runCommand",
"(",
"$",
"command",
",",
"$",
"allowFailures",
"=",
"false",
",",
"$",
"callback",
"=",
"null",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"command",
")",
")",
"{",
"$",
"command",
"=",
"$",
"this",
"->",
"parseP... | Run a command through the ProcessBuilder.
@param string|array $command
@param bool $allowFailures
@param \Closure $callback Callback for Process (e.g. for logging output in realtime)
@return string | [
"Run",
"a",
"command",
"through",
"the",
"ProcessBuilder",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/ProcessHelper.php#L55-L85 |
191,504 | gushphp/gush | src/Helper/ProcessHelper.php | ProcessHelper.runCommands | public function runCommands(array $commands)
{
$output = $this->output;
$callback = function ($type, $buffer) use ($output) {
if (Process::ERR === $type) {
$output->write('<info>OUT</info> '.$buffer);
} else {
$output->write('<comment>OUT</com... | php | public function runCommands(array $commands)
{
$output = $this->output;
$callback = function ($type, $buffer) use ($output) {
if (Process::ERR === $type) {
$output->write('<info>OUT</info> '.$buffer);
} else {
$output->write('<comment>OUT</com... | [
"public",
"function",
"runCommands",
"(",
"array",
"$",
"commands",
")",
"{",
"$",
"output",
"=",
"$",
"this",
"->",
"output",
";",
"$",
"callback",
"=",
"function",
"(",
"$",
"type",
",",
"$",
"buffer",
")",
"use",
"(",
"$",
"output",
")",
"{",
"i... | Run a series of shell command through a Process.
@param array $commands | [
"Run",
"a",
"series",
"of",
"shell",
"command",
"through",
"a",
"Process",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/ProcessHelper.php#L112-L127 |
191,505 | netdragoon/zipcode | src/Canducci/ZipCode/ZipCodeInfo.php | ZipCodeInfo.json_validate_zipcode | private function json_validate_zipcode()
{
if (!empty($this->valueJson) && is_string($this->valueJson))
{
$ret = @json_decode($this->valueJson, true);
return (json_last_error() === JSON_ERROR_NONE &&
isset($ret['cep']) &&
... | php | private function json_validate_zipcode()
{
if (!empty($this->valueJson) && is_string($this->valueJson))
{
$ret = @json_decode($this->valueJson, true);
return (json_last_error() === JSON_ERROR_NONE &&
isset($ret['cep']) &&
... | [
"private",
"function",
"json_validate_zipcode",
"(",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"valueJson",
")",
"&&",
"is_string",
"(",
"$",
"this",
"->",
"valueJson",
")",
")",
"{",
"$",
"ret",
"=",
"@",
"json_decode",
"(",
"$",
"t... | validate zipcode format
@return bool | [
"validate",
"zipcode",
"format"
] | 6bd4d58fecf0567391de158a4e6bf0afbf81183c | https://github.com/netdragoon/zipcode/blob/6bd4d58fecf0567391de158a4e6bf0afbf81183c/src/Canducci/ZipCode/ZipCodeInfo.php#L85-L102 |
191,506 | gushphp/gush | src/Meta/Iterator/PathFilterIterator.php | PathFilterIterator.toRegex | protected function toRegex($str)
{
$value = Expression::create($str);
if ($value->isGlob()) {
$value = $value->getRegex();
if (false === strpos($str, '/')) {
$value->setStartFlag(false);
}
}
return $value->render();
} | php | protected function toRegex($str)
{
$value = Expression::create($str);
if ($value->isGlob()) {
$value = $value->getRegex();
if (false === strpos($str, '/')) {
$value->setStartFlag(false);
}
}
return $value->render();
} | [
"protected",
"function",
"toRegex",
"(",
"$",
"str",
")",
"{",
"$",
"value",
"=",
"Expression",
"::",
"create",
"(",
"$",
"str",
")",
";",
"if",
"(",
"$",
"value",
"->",
"isGlob",
"(",
")",
")",
"{",
"$",
"value",
"=",
"$",
"value",
"->",
"getReg... | Converts glob to regexp.
PCRE patterns are left unchanged.
Glob strings are transformed with Glob::toRegex().
@param string $str Pattern: glob or regexp
@return string regexp corresponding to a given glob or regexp | [
"Converts",
"glob",
"to",
"regexp",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Meta/Iterator/PathFilterIterator.php#L66-L79 |
191,507 | gushphp/gush | src/Command/BaseCommand.php | BaseCommand.getParameter | public function getParameter(InputInterface $input, $key)
{
$config = $this->getConfig();
$adapter = $input->getOption('repo-adapter');
if ($value = $config->get(['adapters', $adapter, $key])) {
return $value;
}
return $config->get($key);
} | php | public function getParameter(InputInterface $input, $key)
{
$config = $this->getConfig();
$adapter = $input->getOption('repo-adapter');
if ($value = $config->get(['adapters', $adapter, $key])) {
return $value;
}
return $config->get($key);
} | [
"public",
"function",
"getParameter",
"(",
"InputInterface",
"$",
"input",
",",
"$",
"key",
")",
"{",
"$",
"config",
"=",
"$",
"this",
"->",
"getConfig",
"(",
")",
";",
"$",
"adapter",
"=",
"$",
"input",
"->",
"getOption",
"(",
"'repo-adapter'",
")",
"... | Gets a specific parameter.
@param InputInterface $input
@param string $key
@return mixed | [
"Gets",
"a",
"specific",
"parameter",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Command/BaseCommand.php#L77-L87 |
191,508 | gushphp/gush | src/Command/BaseCommand.php | BaseCommand.render | protected function render($templateName, array $placeholderValuePairs)
{
$resultString = Messages::get($templateName);
foreach ($placeholderValuePairs as $placeholder => $value) {
$resultString = str_replace('{{ '.$placeholder.' }}', $value, $resultString);
}
return $res... | php | protected function render($templateName, array $placeholderValuePairs)
{
$resultString = Messages::get($templateName);
foreach ($placeholderValuePairs as $placeholder => $value) {
$resultString = str_replace('{{ '.$placeholder.' }}', $value, $resultString);
}
return $res... | [
"protected",
"function",
"render",
"(",
"$",
"templateName",
",",
"array",
"$",
"placeholderValuePairs",
")",
"{",
"$",
"resultString",
"=",
"Messages",
"::",
"get",
"(",
"$",
"templateName",
")",
";",
"foreach",
"(",
"$",
"placeholderValuePairs",
"as",
"$",
... | Render a string from the Messages library.
@param string $templateName Name of template
@param array $placeholderValuePairs Associative array of substitute values
@return string | [
"Render",
"a",
"string",
"from",
"the",
"Messages",
"library",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Command/BaseCommand.php#L97-L105 |
191,509 | gushphp/gush | src/Command/BaseCommand.php | BaseCommand.initialize | protected function initialize(InputInterface $input, OutputInterface $output)
{
$this->getApplication()->getDispatcher()->dispatch(
GushEvents::INITIALIZE,
new ConsoleCommandEvent($this, $input, $output)
);
} | php | protected function initialize(InputInterface $input, OutputInterface $output)
{
$this->getApplication()->getDispatcher()->dispatch(
GushEvents::INITIALIZE,
new ConsoleCommandEvent($this, $input, $output)
);
} | [
"protected",
"function",
"initialize",
"(",
"InputInterface",
"$",
"input",
",",
"OutputInterface",
"$",
"output",
")",
"{",
"$",
"this",
"->",
"getApplication",
"(",
")",
"->",
"getDispatcher",
"(",
")",
"->",
"dispatch",
"(",
"GushEvents",
"::",
"INITIALIZE"... | We override the initialize function as this is the only place
where we can dispatch an event which can validate the input when
it has been bound with values.
{@inheritdoc} | [
"We",
"override",
"the",
"initialize",
"function",
"as",
"this",
"is",
"the",
"only",
"place",
"where",
"we",
"can",
"dispatch",
"an",
"event",
"which",
"can",
"validate",
"the",
"input",
"when",
"it",
"has",
"been",
"bound",
"with",
"values",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Command/BaseCommand.php#L114-L120 |
191,510 | gushphp/gush | src/Command/PullRequest/PullRequestCreateCommand.php | PullRequestCreateCommand.guardCommitsBetweenLocalBranchAndRemoteBaseBranch | private function guardCommitsBetweenLocalBranchAndRemoteBaseBranch($org, $repo, $branch, $sourceBranch)
{
/** @var GitHelper $gitHelper */
$gitHelper = $this->getHelper('git');
if (!$commitCount = $gitHelper->getCommitCountBetweenLocalAndBase($org, $branch, $sourceBranch)) {
thr... | php | private function guardCommitsBetweenLocalBranchAndRemoteBaseBranch($org, $repo, $branch, $sourceBranch)
{
/** @var GitHelper $gitHelper */
$gitHelper = $this->getHelper('git');
if (!$commitCount = $gitHelper->getCommitCountBetweenLocalAndBase($org, $branch, $sourceBranch)) {
thr... | [
"private",
"function",
"guardCommitsBetweenLocalBranchAndRemoteBaseBranch",
"(",
"$",
"org",
",",
"$",
"repo",
",",
"$",
"branch",
",",
"$",
"sourceBranch",
")",
"{",
"/** @var GitHelper $gitHelper */",
"$",
"gitHelper",
"=",
"$",
"this",
"->",
"getHelper",
"(",
"... | Gets the number of commits between local and base branch, failing if there
isn't any.
@param string $org
@param string $repo
@param string $branch
@param string $sourceBranch
@throws UserException If there aren't commits between local and base branch
@return int The number of commits between local and base branch | [
"Gets",
"the",
"number",
"of",
"commits",
"between",
"local",
"and",
"base",
"branch",
"failing",
"if",
"there",
"isn",
"t",
"any",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Command/PullRequest/PullRequestCreateCommand.php#L258-L270 |
191,511 | jumper423/yii2-vk | VK.php | VK.defaultCurlOptions | protected function defaultCurlOptions()
{
$result = parent::defaultCurlOptions();
$result[CURLOPT_NOSIGNAL] = 1;
if ($this->speed == self::SPEED_LONG || $this->big) {
$result[CURLOPT_CONNECTTIMEOUT_MS] = 60000;
$result[CURLOPT_TIMEOUT_MS] = 60000;
$this->b... | php | protected function defaultCurlOptions()
{
$result = parent::defaultCurlOptions();
$result[CURLOPT_NOSIGNAL] = 1;
if ($this->speed == self::SPEED_LONG || $this->big) {
$result[CURLOPT_CONNECTTIMEOUT_MS] = 60000;
$result[CURLOPT_TIMEOUT_MS] = 60000;
$this->b... | [
"protected",
"function",
"defaultCurlOptions",
"(",
")",
"{",
"$",
"result",
"=",
"parent",
"::",
"defaultCurlOptions",
"(",
")",
";",
"$",
"result",
"[",
"CURLOPT_NOSIGNAL",
"]",
"=",
"1",
";",
"if",
"(",
"$",
"this",
"->",
"speed",
"==",
"self",
"::",
... | Returns default cURL options.
@return array cURL options. | [
"Returns",
"default",
"cURL",
"options",
"."
] | 9b3b09b2d140b2fc76793862e1cb86802caca950 | https://github.com/jumper423/yii2-vk/blob/9b3b09b2d140b2fc76793862e1cb86802caca950/VK.php#L127-L140 |
191,512 | pravednik/xmlBundle | Model/XmlPrepare.php | XmlPrepare.prepareArrayBeforeToXmlConvert | public function prepareArrayBeforeToXmlConvert(array $data, $primaryKey = '')
{
$result = [];
$iterator = new RecursiveArrayIterator($data);
$this->arrayWalk($iterator, $result, '');
return '' !== (string) $primaryKey ? [$primaryKey => $result] : $result;
} | php | public function prepareArrayBeforeToXmlConvert(array $data, $primaryKey = '')
{
$result = [];
$iterator = new RecursiveArrayIterator($data);
$this->arrayWalk($iterator, $result, '');
return '' !== (string) $primaryKey ? [$primaryKey => $result] : $result;
} | [
"public",
"function",
"prepareArrayBeforeToXmlConvert",
"(",
"array",
"$",
"data",
",",
"$",
"primaryKey",
"=",
"''",
")",
"{",
"$",
"result",
"=",
"[",
"]",
";",
"$",
"iterator",
"=",
"new",
"RecursiveArrayIterator",
"(",
"$",
"data",
")",
";",
"$",
"th... | Preparing the array to convert to XML
@param array $data Source array
@param string $primaryKey Parent element name
@return array | [
"Preparing",
"the",
"array",
"to",
"convert",
"to",
"XML"
] | fa3a0852097209eb6840ef01224b4ddb004790b5 | https://github.com/pravednik/xmlBundle/blob/fa3a0852097209eb6840ef01224b4ddb004790b5/Model/XmlPrepare.php#L44-L51 |
191,513 | pravednik/xmlBundle | Model/XmlPrepare.php | XmlPrepare.arrayWalk | protected function arrayWalk(RecursiveArrayIterator $iterator, &$result, $primaryKey)
{
while($iterator->valid())
{
if($iterator->hasChildren())
{
if($iterator->getChildren()->hasChildren())
{
$this->arrayWalk($iterator->get... | php | protected function arrayWalk(RecursiveArrayIterator $iterator, &$result, $primaryKey)
{
while($iterator->valid())
{
if($iterator->hasChildren())
{
if($iterator->getChildren()->hasChildren())
{
$this->arrayWalk($iterator->get... | [
"protected",
"function",
"arrayWalk",
"(",
"RecursiveArrayIterator",
"$",
"iterator",
",",
"&",
"$",
"result",
",",
"$",
"primaryKey",
")",
"{",
"while",
"(",
"$",
"iterator",
"->",
"valid",
"(",
")",
")",
"{",
"if",
"(",
"$",
"iterator",
"->",
"hasChild... | Recursive traversal of array
@param RecursiveArrayIterator $iterator
@param array $result
@param string $primaryKey | [
"Recursive",
"traversal",
"of",
"array"
] | fa3a0852097209eb6840ef01224b4ddb004790b5 | https://github.com/pravednik/xmlBundle/blob/fa3a0852097209eb6840ef01224b4ddb004790b5/Model/XmlPrepare.php#L60-L96 |
191,514 | gushphp/gush | src/Helper/GitRepoHelper.php | GitRepoHelper.validateEnums | public static function validateEnums(InputInterface $input, $domain, $types = [])
{
$ret = [];
foreach ($types as $type) {
$v = $input->getOption($type);
if (null !== $v) {
self::validateEnum($domain, $type, $v);
$ret[$type] = $v;
... | php | public static function validateEnums(InputInterface $input, $domain, $types = [])
{
$ret = [];
foreach ($types as $type) {
$v = $input->getOption($type);
if (null !== $v) {
self::validateEnum($domain, $type, $v);
$ret[$type] = $v;
... | [
"public",
"static",
"function",
"validateEnums",
"(",
"InputInterface",
"$",
"input",
",",
"$",
"domain",
",",
"$",
"types",
"=",
"[",
"]",
")",
"{",
"$",
"ret",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"types",
"as",
"$",
"type",
")",
"{",
"$",
... | Validate the given enum fields in the given Input.
@param InputInterface $input - Input which contains the options to be validated
@param string $domain - Domain of the enum e.g. issue
@param string[] $types - Types to validate (e.g. filter ,state, etc)
@throws \InvalidArgumentException
@return array... | [
"Validate",
"the",
"given",
"enum",
"fields",
"in",
"the",
"given",
"Input",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/GitRepoHelper.php#L66-L79 |
191,515 | gushphp/gush | src/Helper/GitRepoHelper.php | GitRepoHelper.validateEnum | public static function validateEnum($domain, $type, $value)
{
self::validateEnumDomainAndType($domain, $type);
if (!in_array($value, self::$enum[$domain][$type]['values'], true)) {
throw new \InvalidArgumentException(
sprintf('Unknown value "%s" for "%s"', $value, $type)... | php | public static function validateEnum($domain, $type, $value)
{
self::validateEnumDomainAndType($domain, $type);
if (!in_array($value, self::$enum[$domain][$type]['values'], true)) {
throw new \InvalidArgumentException(
sprintf('Unknown value "%s" for "%s"', $value, $type)... | [
"public",
"static",
"function",
"validateEnum",
"(",
"$",
"domain",
",",
"$",
"type",
",",
"$",
"value",
")",
"{",
"self",
"::",
"validateEnumDomainAndType",
"(",
"$",
"domain",
",",
"$",
"type",
")",
";",
"if",
"(",
"!",
"in_array",
"(",
"$",
"value",... | Check if a given value is a valid enum.
@param string $domain - Domain of the enum e.g. issue
@param string $type - Type to validate (e.g. filter ,state, etc)
@param mixed $value
@throws \InvalidArgumentException | [
"Check",
"if",
"a",
"given",
"value",
"is",
"a",
"valid",
"enum",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/GitRepoHelper.php#L105-L114 |
191,516 | gushphp/gush | src/Helper/GitRepoHelper.php | GitRepoHelper.formatEnum | public static function formatEnum($domain, $type)
{
self::validateEnumDomainAndType($domain, $type);
return sprintf(
'%s (One of <comment>%s</comment>)',
self::$enum[$domain][$type]['desc'],
implode('</comment>, <comment>', self::$enum[$domain][$type]['values'])
... | php | public static function formatEnum($domain, $type)
{
self::validateEnumDomainAndType($domain, $type);
return sprintf(
'%s (One of <comment>%s</comment>)',
self::$enum[$domain][$type]['desc'],
implode('</comment>, <comment>', self::$enum[$domain][$type]['values'])
... | [
"public",
"static",
"function",
"formatEnum",
"(",
"$",
"domain",
",",
"$",
"type",
")",
"{",
"self",
"::",
"validateEnumDomainAndType",
"(",
"$",
"domain",
",",
"$",
"type",
")",
";",
"return",
"sprintf",
"(",
"'%s (One of <comment>%s</comment>)'",
",",
"self... | Return a description for the given enum type.
@param string $domain - Domain of the enum e.g. issue
@param string $type - Type to validate (e.g. filter ,state, etc)
@return string | [
"Return",
"a",
"description",
"for",
"the",
"given",
"enum",
"type",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/GitRepoHelper.php#L124-L133 |
191,517 | rygilles/laravel-openapi-schema-generator | src/Rygilles/OpenApiGenerator/Generators/Generator.php | Generator.applyProfileOpenApiBindings | public function applyProfileOpenApiBindings()
{
$this->openAPI->info = $this->profile['openapi_bindings']['info'];
if (isset($this->profile['openapi_bindings']['security'])) {
$this->openAPI->security = $this->profile['openapi_bindings']['security'];
}
if (isset($this->profile['openapi_bindings'][... | php | public function applyProfileOpenApiBindings()
{
$this->openAPI->info = $this->profile['openapi_bindings']['info'];
if (isset($this->profile['openapi_bindings']['security'])) {
$this->openAPI->security = $this->profile['openapi_bindings']['security'];
}
if (isset($this->profile['openapi_bindings'][... | [
"public",
"function",
"applyProfileOpenApiBindings",
"(",
")",
"{",
"$",
"this",
"->",
"openAPI",
"->",
"info",
"=",
"$",
"this",
"->",
"profile",
"[",
"'openapi_bindings'",
"]",
"[",
"'info'",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"profi... | Apply profile Open API bindings provided from configuration file | [
"Apply",
"profile",
"Open",
"API",
"bindings",
"provided",
"from",
"configuration",
"file"
] | 515eddcce4572de080539711f972bef84863d371 | https://github.com/rygilles/laravel-openapi-schema-generator/blob/515eddcce4572de080539711f972bef84863d371/src/Rygilles/OpenApiGenerator/Generators/Generator.php#L90-L105 |
191,518 | rygilles/laravel-openapi-schema-generator | src/Rygilles/OpenApiGenerator/Generators/Generator.php | Generator.processRoutes | public function processRoutes($routes)
{
if (is_null($this->openAPI->paths)) {
$this->openAPI->paths = [];
}
foreach ($routes as $route) {
$this->processRoute($route);
}
} | php | public function processRoutes($routes)
{
if (is_null($this->openAPI->paths)) {
$this->openAPI->paths = [];
}
foreach ($routes as $route) {
$this->processRoute($route);
}
} | [
"public",
"function",
"processRoutes",
"(",
"$",
"routes",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"openAPI",
"->",
"paths",
")",
")",
"{",
"$",
"this",
"->",
"openAPI",
"->",
"paths",
"=",
"[",
"]",
";",
"}",
"foreach",
"(",
"$",
... | Process routes and create path item objects on the root Open API document.
@param mixed $routes | [
"Process",
"routes",
"and",
"create",
"path",
"item",
"objects",
"on",
"the",
"root",
"Open",
"API",
"document",
"."
] | 515eddcce4572de080539711f972bef84863d371 | https://github.com/rygilles/laravel-openapi-schema-generator/blob/515eddcce4572de080539711f972bef84863d371/src/Rygilles/OpenApiGenerator/Generators/Generator.php#L121-L131 |
191,519 | rygilles/laravel-openapi-schema-generator | src/Rygilles/OpenApiGenerator/Generators/Generator.php | Generator.getDocBlockOperationId | protected function getDocBlockOperationId($docBlock)
{
$apiOperationIdTags = $docBlock->getTagsByName('OpenApiOperationId');
if (count($apiOperationIdTags) > 0) {
$apiOperationIdTag = $apiOperationIdTags[0];
$apiOperationId = trim(str_replace('@OpenApiOperationId', '',$apiOperationIdTag->render()));
... | php | protected function getDocBlockOperationId($docBlock)
{
$apiOperationIdTags = $docBlock->getTagsByName('OpenApiOperationId');
if (count($apiOperationIdTags) > 0) {
$apiOperationIdTag = $apiOperationIdTags[0];
$apiOperationId = trim(str_replace('@OpenApiOperationId', '',$apiOperationIdTag->render()));
... | [
"protected",
"function",
"getDocBlockOperationId",
"(",
"$",
"docBlock",
")",
"{",
"$",
"apiOperationIdTags",
"=",
"$",
"docBlock",
"->",
"getTagsByName",
"(",
"'OpenApiOperationId'",
")",
";",
"if",
"(",
"count",
"(",
"$",
"apiOperationIdTags",
")",
">",
"0",
... | Return the OpenAPI Operation Id from a doc block or null if not found.
@param DocBlock $docBlock
@return string|null | [
"Return",
"the",
"OpenAPI",
"Operation",
"Id",
"from",
"a",
"doc",
"block",
"or",
"null",
"if",
"not",
"found",
"."
] | 515eddcce4572de080539711f972bef84863d371 | https://github.com/rygilles/laravel-openapi-schema-generator/blob/515eddcce4572de080539711f972bef84863d371/src/Rygilles/OpenApiGenerator/Generators/Generator.php#L477-L487 |
191,520 | rygilles/laravel-openapi-schema-generator | src/Rygilles/OpenApiGenerator/Generators/Generator.php | Generator.getDocBlockOperationTags | protected function getDocBlockOperationTags($docBlock)
{
$apiOperationTagTags = $docBlock->getTagsByName('OpenApiOperationTag');
foreach ($apiOperationTagTags as $apiOperationTagTag) {
$apiOperationTag = trim(str_replace('@OpenApiOperationTag', '',$apiOperationTagTag->render()));
if (strstr($apiOperatio... | php | protected function getDocBlockOperationTags($docBlock)
{
$apiOperationTagTags = $docBlock->getTagsByName('OpenApiOperationTag');
foreach ($apiOperationTagTags as $apiOperationTagTag) {
$apiOperationTag = trim(str_replace('@OpenApiOperationTag', '',$apiOperationTagTag->render()));
if (strstr($apiOperatio... | [
"protected",
"function",
"getDocBlockOperationTags",
"(",
"$",
"docBlock",
")",
"{",
"$",
"apiOperationTagTags",
"=",
"$",
"docBlock",
"->",
"getTagsByName",
"(",
"'OpenApiOperationTag'",
")",
";",
"foreach",
"(",
"$",
"apiOperationTagTags",
"as",
"$",
"apiOperation... | Return the OpenAPI Operation Tags from a doc block.
@param DocBlock $docBlock
@return string[] | [
"Return",
"the",
"OpenAPI",
"Operation",
"Tags",
"from",
"a",
"doc",
"block",
"."
] | 515eddcce4572de080539711f972bef84863d371 | https://github.com/rygilles/laravel-openapi-schema-generator/blob/515eddcce4572de080539711f972bef84863d371/src/Rygilles/OpenApiGenerator/Generators/Generator.php#L495-L510 |
191,521 | rygilles/laravel-openapi-schema-generator | src/Rygilles/OpenApiGenerator/Generators/Generator.php | Generator.getDocBlockExtraParameterRefTags | protected function getDocBlockExtraParameterRefTags($docBlock)
{
$results = [];
$apiExtraParameterRefTags = $docBlock->getTagsByName('OpenApiExtraParameterRef');
foreach ($apiExtraParameterRefTags as $apiExtraParameterRefTag) {
$apiExtraParameterRef = trim(str_replace('@OpenApiExtraParameterRef', '', $... | php | protected function getDocBlockExtraParameterRefTags($docBlock)
{
$results = [];
$apiExtraParameterRefTags = $docBlock->getTagsByName('OpenApiExtraParameterRef');
foreach ($apiExtraParameterRefTags as $apiExtraParameterRefTag) {
$apiExtraParameterRef = trim(str_replace('@OpenApiExtraParameterRef', '', $... | [
"protected",
"function",
"getDocBlockExtraParameterRefTags",
"(",
"$",
"docBlock",
")",
"{",
"$",
"results",
"=",
"[",
"]",
";",
"$",
"apiExtraParameterRefTags",
"=",
"$",
"docBlock",
"->",
"getTagsByName",
"(",
"'OpenApiExtraParameterRef'",
")",
";",
"foreach",
"... | Return the OpenAPI Extra Parameter Ref Tags from a doc block.
@param DocBlock $docBlock
@return string[] | [
"Return",
"the",
"OpenAPI",
"Extra",
"Parameter",
"Ref",
"Tags",
"from",
"a",
"doc",
"block",
"."
] | 515eddcce4572de080539711f972bef84863d371 | https://github.com/rygilles/laravel-openapi-schema-generator/blob/515eddcce4572de080539711f972bef84863d371/src/Rygilles/OpenApiGenerator/Generators/Generator.php#L532-L543 |
191,522 | rygilles/laravel-openapi-schema-generator | src/Rygilles/OpenApiGenerator/Generators/Generator.php | Generator.getValidationRulesSchemaRequired | protected function getValidationRulesSchemaRequired($validationRules)
{
$required = [];
foreach ($validationRules as $propertyName => $rulesString) {
$propertyRules = explode('|', $rulesString);
// Parse property rules to get format/schema
foreach ($propertyRules as $rule) {
$explodedRule =... | php | protected function getValidationRulesSchemaRequired($validationRules)
{
$required = [];
foreach ($validationRules as $propertyName => $rulesString) {
$propertyRules = explode('|', $rulesString);
// Parse property rules to get format/schema
foreach ($propertyRules as $rule) {
$explodedRule =... | [
"protected",
"function",
"getValidationRulesSchemaRequired",
"(",
"$",
"validationRules",
")",
"{",
"$",
"required",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"validationRules",
"as",
"$",
"propertyName",
"=>",
"$",
"rulesString",
")",
"{",
"$",
"propertyRules",
... | Get schema required array from validation rules or null if no required fields
@param mixed[] $validationRules
@return string[]|null | [
"Get",
"schema",
"required",
"array",
"from",
"validation",
"rules",
"or",
"null",
"if",
"no",
"required",
"fields"
] | 515eddcce4572de080539711f972bef84863d371 | https://github.com/rygilles/laravel-openapi-schema-generator/blob/515eddcce4572de080539711f972bef84863d371/src/Rygilles/OpenApiGenerator/Generators/Generator.php#L551-L576 |
191,523 | rygilles/laravel-openapi-schema-generator | src/Rygilles/OpenApiGenerator/Generators/Generator.php | Generator.getPropertyValidationRulesSchema | protected function getPropertyValidationRulesSchema($propertyRules, $errorContext, $logCommandError = false)
{
$schema = new Schema();
// Parse property rules to get format/schema
foreach ($propertyRules as $rule) {
$explodedRule = explode(':', $rule);
$ruleName = $explodedRule[0];
if (count($e... | php | protected function getPropertyValidationRulesSchema($propertyRules, $errorContext, $logCommandError = false)
{
$schema = new Schema();
// Parse property rules to get format/schema
foreach ($propertyRules as $rule) {
$explodedRule = explode(':', $rule);
$ruleName = $explodedRule[0];
if (count($e... | [
"protected",
"function",
"getPropertyValidationRulesSchema",
"(",
"$",
"propertyRules",
",",
"$",
"errorContext",
",",
"$",
"logCommandError",
"=",
"false",
")",
"{",
"$",
"schema",
"=",
"new",
"Schema",
"(",
")",
";",
"// Parse property rules to get format/schema\r",... | Return a new schema based on validation rules for a property.
@param string[] $propertyRules Array of property rules
@param string $errorContext Information on context if an error occurs
@param boolean $logCommandError
@return Schema
@throws ErrorException | [
"Return",
"a",
"new",
"schema",
"based",
"on",
"validation",
"rules",
"for",
"a",
"property",
"."
] | 515eddcce4572de080539711f972bef84863d371 | https://github.com/rygilles/laravel-openapi-schema-generator/blob/515eddcce4572de080539711f972bef84863d371/src/Rygilles/OpenApiGenerator/Generators/Generator.php#L587-L702 |
191,524 | rygilles/laravel-openapi-schema-generator | src/Rygilles/OpenApiGenerator/Generators/Generator.php | Generator.getRoutePathParameters | protected function getRoutePathParameters($route)
{
$parameters = [];
$routeAction = $route->getAction();
list($class, $method) = explode('@', $routeAction['uses']);
$reflection = new ReflectionClass($class);
$reflectionMethod = $reflection->getMethod($method);
foreach ($reflectionMethod->getP... | php | protected function getRoutePathParameters($route)
{
$parameters = [];
$routeAction = $route->getAction();
list($class, $method) = explode('@', $routeAction['uses']);
$reflection = new ReflectionClass($class);
$reflectionMethod = $reflection->getMethod($method);
foreach ($reflectionMethod->getP... | [
"protected",
"function",
"getRoutePathParameters",
"(",
"$",
"route",
")",
"{",
"$",
"parameters",
"=",
"[",
"]",
";",
"$",
"routeAction",
"=",
"$",
"route",
"->",
"getAction",
"(",
")",
";",
"list",
"(",
"$",
"class",
",",
"$",
"method",
")",
"=",
"... | Try to get route method path parameters
@param \Illuminate\Routing\Route $route
@return mixed[] | [
"Try",
"to",
"get",
"route",
"method",
"path",
"parameters"
] | 515eddcce4572de080539711f972bef84863d371 | https://github.com/rygilles/laravel-openapi-schema-generator/blob/515eddcce4572de080539711f972bef84863d371/src/Rygilles/OpenApiGenerator/Generators/Generator.php#L710-L753 |
191,525 | rygilles/laravel-openapi-schema-generator | src/Rygilles/OpenApiGenerator/Generators/Generator.php | Generator.getRouteControllerDocBlock | protected function getRouteControllerDocBlock($route)
{
$routeAction = $route->getAction();
list($class, $method) = explode('@', $routeAction['uses']);
$reflectionClass = new ReflectionClass($class);
$comment = $reflectionClass->getDocComment();
if ($comment) {
return($this->docBlockFactory->... | php | protected function getRouteControllerDocBlock($route)
{
$routeAction = $route->getAction();
list($class, $method) = explode('@', $routeAction['uses']);
$reflectionClass = new ReflectionClass($class);
$comment = $reflectionClass->getDocComment();
if ($comment) {
return($this->docBlockFactory->... | [
"protected",
"function",
"getRouteControllerDocBlock",
"(",
"$",
"route",
")",
"{",
"$",
"routeAction",
"=",
"$",
"route",
"->",
"getAction",
"(",
")",
";",
"list",
"(",
"$",
"class",
",",
"$",
"method",
")",
"=",
"explode",
"(",
"'@'",
",",
"$",
"rout... | Return route controller class doc block if comments are provided else return null.
@param \Illuminate\Routing\Route $route
@return DocBlock|null | [
"Return",
"route",
"controller",
"class",
"doc",
"block",
"if",
"comments",
"are",
"provided",
"else",
"return",
"null",
"."
] | 515eddcce4572de080539711f972bef84863d371 | https://github.com/rygilles/laravel-openapi-schema-generator/blob/515eddcce4572de080539711f972bef84863d371/src/Rygilles/OpenApiGenerator/Generators/Generator.php#L824-L838 |
191,526 | rygilles/laravel-openapi-schema-generator | src/Rygilles/OpenApiGenerator/Generators/Generator.php | Generator.getRouteMethodDocBlock | protected function getRouteMethodDocBlock($route)
{
$routeAction = $route->getAction();
list($class, $method) = explode('@', $routeAction['uses']);
$reflectionClass = new ReflectionClass($class);
$reflectionMethod = $reflectionClass->getMethod($method);
$comment = $reflectionMethod->getDocComment()... | php | protected function getRouteMethodDocBlock($route)
{
$routeAction = $route->getAction();
list($class, $method) = explode('@', $routeAction['uses']);
$reflectionClass = new ReflectionClass($class);
$reflectionMethod = $reflectionClass->getMethod($method);
$comment = $reflectionMethod->getDocComment()... | [
"protected",
"function",
"getRouteMethodDocBlock",
"(",
"$",
"route",
")",
"{",
"$",
"routeAction",
"=",
"$",
"route",
"->",
"getAction",
"(",
")",
";",
"list",
"(",
"$",
"class",
",",
"$",
"method",
")",
"=",
"explode",
"(",
"'@'",
",",
"$",
"routeAct... | Return route method doc block if comments are provided else return null.
@param \Illuminate\Routing\Route $route
@return DocBlock|null | [
"Return",
"route",
"method",
"doc",
"block",
"if",
"comments",
"are",
"provided",
"else",
"return",
"null",
"."
] | 515eddcce4572de080539711f972bef84863d371 | https://github.com/rygilles/laravel-openapi-schema-generator/blob/515eddcce4572de080539711f972bef84863d371/src/Rygilles/OpenApiGenerator/Generators/Generator.php#L846-L861 |
191,527 | rygilles/laravel-openapi-schema-generator | src/Rygilles/OpenApiGenerator/Generators/Generator.php | Generator.getRouteCallExampleResponse | protected function getRouteCallExampleResponse($route, $method)
{
$url = $this->getRouteUrlWithBindings($route);
$response = $this->callRoute($method, $url, []);
if (is_null($response)) {
return null;
}
if (is_object($response)) {
$response = $response->content();
}
return $re... | php | protected function getRouteCallExampleResponse($route, $method)
{
$url = $this->getRouteUrlWithBindings($route);
$response = $this->callRoute($method, $url, []);
if (is_null($response)) {
return null;
}
if (is_object($response)) {
$response = $response->content();
}
return $re... | [
"protected",
"function",
"getRouteCallExampleResponse",
"(",
"$",
"route",
",",
"$",
"method",
")",
"{",
"$",
"url",
"=",
"$",
"this",
"->",
"getRouteUrlWithBindings",
"(",
"$",
"route",
")",
";",
"$",
"response",
"=",
"$",
"this",
"->",
"callRoute",
"(",
... | Call the specified route to get an example response
@param \Illuminate\Routing\Route $route
@param string $method
@return string | [
"Call",
"the",
"specified",
"route",
"to",
"get",
"an",
"example",
"response"
] | 515eddcce4572de080539711f972bef84863d371 | https://github.com/rygilles/laravel-openapi-schema-generator/blob/515eddcce4572de080539711f972bef84863d371/src/Rygilles/OpenApiGenerator/Generators/Generator.php#L870-L885 |
191,528 | rygilles/laravel-openapi-schema-generator | src/Rygilles/OpenApiGenerator/Generators/Generator.php | Generator.getRouteUrlWithBindings | protected function getRouteUrlWithBindings($route)
{
$urlRouteBindings = [];
$urlInjectedBindings = [];
$routeAction = $route->getAction();
if (isset($routeAction['as'])) {
if (isset($this->profile['api_calls_bindings'])) {
foreach ($this->profile['api_calls_bindings'] as $apiCallsBinding) {
... | php | protected function getRouteUrlWithBindings($route)
{
$urlRouteBindings = [];
$urlInjectedBindings = [];
$routeAction = $route->getAction();
if (isset($routeAction['as'])) {
if (isset($this->profile['api_calls_bindings'])) {
foreach ($this->profile['api_calls_bindings'] as $apiCallsBinding) {
... | [
"protected",
"function",
"getRouteUrlWithBindings",
"(",
"$",
"route",
")",
"{",
"$",
"urlRouteBindings",
"=",
"[",
"]",
";",
"$",
"urlInjectedBindings",
"=",
"[",
"]",
";",
"$",
"routeAction",
"=",
"$",
"route",
"->",
"getAction",
"(",
")",
";",
"if",
"... | Return the route url to call with bindings from configuration files.
@param $route
@return string | [
"Return",
"the",
"route",
"url",
"to",
"call",
"with",
"bindings",
"from",
"configuration",
"files",
"."
] | 515eddcce4572de080539711f972bef84863d371 | https://github.com/rygilles/laravel-openapi-schema-generator/blob/515eddcce4572de080539711f972bef84863d371/src/Rygilles/OpenApiGenerator/Generators/Generator.php#L893-L934 |
191,529 | pravednik/xmlBundle | Model/XmlEditor.php | XmlEditor.trimXmlString | public function trimXmlString($xmlString)
{
$xmlString = preg_replace('/[\r\n]+(?![^(]*\))/', '', $xmlString);
$xmlString = preg_replace('/[\s]{2,}/', ' ', $xmlString);
$xmlString = str_replace(["\r\n", "\n"], '', $xmlString);
return trim($xmlString);
} | php | public function trimXmlString($xmlString)
{
$xmlString = preg_replace('/[\r\n]+(?![^(]*\))/', '', $xmlString);
$xmlString = preg_replace('/[\s]{2,}/', ' ', $xmlString);
$xmlString = str_replace(["\r\n", "\n"], '', $xmlString);
return trim($xmlString);
} | [
"public",
"function",
"trimXmlString",
"(",
"$",
"xmlString",
")",
"{",
"$",
"xmlString",
"=",
"preg_replace",
"(",
"'/[\\r\\n]+(?![^(]*\\))/'",
",",
"''",
",",
"$",
"xmlString",
")",
";",
"$",
"xmlString",
"=",
"preg_replace",
"(",
"'/[\\s]{2,}/'",
",",
"' '"... | Removing all spaces and line breaks
@param string $xmlString XML
@return string | [
"Removing",
"all",
"spaces",
"and",
"line",
"breaks"
] | fa3a0852097209eb6840ef01224b4ddb004790b5 | https://github.com/pravednik/xmlBundle/blob/fa3a0852097209eb6840ef01224b4ddb004790b5/Model/XmlEditor.php#L30-L37 |
191,530 | pravednik/xmlBundle | Model/XmlEditor.php | XmlEditor.formatXmlString | public function formatXmlString($xmlString)
{
if(true === $this->isXml($xmlString))
{
$dom = new \DOMDocument;
$dom->preserveWhiteSpace = false;
$dom->loadXML($xmlString);
$dom->formatOutput = true;
return $dom->saveXml();
}
... | php | public function formatXmlString($xmlString)
{
if(true === $this->isXml($xmlString))
{
$dom = new \DOMDocument;
$dom->preserveWhiteSpace = false;
$dom->loadXML($xmlString);
$dom->formatOutput = true;
return $dom->saveXml();
}
... | [
"public",
"function",
"formatXmlString",
"(",
"$",
"xmlString",
")",
"{",
"if",
"(",
"true",
"===",
"$",
"this",
"->",
"isXml",
"(",
"$",
"xmlString",
")",
")",
"{",
"$",
"dom",
"=",
"new",
"\\",
"DOMDocument",
";",
"$",
"dom",
"->",
"preserveWhiteSpac... | Pretty print for XML
@param string $xmlString XML
@return string
@throws InvalidArgumentException | [
"Pretty",
"print",
"for",
"XML"
] | fa3a0852097209eb6840ef01224b4ddb004790b5 | https://github.com/pravednik/xmlBundle/blob/fa3a0852097209eb6840ef01224b4ddb004790b5/Model/XmlEditor.php#L48-L63 |
191,531 | nimmneun/onesheet | src/OneSheet/CellBuilder.php | CellBuilder.build | public function build($rowNumber, $cellNumber, $cellValue, $styleId = 0)
{
$cellId = $this->getCellId($cellNumber, $rowNumber);
if (is_int($cellValue) || is_float($cellValue)) {
return sprintf(CellXml::NUMBER_XML, $cellId, $styleId, $cellValue);
} elseif (is_bool($cellValue)) {
... | php | public function build($rowNumber, $cellNumber, $cellValue, $styleId = 0)
{
$cellId = $this->getCellId($cellNumber, $rowNumber);
if (is_int($cellValue) || is_float($cellValue)) {
return sprintf(CellXml::NUMBER_XML, $cellId, $styleId, $cellValue);
} elseif (is_bool($cellValue)) {
... | [
"public",
"function",
"build",
"(",
"$",
"rowNumber",
",",
"$",
"cellNumber",
",",
"$",
"cellValue",
",",
"$",
"styleId",
"=",
"0",
")",
"{",
"$",
"cellId",
"=",
"$",
"this",
"->",
"getCellId",
"(",
"$",
"cellNumber",
",",
"$",
"rowNumber",
")",
";",... | Build and return the string for a single cell.
@param int $rowNumber
@param int $cellNumber
@param mixed $cellValue
@param int $styleId
@return string | [
"Build",
"and",
"return",
"the",
"string",
"for",
"a",
"single",
"cell",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/CellBuilder.php#L60-L73 |
191,532 | nimmneun/onesheet | src/OneSheet/Finalizer.php | Finalizer.finalize | public function finalize($output)
{
$zipFileUrl = sys_get_temp_dir() . '/' . uniqid();
$this->fillZipWithFileContents($zipFileUrl);
if (!$this->zip->close()) {
throw new \RuntimeException('Failed to close zip file!');
}
$this->copyToOutputAndCleanup($output, $zi... | php | public function finalize($output)
{
$zipFileUrl = sys_get_temp_dir() . '/' . uniqid();
$this->fillZipWithFileContents($zipFileUrl);
if (!$this->zip->close()) {
throw new \RuntimeException('Failed to close zip file!');
}
$this->copyToOutputAndCleanup($output, $zi... | [
"public",
"function",
"finalize",
"(",
"$",
"output",
")",
"{",
"$",
"zipFileUrl",
"=",
"sys_get_temp_dir",
"(",
")",
".",
"'/'",
".",
"uniqid",
"(",
")",
";",
"$",
"this",
"->",
"fillZipWithFileContents",
"(",
"$",
"zipFileUrl",
")",
";",
"if",
"(",
"... | Finalize the xlsx file.
@param resource $output | [
"Finalize",
"the",
"xlsx",
"file",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Finalizer.php#L51-L61 |
191,533 | nimmneun/onesheet | src/OneSheet/Finalizer.php | Finalizer.fillZipWithFileContents | private function fillZipWithFileContents($zipFileUrl)
{
$this->zip->open($zipFileUrl, \ZipArchive::CREATE);
$this->finalizeSheet();
$this->finalizeStyles();
$this->finalizeDefaultXmls();
} | php | private function fillZipWithFileContents($zipFileUrl)
{
$this->zip->open($zipFileUrl, \ZipArchive::CREATE);
$this->finalizeSheet();
$this->finalizeStyles();
$this->finalizeDefaultXmls();
} | [
"private",
"function",
"fillZipWithFileContents",
"(",
"$",
"zipFileUrl",
")",
"{",
"$",
"this",
"->",
"zip",
"->",
"open",
"(",
"$",
"zipFileUrl",
",",
"\\",
"ZipArchive",
"::",
"CREATE",
")",
";",
"$",
"this",
"->",
"finalizeSheet",
"(",
")",
";",
"$",... | Add all file and string contents to zip file.
@param string $zipFileUrl | [
"Add",
"all",
"file",
"and",
"string",
"contents",
"to",
"zip",
"file",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Finalizer.php#L68-L74 |
191,534 | nimmneun/onesheet | src/OneSheet/Finalizer.php | Finalizer.finalizeDefaultXmls | private function finalizeDefaultXmls()
{
$this->zip->addFromString('[Content_Types].xml', DefaultXml::CONTENT_TYPES);
$this->zip->addFromString('docProps/core.xml',
sprintf(DefaultXml::DOCPROPS_CORE, date(DATE_ISO8601), date(DATE_ISO8601)));
$this->zip->addFromString('docProps/ap... | php | private function finalizeDefaultXmls()
{
$this->zip->addFromString('[Content_Types].xml', DefaultXml::CONTENT_TYPES);
$this->zip->addFromString('docProps/core.xml',
sprintf(DefaultXml::DOCPROPS_CORE, date(DATE_ISO8601), date(DATE_ISO8601)));
$this->zip->addFromString('docProps/ap... | [
"private",
"function",
"finalizeDefaultXmls",
"(",
")",
"{",
"$",
"this",
"->",
"zip",
"->",
"addFromString",
"(",
"'[Content_Types].xml'",
",",
"DefaultXml",
"::",
"CONTENT_TYPES",
")",
";",
"$",
"this",
"->",
"zip",
"->",
"addFromString",
"(",
"'docProps/core.... | Add default xmls to zip archive. | [
"Add",
"default",
"xmls",
"to",
"zip",
"archive",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Finalizer.php#L101-L110 |
191,535 | gushphp/gush | src/Adapter/DefaultConfigurator.php | DefaultConfigurator.validateUrl | public function validateUrl($url)
{
if (empty($url)) {
throw new \InvalidArgumentException('The field cannot be empty.');
}
if (!filter_var($url, FILTER_VALIDATE_URL)) {
throw new \InvalidArgumentException('The field requires a valid URL.');
}
return... | php | public function validateUrl($url)
{
if (empty($url)) {
throw new \InvalidArgumentException('The field cannot be empty.');
}
if (!filter_var($url, FILTER_VALIDATE_URL)) {
throw new \InvalidArgumentException('The field requires a valid URL.');
}
return... | [
"public",
"function",
"validateUrl",
"(",
"$",
"url",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"url",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'The field cannot be empty.'",
")",
";",
"}",
"if",
"(",
"!",
"filter_var",
"(",
"... | Validates if the value is none-empty and a valid URL.
@param string $url
@throws \InvalidArgumentException
@return string | [
"Validates",
"if",
"the",
"value",
"is",
"none",
"-",
"empty",
"and",
"a",
"valid",
"URL",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Adapter/DefaultConfigurator.php#L167-L178 |
191,536 | letrunghieu/favicon | src/Config.php | Config.getSizes | public static function getSizes($noOldApple = false, $noAndroid = false, $noMs = false)
{
$result = array_merge(self::$_sizes, array());
if ($noOldApple)
{
unset($result['apple-touch-icon-57x57.png']);
unset($result['apple-touch-icon-60x60.png']);
u... | php | public static function getSizes($noOldApple = false, $noAndroid = false, $noMs = false)
{
$result = array_merge(self::$_sizes, array());
if ($noOldApple)
{
unset($result['apple-touch-icon-57x57.png']);
unset($result['apple-touch-icon-60x60.png']);
u... | [
"public",
"static",
"function",
"getSizes",
"(",
"$",
"noOldApple",
"=",
"false",
",",
"$",
"noAndroid",
"=",
"false",
",",
"$",
"noMs",
"=",
"false",
")",
"{",
"$",
"result",
"=",
"array_merge",
"(",
"self",
"::",
"$",
"_sizes",
",",
"array",
"(",
"... | Return sizes from options
@param bool $noOldApple exclude old Apple touch image sizes
@param bool $noAndroid exclude manifest.json file and images for Androids
@param bool $noMs exclude images for Windows and IE11
@return array | [
"Return",
"sizes",
"from",
"options"
] | 79785e47e956d0baea1b5ac6e306a553e91dac0e | https://github.com/letrunghieu/favicon/blob/79785e47e956d0baea1b5ac6e306a553e91dac0e/src/Config.php#L82-L109 |
191,537 | letrunghieu/favicon | src/Config.php | Config.getTileSettings | public static function getTileSettings($name)
{
if (!isset(self::$_tileSettings[$name]))
{
throw new \RuntimeException('Invalid image name');
}
return self::$_tileSettings[$name];
} | php | public static function getTileSettings($name)
{
if (!isset(self::$_tileSettings[$name]))
{
throw new \RuntimeException('Invalid image name');
}
return self::$_tileSettings[$name];
} | [
"public",
"static",
"function",
"getTileSettings",
"(",
"$",
"name",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"self",
"::",
"$",
"_tileSettings",
"[",
"$",
"name",
"]",
")",
")",
"{",
"throw",
"new",
"\\",
"RuntimeException",
"(",
"'Invalid image name'",
... | Get the settings for Windows tile image size
@param type $name
@return array
@throws \RuntimeException | [
"Get",
"the",
"settings",
"for",
"Windows",
"tile",
"image",
"size"
] | 79785e47e956d0baea1b5ac6e306a553e91dac0e | https://github.com/letrunghieu/favicon/blob/79785e47e956d0baea1b5ac6e306a553e91dac0e/src/Config.php#L118-L125 |
191,538 | gushphp/gush | src/Helper/GitHelper.php | GitHelper.isGitDir | public function isGitDir($requireRoot = true)
{
$directory = $this->getGitDir();
if ('' === $directory) {
return false;
}
if ($requireRoot && str_replace('\\', '/', getcwd()) !== $directory) {
return false;
}
return true;
} | php | public function isGitDir($requireRoot = true)
{
$directory = $this->getGitDir();
if ('' === $directory) {
return false;
}
if ($requireRoot && str_replace('\\', '/', getcwd()) !== $directory) {
return false;
}
return true;
} | [
"public",
"function",
"isGitDir",
"(",
"$",
"requireRoot",
"=",
"true",
")",
"{",
"$",
"directory",
"=",
"$",
"this",
"->",
"getGitDir",
"(",
")",
";",
"if",
"(",
"''",
"===",
"$",
"directory",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"$",... | Returns whether the current working dir is a Git directory.
@param bool $requireRoot Require directory is the root of the Git repository,
default is true.
@return bool | [
"Returns",
"whether",
"the",
"current",
"working",
"dir",
"is",
"a",
"Git",
"directory",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/GitHelper.php#L141-L154 |
191,539 | gushphp/gush | src/Helper/GitHelper.php | GitHelper.stashBranchName | public function stashBranchName()
{
$activeBranch = $this->getActiveBranchName('HEAD');
if (null === $this->stashedBranch && 'HEAD' !== $activeBranch) {
$this->stashedBranch = $activeBranch;
}
} | php | public function stashBranchName()
{
$activeBranch = $this->getActiveBranchName('HEAD');
if (null === $this->stashedBranch && 'HEAD' !== $activeBranch) {
$this->stashedBranch = $activeBranch;
}
} | [
"public",
"function",
"stashBranchName",
"(",
")",
"{",
"$",
"activeBranch",
"=",
"$",
"this",
"->",
"getActiveBranchName",
"(",
"'HEAD'",
")",
";",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"stashedBranch",
"&&",
"'HEAD'",
"!==",
"$",
"activeBranch",
"... | Stashes the active branch-name.
This will only stash the branch-name when no other branch was active
already. | [
"Stashes",
"the",
"active",
"branch",
"-",
"name",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/GitHelper.php#L693-L700 |
191,540 | gushphp/gush | src/ConfigFactory.php | ConfigFactory.getHomedir | public static function getHomedir()
{
$home = (string) getenv('GUSH_HOME');
if ('' === $home) {
// Try APPDATA first, HOME on Windows is only defined in the Git terminal
// but when you run Gush using cmd it will not able to find the config-dir
if (getenv('APPDAT... | php | public static function getHomedir()
{
$home = (string) getenv('GUSH_HOME');
if ('' === $home) {
// Try APPDATA first, HOME on Windows is only defined in the Git terminal
// but when you run Gush using cmd it will not able to find the config-dir
if (getenv('APPDAT... | [
"public",
"static",
"function",
"getHomedir",
"(",
")",
"{",
"$",
"home",
"=",
"(",
"string",
")",
"getenv",
"(",
"'GUSH_HOME'",
")",
";",
"if",
"(",
"''",
"===",
"$",
"home",
")",
"{",
"// Try APPDATA first, HOME on Windows is only defined in the Git terminal",
... | Get the home directory of Gush.
This checks multiple environment variables:
* GUSH_HOME
* APPDATA (used by Windows)
* HOME
@throws \RuntimeException when no environment variable was found
@throws IOException the missing home-directory cannot be created
@return string | [
"Get",
"the",
"home",
"directory",
"of",
"Gush",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/ConfigFactory.php#L39-L68 |
191,541 | gushphp/gush | src/ConfigFactory.php | ConfigFactory.createConfig | public static function createConfig($home = null, $localHome = null)
{
if (null === $home) {
$home = static::getHomedir();
}
$localConfig = [];
$systemConfig = self::loadFileOrEmpty($home.'/.gush.yml');
if (null !== $localHome) {
$localConfig = self... | php | public static function createConfig($home = null, $localHome = null)
{
if (null === $home) {
$home = static::getHomedir();
}
$localConfig = [];
$systemConfig = self::loadFileOrEmpty($home.'/.gush.yml');
if (null !== $localHome) {
$localConfig = self... | [
"public",
"static",
"function",
"createConfig",
"(",
"$",
"home",
"=",
"null",
",",
"$",
"localHome",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"home",
")",
"{",
"$",
"home",
"=",
"static",
"::",
"getHomedir",
"(",
")",
";",
"}",
"$",
... | Create a new Config object using the local filesystem.
Note that any missing config file is ignored.
When the home directory doesn't exist it's created.
@param string|null $localHome Local home directory to load extra configuration from
when null this is ignored
@return Config | [
"Create",
"a",
"new",
"Config",
"object",
"using",
"the",
"local",
"filesystem",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/ConfigFactory.php#L82-L97 |
191,542 | gushphp/gush | src/ConfigFactory.php | ConfigFactory.dumpToFile | public static function dumpToFile(Config $config, $type)
{
if ($type === Config::CONFIG_LOCAL) {
$filename = $config->get('local_config');
if (null === $filename) {
throw new \RuntimeException('Local configuration is not loaded and therefore it cannot be dumped.');
... | php | public static function dumpToFile(Config $config, $type)
{
if ($type === Config::CONFIG_LOCAL) {
$filename = $config->get('local_config');
if (null === $filename) {
throw new \RuntimeException('Local configuration is not loaded and therefore it cannot be dumped.');
... | [
"public",
"static",
"function",
"dumpToFile",
"(",
"Config",
"$",
"config",
",",
"$",
"type",
")",
"{",
"if",
"(",
"$",
"type",
"===",
"Config",
"::",
"CONFIG_LOCAL",
")",
"{",
"$",
"filename",
"=",
"$",
"config",
"->",
"get",
"(",
"'local_config'",
")... | Dump configuration to the related config-file.
The config-file is automatically determined using
type.
@param Config $config
@param string $type
@return string | [
"Dump",
"configuration",
"to",
"the",
"related",
"config",
"-",
"file",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/ConfigFactory.php#L110-L141 |
191,543 | gushphp/gush | src/Helper/StyleHelper.php | StyleHelper.numberedChoice | public function numberedChoice($question, array $choices, $default = null)
{
$labelKey = [];
$labels = [];
foreach ($choices as $key => $label) {
$labelKey[$label] = $key;
$labels[] = $label;
}
if (null !== $default) {
$values = array_fli... | php | public function numberedChoice($question, array $choices, $default = null)
{
$labelKey = [];
$labels = [];
foreach ($choices as $key => $label) {
$labelKey[$label] = $key;
$labels[] = $label;
}
if (null !== $default) {
$values = array_fli... | [
"public",
"function",
"numberedChoice",
"(",
"$",
"question",
",",
"array",
"$",
"choices",
",",
"$",
"default",
"=",
"null",
")",
"{",
"$",
"labelKey",
"=",
"[",
"]",
";",
"$",
"labels",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"choices",
"as",
"$... | NumberedChoice works the same as a normal choice but
prompts for a numbered list of options.
$choices:
* key0: Label1
* key1: Label2
* key2: Label3
Shows:
* [0]: Label1
* [1]: Label2
* [2]: Label3
When option 0 is selected key0 is returned (instead of Label1).
@param string $question
@param array ... | [
"NumberedChoice",
"works",
"the",
"same",
"as",
"a",
"normal",
"choice",
"but",
"prompts",
"for",
"a",
"numbered",
"list",
"of",
"options",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/StyleHelper.php#L345-L361 |
191,544 | gushphp/gush | src/Helper/MetaHelper.php | MetaHelper.updateContent | public function updateContent(Meta $meta, $header, $fileContent)
{
if (!$this->isUpdatable($meta, $fileContent)) {
return $fileContent;
}
$startContent = '';
$fileContent = ltrim($fileContent);
if (null !== $meta->getStartTokenRegex()) {
// When no s... | php | public function updateContent(Meta $meta, $header, $fileContent)
{
if (!$this->isUpdatable($meta, $fileContent)) {
return $fileContent;
}
$startContent = '';
$fileContent = ltrim($fileContent);
if (null !== $meta->getStartTokenRegex()) {
// When no s... | [
"public",
"function",
"updateContent",
"(",
"Meta",
"$",
"meta",
",",
"$",
"header",
",",
"$",
"fileContent",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isUpdatable",
"(",
"$",
"meta",
",",
"$",
"fileContent",
")",
")",
"{",
"return",
"$",
"fileCo... | Update the content with the header.
Note. We only support comments in the beginning of the file.
If there is already a comment its replaced, if its missing its added.
@param Meta $meta
@param string $header
@param string $fileContent
@return string | [
"Update",
"the",
"content",
"with",
"the",
"header",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/MetaHelper.php#L146-L185 |
191,545 | gushphp/gush | src/Config.php | Config.get | public function get($keys, $type = self::CONFIG_ALL, $default = null)
{
$this->guardConfigSlot($type);
$keys = (array) $keys;
if (count($keys) === 1) {
return array_key_exists($keys[0], $this->config[$type]) ? $this->config[$type][$keys[0]] : $default;
}
$curre... | php | public function get($keys, $type = self::CONFIG_ALL, $default = null)
{
$this->guardConfigSlot($type);
$keys = (array) $keys;
if (count($keys) === 1) {
return array_key_exists($keys[0], $this->config[$type]) ? $this->config[$type][$keys[0]] : $default;
}
$curre... | [
"public",
"function",
"get",
"(",
"$",
"keys",
",",
"$",
"type",
"=",
"self",
"::",
"CONFIG_ALL",
",",
"$",
"default",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"guardConfigSlot",
"(",
"$",
"type",
")",
";",
"$",
"keys",
"=",
"(",
"array",
")",
"... | Returns a config value.
@param string|string[] $keys Single level key like 'adapters' or array-path
like ['adapters', 'github']
@param string $type Either Config::CONFIG_SYSTEM Config::CONFIG_LOCAL
or Config::CONFIG_ALL
@param string|int|float|bool|array $default Default value to... | [
"Returns",
"a",
"config",
"value",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Config.php#L174-L195 |
191,546 | gushphp/gush | src/Config.php | Config.getFirstNotNull | public function getFirstNotNull(array $keys, $type = self::CONFIG_ALL, $default = null)
{
foreach ($keys as $key) {
$value = $this->get($key, $type);
if (null !== $value) {
return $value;
}
}
return $default;
} | php | public function getFirstNotNull(array $keys, $type = self::CONFIG_ALL, $default = null)
{
foreach ($keys as $key) {
$value = $this->get($key, $type);
if (null !== $value) {
return $value;
}
}
return $default;
} | [
"public",
"function",
"getFirstNotNull",
"(",
"array",
"$",
"keys",
",",
"$",
"type",
"=",
"self",
"::",
"CONFIG_ALL",
",",
"$",
"default",
"=",
"null",
")",
"{",
"foreach",
"(",
"$",
"keys",
"as",
"$",
"key",
")",
"{",
"$",
"value",
"=",
"$",
"thi... | Returns the first none-null configuration value.
@param string[] $keys Array of single level keys like "adapters" or property-path
"[adapters][github]" to check
@param string $type Either Config::CONFIG_SYSTEM Config::CONFIG_LOCAL
or Config::CONFIG_ALL
@param string|int|fl... | [
"Returns",
"the",
"first",
"none",
"-",
"null",
"configuration",
"value",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Config.php#L208-L219 |
191,547 | gushphp/gush | src/Config.php | Config.toArray | public function toArray($type = self::CONFIG_ALL)
{
$this->guardConfigSlot($type);
return $this->config[$type];
} | php | public function toArray($type = self::CONFIG_ALL)
{
$this->guardConfigSlot($type);
return $this->config[$type];
} | [
"public",
"function",
"toArray",
"(",
"$",
"type",
"=",
"self",
"::",
"CONFIG_ALL",
")",
"{",
"$",
"this",
"->",
"guardConfigSlot",
"(",
"$",
"type",
")",
";",
"return",
"$",
"this",
"->",
"config",
"[",
"$",
"type",
"]",
";",
"}"
] | Get the configuration is as array.
@param string $type Either Config::CONFIG_SYSTEM Config::CONFIG_LOCAL
or Config::CONFIG_ALL
@return array | [
"Get",
"the",
"configuration",
"is",
"as",
"array",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Config.php#L229-L234 |
191,548 | gushphp/gush | src/Config.php | Config.has | public function has($key, $type = self::CONFIG_ALL)
{
return null !== $this->get($key, $type);
} | php | public function has($key, $type = self::CONFIG_ALL)
{
return null !== $this->get($key, $type);
} | [
"public",
"function",
"has",
"(",
"$",
"key",
",",
"$",
"type",
"=",
"self",
"::",
"CONFIG_ALL",
")",
"{",
"return",
"null",
"!==",
"$",
"this",
"->",
"get",
"(",
"$",
"key",
",",
"$",
"type",
")",
";",
"}"
] | Checks whether the config exists.
Note. A value with null is considered undefined.
@param string $key Single level key like "adapters" or property-path
"[adapters][github]"
@param string $type Either Config::CONFIG_SYSTEM Config::CONFIG_LOCAL
or Config::CONFIG_ALL
@return bool | [
"Checks",
"whether",
"the",
"config",
"exists",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Config.php#L248-L251 |
191,549 | lexik/LexikCurrencyBundle | Twig/Extension/CurrencyExtension.php | CurrencyExtension.format | public function format($value, $valueCurrency = null, $decimal = true, $symbol = true)
{
if (null === $valueCurrency) {
$valueCurrency = $this->getConverter()->getDefaultCurrency();
}
return $this->getFormatter()->format($value, $valueCurrency, $decimal, $symbol);
} | php | public function format($value, $valueCurrency = null, $decimal = true, $symbol = true)
{
if (null === $valueCurrency) {
$valueCurrency = $this->getConverter()->getDefaultCurrency();
}
return $this->getFormatter()->format($value, $valueCurrency, $decimal, $symbol);
} | [
"public",
"function",
"format",
"(",
"$",
"value",
",",
"$",
"valueCurrency",
"=",
"null",
",",
"$",
"decimal",
"=",
"true",
",",
"$",
"symbol",
"=",
"true",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"valueCurrency",
")",
"{",
"$",
"valueCurrency",
"=... | Format the given value.
@param mixed $value
@param string $valueCurrency $value currency code
@param boolean $decimal show decimal part
@param boolean $symbol show currency symbol
@return string | [
"Format",
"the",
"given",
"value",
"."
] | 1209600926b65a8f07f72eb90c9ac93360e5ba8c | https://github.com/lexik/LexikCurrencyBundle/blob/1209600926b65a8f07f72eb90c9ac93360e5ba8c/Twig/Extension/CurrencyExtension.php#L81-L88 |
191,550 | lexik/LexikCurrencyBundle | Twig/Extension/CurrencyExtension.php | CurrencyExtension.convertAndFormat | public function convertAndFormat($value, $targetCurrency, $decimal = true, $symbol = true, $valueCurrency = null)
{
$value = $this->convert($value, $targetCurrency, $decimal, $valueCurrency);
return $this->format($value, $targetCurrency, $decimal, $symbol);
} | php | public function convertAndFormat($value, $targetCurrency, $decimal = true, $symbol = true, $valueCurrency = null)
{
$value = $this->convert($value, $targetCurrency, $decimal, $valueCurrency);
return $this->format($value, $targetCurrency, $decimal, $symbol);
} | [
"public",
"function",
"convertAndFormat",
"(",
"$",
"value",
",",
"$",
"targetCurrency",
",",
"$",
"decimal",
"=",
"true",
",",
"$",
"symbol",
"=",
"true",
",",
"$",
"valueCurrency",
"=",
"null",
")",
"{",
"$",
"value",
"=",
"$",
"this",
"->",
"convert... | Convert and format the given value.
@param mixed $value
@param string $targetCurrency target currency code
@param boolean $decimal show decimal part
@param boolean $symbol show currency symbol
@param string $valueCurrency the $value currency code
@return string | [
"Convert",
"and",
"format",
"the",
"given",
"value",
"."
] | 1209600926b65a8f07f72eb90c9ac93360e5ba8c | https://github.com/lexik/LexikCurrencyBundle/blob/1209600926b65a8f07f72eb90c9ac93360e5ba8c/Twig/Extension/CurrencyExtension.php#L100-L105 |
191,551 | lexik/LexikCurrencyBundle | Adapter/AdapterFactory.php | AdapterFactory.create | public function create($adapterClass)
{
$adapter = new $adapterClass();
$adapter->setDefaultCurrency($this->currencies['default']);
$adapter->setManagedCurrencies($this->currencies['managed']);
$adapter->setCurrencyClass($this->currencyClass);
return $adapter;
} | php | public function create($adapterClass)
{
$adapter = new $adapterClass();
$adapter->setDefaultCurrency($this->currencies['default']);
$adapter->setManagedCurrencies($this->currencies['managed']);
$adapter->setCurrencyClass($this->currencyClass);
return $adapter;
} | [
"public",
"function",
"create",
"(",
"$",
"adapterClass",
")",
"{",
"$",
"adapter",
"=",
"new",
"$",
"adapterClass",
"(",
")",
";",
"$",
"adapter",
"->",
"setDefaultCurrency",
"(",
"$",
"this",
"->",
"currencies",
"[",
"'default'",
"]",
")",
";",
"$",
... | Create an adaper from the given class.
@param string $adapterClass
@return Lexik\Bundle\CurrencyBundle\Adapter\AbstractCurrencyAdapter | [
"Create",
"an",
"adaper",
"from",
"the",
"given",
"class",
"."
] | 1209600926b65a8f07f72eb90c9ac93360e5ba8c | https://github.com/lexik/LexikCurrencyBundle/blob/1209600926b65a8f07f72eb90c9ac93360e5ba8c/Adapter/AdapterFactory.php#L52-L60 |
191,552 | lexik/LexikCurrencyBundle | Adapter/AdapterFactory.php | AdapterFactory.createDoctrineAdapter | public function createDoctrineAdapter($adapterClass = null, $entityManagerName = null)
{
if (null == $adapterClass) {
$adapterClass = 'Lexik\Bundle\CurrencyBundle\Adapter\DoctrineCurrencyAdapter';
}
$adapter = $this->create($adapterClass);
$em = $this->doctrine->getManag... | php | public function createDoctrineAdapter($adapterClass = null, $entityManagerName = null)
{
if (null == $adapterClass) {
$adapterClass = 'Lexik\Bundle\CurrencyBundle\Adapter\DoctrineCurrencyAdapter';
}
$adapter = $this->create($adapterClass);
$em = $this->doctrine->getManag... | [
"public",
"function",
"createDoctrineAdapter",
"(",
"$",
"adapterClass",
"=",
"null",
",",
"$",
"entityManagerName",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"==",
"$",
"adapterClass",
")",
"{",
"$",
"adapterClass",
"=",
"'Lexik\\Bundle\\CurrencyBundle\\Adapter\\... | Create a DoctrineCurrencyAdapter.
@return Lexik\Bundle\CurrencyBundle\Adapter\DoctrineCurrencyAdapter | [
"Create",
"a",
"DoctrineCurrencyAdapter",
"."
] | 1209600926b65a8f07f72eb90c9ac93360e5ba8c | https://github.com/lexik/LexikCurrencyBundle/blob/1209600926b65a8f07f72eb90c9ac93360e5ba8c/Adapter/AdapterFactory.php#L67-L78 |
191,553 | nimmneun/onesheet | src/OneSheet/Style/Styler.php | Styler.addStyle | public function addStyle(Style $style)
{
if (null === $style->getId()) {
$this->register($style->getFont(), $this->fonts);
$this->register($style->getFill(), $this->fills);
$this->register($style->getBorder(), $this->borders);
$this->register($style, $this->st... | php | public function addStyle(Style $style)
{
if (null === $style->getId()) {
$this->register($style->getFont(), $this->fonts);
$this->register($style->getFill(), $this->fills);
$this->register($style->getBorder(), $this->borders);
$this->register($style, $this->st... | [
"public",
"function",
"addStyle",
"(",
"Style",
"$",
"style",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"style",
"->",
"getId",
"(",
")",
")",
"{",
"$",
"this",
"->",
"register",
"(",
"$",
"style",
"->",
"getFont",
"(",
")",
",",
"$",
"this",
"->"... | Add a new style, if it doesnt exists yet.
@param Style $style | [
"Add",
"a",
"new",
"style",
"if",
"it",
"doesnt",
"exists",
"yet",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Style/Styler.php#L62-L71 |
191,554 | nimmneun/onesheet | src/OneSheet/Style/Styler.php | Styler.getStyleSheetXml | public function getStyleSheetXml()
{
$fontsXml = $this->getComponentXml($this->fonts);
$fillsXml = $this->getComponentXml($this->fills);
$bordersXml = $this->getComponentXml($this->borders);
$cellXfsXml = $this->getComponentXml($this->styles);
return sprintf(StyleXml::STYLE_... | php | public function getStyleSheetXml()
{
$fontsXml = $this->getComponentXml($this->fonts);
$fillsXml = $this->getComponentXml($this->fills);
$bordersXml = $this->getComponentXml($this->borders);
$cellXfsXml = $this->getComponentXml($this->styles);
return sprintf(StyleXml::STYLE_... | [
"public",
"function",
"getStyleSheetXml",
"(",
")",
"{",
"$",
"fontsXml",
"=",
"$",
"this",
"->",
"getComponentXml",
"(",
"$",
"this",
"->",
"fonts",
")",
";",
"$",
"fillsXml",
"=",
"$",
"this",
"->",
"getComponentXml",
"(",
"$",
"this",
"->",
"fills",
... | Return entire xml string for the style sheet.
@return string | [
"Return",
"entire",
"xml",
"string",
"for",
"the",
"style",
"sheet",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Style/Styler.php#L108-L121 |
191,555 | nimmneun/onesheet | src/OneSheet/Style/Styler.php | Styler.getComponentXml | private function getComponentXml(array $components)
{
$componentXml = '';
foreach ($components as $component) {
$componentXml .= $component->asXml();
}
return $componentXml;
} | php | private function getComponentXml(array $components)
{
$componentXml = '';
foreach ($components as $component) {
$componentXml .= $component->asXml();
}
return $componentXml;
} | [
"private",
"function",
"getComponentXml",
"(",
"array",
"$",
"components",
")",
"{",
"$",
"componentXml",
"=",
"''",
";",
"foreach",
"(",
"$",
"components",
"as",
"$",
"component",
")",
"{",
"$",
"componentXml",
".=",
"$",
"component",
"->",
"asXml",
"(",
... | Return fonts, fills, borders, xfs xml strings.
@param Component[] $components
@return string | [
"Return",
"fonts",
"fills",
"borders",
"xfs",
"xml",
"strings",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Style/Styler.php#L129-L136 |
191,556 | lexik/LexikCurrencyBundle | Adapter/AbstractCurrencyAdapter.php | AbstractCurrencyAdapter.append | public function append($value)
{
if (!$value instanceof $this->currencyClass) {
throw new \InvalidArgumentException(sprintf('$newval must be an instance of Currency, instance of "%s" given', get_class($value)));
}
parent::append($value);
} | php | public function append($value)
{
if (!$value instanceof $this->currencyClass) {
throw new \InvalidArgumentException(sprintf('$newval must be an instance of Currency, instance of "%s" given', get_class($value)));
}
parent::append($value);
} | [
"public",
"function",
"append",
"(",
"$",
"value",
")",
"{",
"if",
"(",
"!",
"$",
"value",
"instanceof",
"$",
"this",
"->",
"currencyClass",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"sprintf",
"(",
"'$newval must be an instance of Currenc... | Append a value
@param Currency $value | [
"Append",
"a",
"value"
] | 1209600926b65a8f07f72eb90c9ac93360e5ba8c | https://github.com/lexik/LexikCurrencyBundle/blob/1209600926b65a8f07f72eb90c9ac93360e5ba8c/Adapter/AbstractCurrencyAdapter.php#L97-L104 |
191,557 | okamos/php-ses | src/ses.php | SimpleEmailService.listIdentities | public function listIdentities($identity_type = '')
{
$this->_action = 'ListIdentities';
$this->_method = 'GET';
$this->_refreshDate();
if (!preg_match('/^(EmailAddress|Domain|)$/', $identity_type)) {
throw new Exception('IdentityType must be EmailAddress or Domain');
... | php | public function listIdentities($identity_type = '')
{
$this->_action = 'ListIdentities';
$this->_method = 'GET';
$this->_refreshDate();
if (!preg_match('/^(EmailAddress|Domain|)$/', $identity_type)) {
throw new Exception('IdentityType must be EmailAddress or Domain');
... | [
"public",
"function",
"listIdentities",
"(",
"$",
"identity_type",
"=",
"''",
")",
"{",
"$",
"this",
"->",
"_action",
"=",
"'ListIdentities'",
";",
"$",
"this",
"->",
"_method",
"=",
"'GET'",
";",
"$",
"this",
"->",
"_refreshDate",
"(",
")",
";",
"if",
... | List all identities your AWS account.
@param string $identity_type The type of the identities to list. Possible
values are "EmailAddress" and "Domain". If this
parameter is omitted, then all identities will
be listed.
@return string[] or Error | [
"List",
"all",
"identities",
"your",
"AWS",
"account",
"."
] | 7acd9eed7b1ac0546f579f0ccb775a5816a2979f | https://github.com/okamos/php-ses/blob/7acd9eed7b1ac0546f579f0ccb775a5816a2979f/src/ses.php#L66-L94 |
191,558 | okamos/php-ses | src/ses.php | SimpleEmailService.verifyEmailIdentity | public function verifyEmailIdentity($email)
{
$this->_action = 'VerifyEmailIdentity';
$this->_method = 'GET';
$this->_refreshDate();
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
throw new Exception('Invalid email');
return;
}
$parameters... | php | public function verifyEmailIdentity($email)
{
$this->_action = 'VerifyEmailIdentity';
$this->_method = 'GET';
$this->_refreshDate();
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
throw new Exception('Invalid email');
return;
}
$parameters... | [
"public",
"function",
"verifyEmailIdentity",
"(",
"$",
"email",
")",
"{",
"$",
"this",
"->",
"_action",
"=",
"'VerifyEmailIdentity'",
";",
"$",
"this",
"->",
"_method",
"=",
"'GET'",
";",
"$",
"this",
"->",
"_refreshDate",
"(",
")",
";",
"if",
"(",
"!",
... | Send an confirmation email to email address for verification.
@param string $email The email address to be verified.
@return string RequestId or Error | [
"Send",
"an",
"confirmation",
"email",
"to",
"email",
"address",
"for",
"verification",
"."
] | 7acd9eed7b1ac0546f579f0ccb775a5816a2979f | https://github.com/okamos/php-ses/blob/7acd9eed7b1ac0546f579f0ccb775a5816a2979f/src/ses.php#L103-L125 |
191,559 | okamos/php-ses | src/ses.php | SimpleEmailService.deleteIdentity | public function deleteIdentity($identity)
{
$this->_action = 'DeleteIdentity';
$this->_method = 'GET';
$this->_refreshDate();
if (!(filter_var($identity, FILTER_VALIDATE_EMAIL) || preg_match('/^([a-z\d]+(-[a-z\d]+)*\.)+[a-z]{2,}$/', $identity))) {
throw new Exception('Id... | php | public function deleteIdentity($identity)
{
$this->_action = 'DeleteIdentity';
$this->_method = 'GET';
$this->_refreshDate();
if (!(filter_var($identity, FILTER_VALIDATE_EMAIL) || preg_match('/^([a-z\d]+(-[a-z\d]+)*\.)+[a-z]{2,}$/', $identity))) {
throw new Exception('Id... | [
"public",
"function",
"deleteIdentity",
"(",
"$",
"identity",
")",
"{",
"$",
"this",
"->",
"_action",
"=",
"'DeleteIdentity'",
";",
"$",
"this",
"->",
"_method",
"=",
"'GET'",
";",
"$",
"this",
"->",
"_refreshDate",
"(",
")",
";",
"if",
"(",
"!",
"(",
... | Delete an identity from your AWS account.
@param string $identity The identity to be removed from the list of identities
for the AWS Account. An email address or domain.
@return string RequestId or Error | [
"Delete",
"an",
"identity",
"from",
"your",
"AWS",
"account",
"."
] | 7acd9eed7b1ac0546f579f0ccb775a5816a2979f | https://github.com/okamos/php-ses/blob/7acd9eed7b1ac0546f579f0ccb775a5816a2979f/src/ses.php#L135-L157 |
191,560 | okamos/php-ses | src/ses.php | SimpleEmailService.getIdentityVerificationAttributes | public function getIdentityVerificationAttributes($identities)
{
$this->_action = 'GetIdentityVerificationAttributes';
$this->_method = 'GET';
$this->_refreshDate();
$parameters = array();
$index = 1;
if (is_array($identities)) {
foreach ($identities as ... | php | public function getIdentityVerificationAttributes($identities)
{
$this->_action = 'GetIdentityVerificationAttributes';
$this->_method = 'GET';
$this->_refreshDate();
$parameters = array();
$index = 1;
if (is_array($identities)) {
foreach ($identities as ... | [
"public",
"function",
"getIdentityVerificationAttributes",
"(",
"$",
"identities",
")",
"{",
"$",
"this",
"->",
"_action",
"=",
"'GetIdentityVerificationAttributes'",
";",
"$",
"this",
"->",
"_method",
"=",
"'GET'",
";",
"$",
"this",
"->",
"_refreshDate",
"(",
"... | Get verification status.
@param string[] $identities List of string. (email or domain)
@return object[] {
Email => string,
Token => string,
Status => string
} | [
"Get",
"verification",
"status",
"."
] | 7acd9eed7b1ac0546f579f0ccb775a5816a2979f | https://github.com/okamos/php-ses/blob/7acd9eed7b1ac0546f579f0ccb775a5816a2979f/src/ses.php#L170-L206 |
191,561 | okamos/php-ses | src/ses.php | SimpleEmailService.sendEmail | public function sendEmail($envelope)
{
$validate = $envelope->validate();
if (is_object($validate)) {
return $validate;
}
$parameters = $envelope->buildParameters();
$this->_action = $envelope->action;
$this->_method = 'POST';
$this->_refreshDate(... | php | public function sendEmail($envelope)
{
$validate = $envelope->validate();
if (is_object($validate)) {
return $validate;
}
$parameters = $envelope->buildParameters();
$this->_action = $envelope->action;
$this->_method = 'POST';
$this->_refreshDate(... | [
"public",
"function",
"sendEmail",
"(",
"$",
"envelope",
")",
"{",
"$",
"validate",
"=",
"$",
"envelope",
"->",
"validate",
"(",
")",
";",
"if",
"(",
"is_object",
"(",
"$",
"validate",
")",
")",
"{",
"return",
"$",
"validate",
";",
"}",
"$",
"paramet... | Send the email to some specified addresses.
@param SimpleEmailServiceEnvelope $envelope Instance of
SimpleEmailServiceEnvelope class.
@return string MessageId. | [
"Send",
"the",
"email",
"to",
"some",
"specified",
"addresses",
"."
] | 7acd9eed7b1ac0546f579f0ccb775a5816a2979f | https://github.com/okamos/php-ses/blob/7acd9eed7b1ac0546f579f0ccb775a5816a2979f/src/ses.php#L216-L239 |
191,562 | okamos/php-ses | src/ses.php | SimpleEmailService.getSendQuota | public function getSendQuota()
{
$this->_action = 'GetSendQuota';
$this->_method = 'GET';
$this->_refreshDate();
$this->_generateSignature();
$res = $this->_request();
if ($res['code'] == 200) {
$result = $res['body']->GetSendQuotaResult;
retu... | php | public function getSendQuota()
{
$this->_action = 'GetSendQuota';
$this->_method = 'GET';
$this->_refreshDate();
$this->_generateSignature();
$res = $this->_request();
if ($res['code'] == 200) {
$result = $res['body']->GetSendQuotaResult;
retu... | [
"public",
"function",
"getSendQuota",
"(",
")",
"{",
"$",
"this",
"->",
"_action",
"=",
"'GetSendQuota'",
";",
"$",
"this",
"->",
"_method",
"=",
"'GET'",
";",
"$",
"this",
"->",
"_refreshDate",
"(",
")",
";",
"$",
"this",
"->",
"_generateSignature",
"("... | Get your AWS account's sending limits.
@return object {
Max24HourSend => string,
SentLast24Hours => string,
MaxSendRate => string
} | [
"Get",
"your",
"AWS",
"account",
"s",
"sending",
"limits",
"."
] | 7acd9eed7b1ac0546f579f0ccb775a5816a2979f | https://github.com/okamos/php-ses/blob/7acd9eed7b1ac0546f579f0ccb775a5816a2979f/src/ses.php#L251-L270 |
191,563 | okamos/php-ses | src/ses.php | SimpleEmailService.getSendStatistics | public function getSendStatistics()
{
$this->_action = 'GetSendStatistics';
$this->_method = 'GET';
$this->_refreshDate();
$this->_generateSignature();
$res = $this->_request();
if ($res['code'] == 200) {
$result = $res['body']->GetSendStatisticsResult->S... | php | public function getSendStatistics()
{
$this->_action = 'GetSendStatistics';
$this->_method = 'GET';
$this->_refreshDate();
$this->_generateSignature();
$res = $this->_request();
if ($res['code'] == 200) {
$result = $res['body']->GetSendStatisticsResult->S... | [
"public",
"function",
"getSendStatistics",
"(",
")",
"{",
"$",
"this",
"->",
"_action",
"=",
"'GetSendStatistics'",
";",
"$",
"this",
"->",
"_method",
"=",
"'GET'",
";",
"$",
"this",
"->",
"_refreshDate",
"(",
")",
";",
"$",
"this",
"->",
"_generateSignatu... | Get SES sending statistics.
@return object {
Complaints => string,
Rejects => string,
Bounces => string,
DeliveryAttempts => string,
Timestamp => string
} | [
"Get",
"SES",
"sending",
"statistics",
"."
] | 7acd9eed7b1ac0546f579f0ccb775a5816a2979f | https://github.com/okamos/php-ses/blob/7acd9eed7b1ac0546f579f0ccb775a5816a2979f/src/ses.php#L283-L303 |
191,564 | okamos/php-ses | src/ses.php | SimpleEmailService._generateSignatureKey | private function _generateSignatureKey()
{
$date_h = hash_hmac('sha256', $this->_date, 'AWS4' . $this->_aws_secret, true);
$region_h = hash_hmac('sha256', $this->_region, $date_h, true);
$service_h = hash_hmac('sha256', self::SERVICE, $region_h, true);
$signing_h = hash_hmac('sha256'... | php | private function _generateSignatureKey()
{
$date_h = hash_hmac('sha256', $this->_date, 'AWS4' . $this->_aws_secret, true);
$region_h = hash_hmac('sha256', $this->_region, $date_h, true);
$service_h = hash_hmac('sha256', self::SERVICE, $region_h, true);
$signing_h = hash_hmac('sha256'... | [
"private",
"function",
"_generateSignatureKey",
"(",
")",
"{",
"$",
"date_h",
"=",
"hash_hmac",
"(",
"'sha256'",
",",
"$",
"this",
"->",
"_date",
",",
"'AWS4'",
".",
"$",
"this",
"->",
"_aws_secret",
",",
"true",
")",
";",
"$",
"region_h",
"=",
"hash_hma... | Create and returns binary hmac sha256
@return hmac sha256. | [
"Create",
"and",
"returns",
"binary",
"hmac",
"sha256"
] | 7acd9eed7b1ac0546f579f0ccb775a5816a2979f | https://github.com/okamos/php-ses/blob/7acd9eed7b1ac0546f579f0ccb775a5816a2979f/src/ses.php#L310-L318 |
191,565 | okamos/php-ses | src/ses.php | SimpleEmailService._generateSignature | private function _generateSignature($parameters = array())
{
$this->_headers = [];
$canonical_uri = '/';
$parameters['Action'] = $this->_action;
ksort($parameters);
$request_parameters = http_build_query($parameters, '', '&', PHP_QUERY_RFC3986);
$canonical_headers ... | php | private function _generateSignature($parameters = array())
{
$this->_headers = [];
$canonical_uri = '/';
$parameters['Action'] = $this->_action;
ksort($parameters);
$request_parameters = http_build_query($parameters, '', '&', PHP_QUERY_RFC3986);
$canonical_headers ... | [
"private",
"function",
"_generateSignature",
"(",
"$",
"parameters",
"=",
"array",
"(",
")",
")",
"{",
"$",
"this",
"->",
"_headers",
"=",
"[",
"]",
";",
"$",
"canonical_uri",
"=",
"'/'",
";",
"$",
"parameters",
"[",
"'Action'",
"]",
"=",
"$",
"this",
... | Signing AWS Requests with Signature Version 4
@param array $parameters It contains request parameters.
@ref http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html
@return void | [
"Signing",
"AWS",
"Requests",
"with",
"Signature",
"Version",
"4"
] | 7acd9eed7b1ac0546f579f0ccb775a5816a2979f | https://github.com/okamos/php-ses/blob/7acd9eed7b1ac0546f579f0ccb775a5816a2979f/src/ses.php#L340-L367 |
191,566 | okamos/php-ses | src/ses.php | SimpleEmailService._request | private function _request()
{
$res = $this->_client->request(
$this->_method,
$this->_endpoint . '?' . $this->_query_parameters,
[
'headers' => $this->_headers,
'http_errors' => false
]
);
return array(
... | php | private function _request()
{
$res = $this->_client->request(
$this->_method,
$this->_endpoint . '?' . $this->_query_parameters,
[
'headers' => $this->_headers,
'http_errors' => false
]
);
return array(
... | [
"private",
"function",
"_request",
"(",
")",
"{",
"$",
"res",
"=",
"$",
"this",
"->",
"_client",
"->",
"request",
"(",
"$",
"this",
"->",
"_method",
",",
"$",
"this",
"->",
"_endpoint",
".",
"'?'",
".",
"$",
"this",
"->",
"_query_parameters",
",",
"[... | Request handler.
@return object {
code => integer,
body => SimpleXMLElement
} | [
"Request",
"handler",
"."
] | 7acd9eed7b1ac0546f579f0ccb775a5816a2979f | https://github.com/okamos/php-ses/blob/7acd9eed7b1ac0546f579f0ccb775a5816a2979f/src/ses.php#L377-L391 |
191,567 | rygilles/laravel-openapi-schema-generator | src/Rygilles/OpenApiGenerator/Commands/GenerateSchemas.php | GenerateSchemas.setUserToBeImpersonated | private function setUserToBeImpersonated($userId)
{
if (!empty($userId)) {
if (version_compare($this->laravel->version(), '5.2.0', '<')) {
$userModel = config('auth.model');
$user = $userModel::find($userId);
$this->laravel['auth']->setUser($user);
} else {
if (!config('openapischemas.a... | php | private function setUserToBeImpersonated($userId)
{
if (!empty($userId)) {
if (version_compare($this->laravel->version(), '5.2.0', '<')) {
$userModel = config('auth.model');
$user = $userModel::find($userId);
$this->laravel['auth']->setUser($user);
} else {
if (!config('openapischemas.a... | [
"private",
"function",
"setUserToBeImpersonated",
"(",
"$",
"userId",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"userId",
")",
")",
"{",
"if",
"(",
"version_compare",
"(",
"$",
"this",
"->",
"laravel",
"->",
"version",
"(",
")",
",",
"'5.2.0'",
",",... | Set current user for Api calls
@param mixed $userId | [
"Set",
"current",
"user",
"for",
"Api",
"calls"
] | 515eddcce4572de080539711f972bef84863d371 | https://github.com/rygilles/laravel-openapi-schema-generator/blob/515eddcce4572de080539711f972bef84863d371/src/Rygilles/OpenApiGenerator/Commands/GenerateSchemas.php#L116-L139 |
191,568 | letrunghieu/favicon | src/GenerateCommand.php | GenerateCommand._generateIco | private function _generateIco(OutputInterface $output)
{
$filename = $this->_outputFolder . "favicon.ico";
$output->writeln("Creating: <info>{$filename}</info>");
$originalImage = $this->_imagine->open($this->_inputFile)->strip();
$originalImage->copy()
->re... | php | private function _generateIco(OutputInterface $output)
{
$filename = $this->_outputFolder . "favicon.ico";
$output->writeln("Creating: <info>{$filename}</info>");
$originalImage = $this->_imagine->open($this->_inputFile)->strip();
$originalImage->copy()
->re... | [
"private",
"function",
"_generateIco",
"(",
"OutputInterface",
"$",
"output",
")",
"{",
"$",
"filename",
"=",
"$",
"this",
"->",
"_outputFolder",
".",
"\"favicon.ico\"",
";",
"$",
"output",
"->",
"writeln",
"(",
"\"Creating: <info>{$filename}</info>\"",
")",
";",
... | Generate ICO icon
@param OutputInterface $output
@return bool | [
"Generate",
"ICO",
"icon"
] | 79785e47e956d0baea1b5ac6e306a553e91dac0e | https://github.com/letrunghieu/favicon/blob/79785e47e956d0baea1b5ac6e306a553e91dac0e/src/GenerateCommand.php#L148-L178 |
191,569 | letrunghieu/favicon | src/GenerateCommand.php | GenerateCommand._getImagine | private function _getImagine(OutputInterface $output)
{
// Use Imagick extension by default
if (extension_loaded('imagick') && class_exists("Imagick"))
{
$output->writeln('Imagick library is used!');
return new \Imagine\Imagick\Imagine();
}
// ... | php | private function _getImagine(OutputInterface $output)
{
// Use Imagick extension by default
if (extension_loaded('imagick') && class_exists("Imagick"))
{
$output->writeln('Imagick library is used!');
return new \Imagine\Imagick\Imagine();
}
// ... | [
"private",
"function",
"_getImagine",
"(",
"OutputInterface",
"$",
"output",
")",
"{",
"// Use Imagick extension by default\r",
"if",
"(",
"extension_loaded",
"(",
"'imagick'",
")",
"&&",
"class_exists",
"(",
"\"Imagick\"",
")",
")",
"{",
"$",
"output",
"->",
"wri... | Get the imagine object based on the options. Default will use Imagick
extension
@param InputInterface $input
@param OutputInterface $output
@return \Imagine\Image\AbstractImagine | [
"Get",
"the",
"imagine",
"object",
"based",
"on",
"the",
"options",
".",
"Default",
"will",
"use",
"Imagick",
"extension"
] | 79785e47e956d0baea1b5ac6e306a553e91dac0e | https://github.com/letrunghieu/favicon/blob/79785e47e956d0baea1b5ac6e306a553e91dac0e/src/GenerateCommand.php#L237-L254 |
191,570 | gushphp/gush | src/Subscriber/CoreInitSubscriber.php | CoreInitSubscriber.initialize | public function initialize(ConsoleEvent $event)
{
$command = $event->getCommand();
if (!$command instanceof InitCommand) {
return;
}
if (!$this->gitHelper->isGitDir()) {
throw new UserException(
sprintf(
'You can only run ... | php | public function initialize(ConsoleEvent $event)
{
$command = $event->getCommand();
if (!$command instanceof InitCommand) {
return;
}
if (!$this->gitHelper->isGitDir()) {
throw new UserException(
sprintf(
'You can only run ... | [
"public",
"function",
"initialize",
"(",
"ConsoleEvent",
"$",
"event",
")",
"{",
"$",
"command",
"=",
"$",
"event",
"->",
"getCommand",
"(",
")",
";",
"if",
"(",
"!",
"$",
"command",
"instanceof",
"InitCommand",
")",
"{",
"return",
";",
"}",
"if",
"(",... | Use this for detecting the org and repo.
Add the options to decorateDefinition.
@param ConsoleEvent $event | [
"Use",
"this",
"for",
"detecting",
"the",
"org",
"and",
"repo",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Subscriber/CoreInitSubscriber.php#L114-L176 |
191,571 | rygilles/laravel-openapi-schema-generator | src/Rygilles/OpenApiGenerator/OpenApi/BaseObject.php | BaseObject.toJson | public function toJson($options = 0)
{
$json = json_encode($this->jsonSerialize(), $options);
if (JSON_ERROR_NONE !== json_last_error()) {
throw JsonEncodingException::forObject($this, json_last_error_msg());
}
return $json;
} | php | public function toJson($options = 0)
{
$json = json_encode($this->jsonSerialize(), $options);
if (JSON_ERROR_NONE !== json_last_error()) {
throw JsonEncodingException::forObject($this, json_last_error_msg());
}
return $json;
} | [
"public",
"function",
"toJson",
"(",
"$",
"options",
"=",
"0",
")",
"{",
"$",
"json",
"=",
"json_encode",
"(",
"$",
"this",
"->",
"jsonSerialize",
"(",
")",
",",
"$",
"options",
")",
";",
"if",
"(",
"JSON_ERROR_NONE",
"!==",
"json_last_error",
"(",
")"... | Convert the object instance to JSON.
@param int $options
@return string
@throws JsonEncodingException | [
"Convert",
"the",
"object",
"instance",
"to",
"JSON",
"."
] | 515eddcce4572de080539711f972bef84863d371 | https://github.com/rygilles/laravel-openapi-schema-generator/blob/515eddcce4572de080539711f972bef84863d371/src/Rygilles/OpenApiGenerator/OpenApi/BaseObject.php#L83-L92 |
191,572 | gushphp/gush | src/Subscriber/GitRepoSubscriber.php | GitRepoSubscriber.setIssueTrackerDef | private function setIssueTrackerDef(BaseCommand $command)
{
$issueTracker = $this->application->getConfig()->get(
'issue_tracker',
Config::CONFIG_LOCAL,
GitHelper::UNDEFINED_ADAPTER
);
$command
->addOption(
'issue-adapter',
... | php | private function setIssueTrackerDef(BaseCommand $command)
{
$issueTracker = $this->application->getConfig()->get(
'issue_tracker',
Config::CONFIG_LOCAL,
GitHelper::UNDEFINED_ADAPTER
);
$command
->addOption(
'issue-adapter',
... | [
"private",
"function",
"setIssueTrackerDef",
"(",
"BaseCommand",
"$",
"command",
")",
"{",
"$",
"issueTracker",
"=",
"$",
"this",
"->",
"application",
"->",
"getConfig",
"(",
")",
"->",
"get",
"(",
"'issue_tracker'",
",",
"Config",
"::",
"CONFIG_LOCAL",
",",
... | Set Issue-tracker configuration.
When no explicit configuration for the issue-tracker is set
the repository information is reused (when possible).
@param BaseCommand $command | [
"Set",
"Issue",
"-",
"tracker",
"configuration",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Subscriber/GitRepoSubscriber.php#L95-L137 |
191,573 | nimmneun/onesheet | src/OneSheet/Writer.php | Writer.addRows | public function addRows($rows, Style $style = null)
{
if (!is_array($rows) && false === $rows instanceof \Traversable) {
throw new \InvalidArgumentException('Expected array or traversable object as rows');
}
foreach ($rows as $row) {
$this->addRow($row, $style);
... | php | public function addRows($rows, Style $style = null)
{
if (!is_array($rows) && false === $rows instanceof \Traversable) {
throw new \InvalidArgumentException('Expected array or traversable object as rows');
}
foreach ($rows as $row) {
$this->addRow($row, $style);
... | [
"public",
"function",
"addRows",
"(",
"$",
"rows",
",",
"Style",
"$",
"style",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"rows",
")",
"&&",
"false",
"===",
"$",
"rows",
"instanceof",
"\\",
"Traversable",
")",
"{",
"throw",
"new",
... | Add multiple rows at once.
@param array|\Traversable $rows
@param Style $style
@throws \InvalidArgumentException | [
"Add",
"multiple",
"rows",
"at",
"once",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Writer.php#L111-L120 |
191,574 | nimmneun/onesheet | src/OneSheet/Writer.php | Writer.addRow | public function addRow(array $row, Style $style = null)
{
if (!empty($row)) {
$style = $style instanceof Style ? $style : $this->styler->getDefaultStyle();
$this->styler->addStyle($style);
$this->sheetFile->fwrite($this->sheet->addRow($row, $style));
}
} | php | public function addRow(array $row, Style $style = null)
{
if (!empty($row)) {
$style = $style instanceof Style ? $style : $this->styler->getDefaultStyle();
$this->styler->addStyle($style);
$this->sheetFile->fwrite($this->sheet->addRow($row, $style));
}
} | [
"public",
"function",
"addRow",
"(",
"array",
"$",
"row",
",",
"Style",
"$",
"style",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"row",
")",
")",
"{",
"$",
"style",
"=",
"$",
"style",
"instanceof",
"Style",
"?",
"$",
"style",
":",
... | Add a single new row to the sheet and supply an optional style.
@param array $row
@param Style $style | [
"Add",
"a",
"single",
"new",
"row",
"to",
"the",
"sheet",
"and",
"supply",
"an",
"optional",
"style",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Writer.php#L128-L135 |
191,575 | nimmneun/onesheet | src/OneSheet/Writer.php | Writer.writeToFile | public function writeToFile($fileName = 'report.xlsx')
{
$this->output = fopen($fileName, 'w');
$finalizer = new Finalizer($this->sheet, $this->styler, $this->sheetFile);
$finalizer->finalize($this->output);
} | php | public function writeToFile($fileName = 'report.xlsx')
{
$this->output = fopen($fileName, 'w');
$finalizer = new Finalizer($this->sheet, $this->styler, $this->sheetFile);
$finalizer->finalize($this->output);
} | [
"public",
"function",
"writeToFile",
"(",
"$",
"fileName",
"=",
"'report.xlsx'",
")",
"{",
"$",
"this",
"->",
"output",
"=",
"fopen",
"(",
"$",
"fileName",
",",
"'w'",
")",
";",
"$",
"finalizer",
"=",
"new",
"Finalizer",
"(",
"$",
"this",
"->",
"sheet"... | Wrap things up and write xlsx.
@param string $fileName | [
"Wrap",
"things",
"up",
"and",
"write",
"xlsx",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Writer.php#L142-L147 |
191,576 | nimmneun/onesheet | src/OneSheet/Writer.php | Writer.writeToBrowser | public function writeToBrowser($fileName = 'report.xlsx')
{
$this->output = fopen('php://output', 'w');
$finalizer = new Finalizer($this->sheet, $this->styler, $this->sheetFile);
$this->sendHeaders($fileName);
$finalizer->finalize($this->output);
} | php | public function writeToBrowser($fileName = 'report.xlsx')
{
$this->output = fopen('php://output', 'w');
$finalizer = new Finalizer($this->sheet, $this->styler, $this->sheetFile);
$this->sendHeaders($fileName);
$finalizer->finalize($this->output);
} | [
"public",
"function",
"writeToBrowser",
"(",
"$",
"fileName",
"=",
"'report.xlsx'",
")",
"{",
"$",
"this",
"->",
"output",
"=",
"fopen",
"(",
"'php://output'",
",",
"'w'",
")",
";",
"$",
"finalizer",
"=",
"new",
"Finalizer",
"(",
"$",
"this",
"->",
"shee... | Wrap things up and send xlsx to browser.
@param string $fileName | [
"Wrap",
"things",
"up",
"and",
"send",
"xlsx",
"to",
"browser",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Writer.php#L154-L160 |
191,577 | nimmneun/onesheet | src/OneSheet/Size/SizeCalculator.php | SizeCalculator.getCellWidth | public function getCellWidth($fontName, $fontSize, $value)
{
$width = 1;
foreach ($this->getSingleCharacterArray($value) as $char) {
$width += $this->getCharacterWidth($fontName, $fontSize, $char);
}
return $width;
} | php | public function getCellWidth($fontName, $fontSize, $value)
{
$width = 1;
foreach ($this->getSingleCharacterArray($value) as $char) {
$width += $this->getCharacterWidth($fontName, $fontSize, $char);
}
return $width;
} | [
"public",
"function",
"getCellWidth",
"(",
"$",
"fontName",
",",
"$",
"fontSize",
",",
"$",
"value",
")",
"{",
"$",
"width",
"=",
"1",
";",
"foreach",
"(",
"$",
"this",
"->",
"getSingleCharacterArray",
"(",
"$",
"value",
")",
"as",
"$",
"char",
")",
... | Get the calculated cell width for a given value.
@param string $fontName
@param int $fontSize
@param mixed $value
@return float|int | [
"Get",
"the",
"calculated",
"cell",
"width",
"for",
"a",
"given",
"value",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Size/SizeCalculator.php#L74-L82 |
191,578 | nimmneun/onesheet | src/OneSheet/Size/SizeCalculator.php | SizeCalculator.getCharacterWidth | private function getCharacterWidth($fontName, $fontSize, $char)
{
if (!isset($this->sizes[$fontName][$fontSize][$char])) {
$this->sizes[$fontName][$fontSize][$char] =
$this->calculateCharacterWith($fontName, $fontSize, $char);
}
return $this->sizes[$fontName][$fo... | php | private function getCharacterWidth($fontName, $fontSize, $char)
{
if (!isset($this->sizes[$fontName][$fontSize][$char])) {
$this->sizes[$fontName][$fontSize][$char] =
$this->calculateCharacterWith($fontName, $fontSize, $char);
}
return $this->sizes[$fontName][$fo... | [
"private",
"function",
"getCharacterWidth",
"(",
"$",
"fontName",
",",
"$",
"fontSize",
",",
"$",
"char",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"sizes",
"[",
"$",
"fontName",
"]",
"[",
"$",
"fontSize",
"]",
"[",
"$",
"char",
"]... | Get width of a single character. Calculate & cache if necessary.
@param string $fontName
@param int $fontSize
@param string $char
@return float | [
"Get",
"width",
"of",
"a",
"single",
"character",
".",
"Calculate",
"&",
"cache",
"if",
"necessary",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Size/SizeCalculator.php#L93-L101 |
191,579 | nimmneun/onesheet | src/OneSheet/Size/SizeCalculator.php | SizeCalculator.calculateCharacterWith | private function calculateCharacterWith($fontName, $fontSize, $char)
{
if (isset($this->fonts[$fontName])) {
$box = imageftbbox($fontSize, 0, $this->fonts[$fontName], str_repeat($char, 100));
$width = abs($box[4] - $box[0]) / 6.73 / 100;
return round($width, 3);
}... | php | private function calculateCharacterWith($fontName, $fontSize, $char)
{
if (isset($this->fonts[$fontName])) {
$box = imageftbbox($fontSize, 0, $this->fonts[$fontName], str_repeat($char, 100));
$width = abs($box[4] - $box[0]) / 6.73 / 100;
return round($width, 3);
}... | [
"private",
"function",
"calculateCharacterWith",
"(",
"$",
"fontName",
",",
"$",
"fontSize",
",",
"$",
"char",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"fonts",
"[",
"$",
"fontName",
"]",
")",
")",
"{",
"$",
"box",
"=",
"imageftbbox",
"(... | Calculate the width of a single character for the given fontname and size.
Create image that contains the character 100 times to get more accurate results.
@param string $fontName
@param int $fontSize
@param string $char
@return float | [
"Calculate",
"the",
"width",
"of",
"a",
"single",
"character",
"for",
"the",
"given",
"fontname",
"and",
"size",
".",
"Create",
"image",
"that",
"contains",
"the",
"character",
"100",
"times",
"to",
"get",
"more",
"accurate",
"results",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Size/SizeCalculator.php#L113-L122 |
191,580 | nimmneun/onesheet | src/OneSheet/Size/SizeCalculator.php | SizeCalculator.getSingleCharacterArray | private function getSingleCharacterArray($value)
{
if (mb_strlen($value) == strlen($value)) {
return str_split($value);
}
return preg_split('~~u', $value, -1, PREG_SPLIT_NO_EMPTY);
} | php | private function getSingleCharacterArray($value)
{
if (mb_strlen($value) == strlen($value)) {
return str_split($value);
}
return preg_split('~~u', $value, -1, PREG_SPLIT_NO_EMPTY);
} | [
"private",
"function",
"getSingleCharacterArray",
"(",
"$",
"value",
")",
"{",
"if",
"(",
"mb_strlen",
"(",
"$",
"value",
")",
"==",
"strlen",
"(",
"$",
"value",
")",
")",
"{",
"return",
"str_split",
"(",
"$",
"value",
")",
";",
"}",
"return",
"preg_sp... | Split value into individual characters.
@param mixed $value
@return array | [
"Split",
"value",
"into",
"individual",
"characters",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Size/SizeCalculator.php#L130-L137 |
191,581 | gushphp/gush | src/Helper/TemplateHelper.php | TemplateHelper.registerTemplate | public function registerTemplate(TemplateInterface $template)
{
$templateName = $template->getName();
$parts = explode('/', $templateName);
if (count($parts) !== 2) {
throw new \InvalidArgumentException(
sprintf(
'Template name "%s" is not for... | php | public function registerTemplate(TemplateInterface $template)
{
$templateName = $template->getName();
$parts = explode('/', $templateName);
if (count($parts) !== 2) {
throw new \InvalidArgumentException(
sprintf(
'Template name "%s" is not for... | [
"public",
"function",
"registerTemplate",
"(",
"TemplateInterface",
"$",
"template",
")",
"{",
"$",
"templateName",
"=",
"$",
"template",
"->",
"getName",
"(",
")",
";",
"$",
"parts",
"=",
"explode",
"(",
"'/'",
",",
"$",
"templateName",
")",
";",
"if",
... | Registers a template.
@param TemplateInterface $template
@throws \InvalidArgumentException | [
"Registers",
"a",
"template",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/TemplateHelper.php#L91-L108 |
191,582 | gushphp/gush | src/Helper/TemplateHelper.php | TemplateHelper.getTemplate | public function getTemplate($domain, $name)
{
if (!isset($this->templates[$domain][$name])) {
throw new \InvalidArgumentException(sprintf(
'Template with name "%s" in domain "%s" has not been registered',
$name,
$domain
));
}
... | php | public function getTemplate($domain, $name)
{
if (!isset($this->templates[$domain][$name])) {
throw new \InvalidArgumentException(sprintf(
'Template with name "%s" in domain "%s" has not been registered',
$name,
$domain
));
}
... | [
"public",
"function",
"getTemplate",
"(",
"$",
"domain",
",",
"$",
"name",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"templates",
"[",
"$",
"domain",
"]",
"[",
"$",
"name",
"]",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgument... | Retrieves a template by domain and name.
@param string $domain Domain of the template
@param string $name Name of the template
@throws \InvalidArgumentException
@return TemplateInterface | [
"Retrieves",
"a",
"template",
"by",
"domain",
"and",
"name",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/TemplateHelper.php#L128-L139 |
191,583 | gushphp/gush | src/Helper/TemplateHelper.php | TemplateHelper.parameterize | public function parameterize(TemplateInterface $template)
{
$params = [];
foreach ($template->getRequirements() as $key => $requirement) {
if (!$this->input->hasOption($key) || !$this->input->getOption($key)) {
list($prompt, $default) = $requirement;
if ... | php | public function parameterize(TemplateInterface $template)
{
$params = [];
foreach ($template->getRequirements() as $key => $requirement) {
if (!$this->input->hasOption($key) || !$this->input->getOption($key)) {
list($prompt, $default) = $requirement;
if ... | [
"public",
"function",
"parameterize",
"(",
"TemplateInterface",
"$",
"template",
")",
"{",
"$",
"params",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"template",
"->",
"getRequirements",
"(",
")",
"as",
"$",
"key",
"=>",
"$",
"requirement",
")",
"{",
"if",
... | Retrieves the requirements of the given template and asks the
user for any parameters that are not available from the
input, then binds the parameters to the template.
@param TemplateInterface $template Template to render | [
"Retrieves",
"the",
"requirements",
"of",
"the",
"given",
"template",
"and",
"asks",
"the",
"user",
"for",
"any",
"parameters",
"that",
"are",
"not",
"available",
"from",
"the",
"input",
"then",
"binds",
"the",
"parameters",
"to",
"the",
"template",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/TemplateHelper.php#L148-L181 |
191,584 | gushphp/gush | src/Helper/TemplateHelper.php | TemplateHelper.askAndRender | public function askAndRender($templateDomain, $templateName)
{
$template = $this->getTemplate($templateDomain, $templateName);
$this->parameterize($template);
return $template->render();
} | php | public function askAndRender($templateDomain, $templateName)
{
$template = $this->getTemplate($templateDomain, $templateName);
$this->parameterize($template);
return $template->render();
} | [
"public",
"function",
"askAndRender",
"(",
"$",
"templateDomain",
",",
"$",
"templateName",
")",
"{",
"$",
"template",
"=",
"$",
"this",
"->",
"getTemplate",
"(",
"$",
"templateDomain",
",",
"$",
"templateName",
")",
";",
"$",
"this",
"->",
"parameterize",
... | Asks and renders will render the template.
If any requirements are missing from the Input it will demand the
parameters from the user.
@param string $templateDomain Domain for the template, e.g. pull-request
@param string $templateName Name of the template, e.g. symfony-doc
@return string Rendered template string | [
"Asks",
"and",
"renders",
"will",
"render",
"the",
"template",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/TemplateHelper.php#L194-L200 |
191,585 | gushphp/gush | src/Helper/TemplateHelper.php | TemplateHelper.bindAndRender | public function bindAndRender(array $parameters, $templateDomain, $templateName)
{
$template = $this->getTemplate($templateDomain, $templateName);
$template->bind($parameters);
return $template->render();
} | php | public function bindAndRender(array $parameters, $templateDomain, $templateName)
{
$template = $this->getTemplate($templateDomain, $templateName);
$template->bind($parameters);
return $template->render();
} | [
"public",
"function",
"bindAndRender",
"(",
"array",
"$",
"parameters",
",",
"$",
"templateDomain",
",",
"$",
"templateName",
")",
"{",
"$",
"template",
"=",
"$",
"this",
"->",
"getTemplate",
"(",
"$",
"templateDomain",
",",
"$",
"templateName",
")",
";",
... | Like askAndRender but directly binding parameters passed
not as options but as direct input argument to method.
@param array $parameters
@param string $templateDomain Domain for the template, e.g. pull-request
@param string $templateName Name of the template, e.g. symfony-doc
@return string Rendered template strin... | [
"Like",
"askAndRender",
"but",
"directly",
"binding",
"parameters",
"passed",
"not",
"as",
"options",
"but",
"as",
"direct",
"input",
"argument",
"to",
"method",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/TemplateHelper.php#L212-L218 |
191,586 | gushphp/gush | src/Helper/TemplateHelper.php | TemplateHelper.getNamesForDomain | public function getNamesForDomain($domain)
{
if (!isset($this->templates[$domain])) {
throw new \InvalidArgumentException(sprintf(
'Unknown template domain "%s"',
$domain
));
}
return array_keys($this->templates[$domain]);
} | php | public function getNamesForDomain($domain)
{
if (!isset($this->templates[$domain])) {
throw new \InvalidArgumentException(sprintf(
'Unknown template domain "%s"',
$domain
));
}
return array_keys($this->templates[$domain]);
} | [
"public",
"function",
"getNamesForDomain",
"(",
"$",
"domain",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"templates",
"[",
"$",
"domain",
"]",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"sprintf",
"(",
"'Unknow... | Returns the names of registered templates in the given domain.
@param string $domain Return template names for this domain
@throws \InvalidArgumentException
@return array Array of template name strings | [
"Returns",
"the",
"names",
"of",
"registered",
"templates",
"in",
"the",
"given",
"domain",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/TemplateHelper.php#L229-L239 |
191,587 | gushphp/gush | src/ThirdParty/Github/GitHubAdapter.php | GitHubAdapter.getCommitStatuses | public function getCommitStatuses($org, $repo, $hash)
{
$pager = new ResultPager($this->client);
return $pager->fetchAll($this->client->api('repo')->statuses(), 'combined', [$org, $repo, $hash])['statuses'];
} | php | public function getCommitStatuses($org, $repo, $hash)
{
$pager = new ResultPager($this->client);
return $pager->fetchAll($this->client->api('repo')->statuses(), 'combined', [$org, $repo, $hash])['statuses'];
} | [
"public",
"function",
"getCommitStatuses",
"(",
"$",
"org",
",",
"$",
"repo",
",",
"$",
"hash",
")",
"{",
"$",
"pager",
"=",
"new",
"ResultPager",
"(",
"$",
"this",
"->",
"client",
")",
";",
"return",
"$",
"pager",
"->",
"fetchAll",
"(",
"$",
"this",... | Gets the status of a commit reference.
@param string $org
@param string $repo
@param string $hash
@return array[] | [
"Gets",
"the",
"status",
"of",
"a",
"commit",
"reference",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/ThirdParty/Github/GitHubAdapter.php#L473-L478 |
191,588 | gushphp/gush | src/Helper/GitConfigHelper.php | GitConfigHelper.ensureRemoteExists | public function ensureRemoteExists($org, $repo)
{
$adapter = $this->application->getAdapter();
$pushUrl = $adapter->getRepositoryInfo($org, $repo)['push_url'];
if (!$this->remoteExists($org, $pushUrl)) {
$this->getHelperSet()->get('gush_style')->note(
sprintf('Ad... | php | public function ensureRemoteExists($org, $repo)
{
$adapter = $this->application->getAdapter();
$pushUrl = $adapter->getRepositoryInfo($org, $repo)['push_url'];
if (!$this->remoteExists($org, $pushUrl)) {
$this->getHelperSet()->get('gush_style')->note(
sprintf('Ad... | [
"public",
"function",
"ensureRemoteExists",
"(",
"$",
"org",
",",
"$",
"repo",
")",
"{",
"$",
"adapter",
"=",
"$",
"this",
"->",
"application",
"->",
"getAdapter",
"(",
")",
";",
"$",
"pushUrl",
"=",
"$",
"adapter",
"->",
"getRepositoryInfo",
"(",
"$",
... | Ensure the remote exist for the org and repo.
@param string $org
@param string $repo | [
"Ensure",
"the",
"remote",
"exist",
"for",
"the",
"org",
"and",
"repo",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/GitConfigHelper.php#L157-L169 |
191,589 | gushphp/gush | src/Helper/GitConfigHelper.php | GitConfigHelper.ensureNotesFetching | public function ensureNotesFetching($remote)
{
$fetches = StringUtil::splitLines(
$this->getGitConfig('remote.'.$remote.'.fetch', 'local', true)
);
if (!in_array('+refs/notes/*:refs/notes/*', $fetches, true)) {
$this->getHelperSet()->get('gush_style')->note(
... | php | public function ensureNotesFetching($remote)
{
$fetches = StringUtil::splitLines(
$this->getGitConfig('remote.'.$remote.'.fetch', 'local', true)
);
if (!in_array('+refs/notes/*:refs/notes/*', $fetches, true)) {
$this->getHelperSet()->get('gush_style')->note(
... | [
"public",
"function",
"ensureNotesFetching",
"(",
"$",
"remote",
")",
"{",
"$",
"fetches",
"=",
"StringUtil",
"::",
"splitLines",
"(",
"$",
"this",
"->",
"getGitConfig",
"(",
"'remote.'",
".",
"$",
"remote",
".",
"'.fetch'",
",",
"'local'",
",",
"true",
")... | Ensures the fetching of notes is configured for the remote.
@param string $remote | [
"Ensures",
"the",
"fetching",
"of",
"notes",
"is",
"configured",
"for",
"the",
"remote",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/GitConfigHelper.php#L176-L191 |
191,590 | gushphp/gush | src/Helper/TextHelper.php | TextHelper.truncate | public function truncate($string, $length, $alignment = null, $delimString = null)
{
$alignment = $alignment === null ? 'left' : $alignment;
$delimString = $delimString === null ? '...' : $delimString;
$delimLen = strlen($delimString);
if (!in_array($alignment, ['left', 'right'], tr... | php | public function truncate($string, $length, $alignment = null, $delimString = null)
{
$alignment = $alignment === null ? 'left' : $alignment;
$delimString = $delimString === null ? '...' : $delimString;
$delimLen = strlen($delimString);
if (!in_array($alignment, ['left', 'right'], tr... | [
"public",
"function",
"truncate",
"(",
"$",
"string",
",",
"$",
"length",
",",
"$",
"alignment",
"=",
"null",
",",
"$",
"delimString",
"=",
"null",
")",
"{",
"$",
"alignment",
"=",
"$",
"alignment",
"===",
"null",
"?",
"'left'",
":",
"$",
"alignment",
... | Truncates a string.
@param string $string
@param int $length
@param string $alignment - one of "left", "right". default left
@param string $delimString - string to use to mark the truncation
@throws \InvalidArgumentException
@return string | [
"Truncates",
"a",
"string",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/TextHelper.php#L38-L70 |
191,591 | nimmneun/onesheet | src/OneSheet/Sheet.php | Sheet.setFixedColumnWidths | public function setFixedColumnWidths(array $columnWidths)
{
if ($columnWidths !== array_filter($columnWidths, 'is_numeric')
|| array_keys($columnWidths) !== array_filter(array_keys($columnWidths), 'is_int')
) {
throw new \InvalidArgumentException('Array must contain integer k... | php | public function setFixedColumnWidths(array $columnWidths)
{
if ($columnWidths !== array_filter($columnWidths, 'is_numeric')
|| array_keys($columnWidths) !== array_filter(array_keys($columnWidths), 'is_int')
) {
throw new \InvalidArgumentException('Array must contain integer k... | [
"public",
"function",
"setFixedColumnWidths",
"(",
"array",
"$",
"columnWidths",
")",
"{",
"if",
"(",
"$",
"columnWidths",
"!==",
"array_filter",
"(",
"$",
"columnWidths",
",",
"'is_numeric'",
")",
"||",
"array_keys",
"(",
"$",
"columnWidths",
")",
"!==",
"arr... | Set custom column widths with 0 representing the first column.
@param array $columnWidths
@throws \InvalidArgumentException | [
"Set",
"custom",
"column",
"widths",
"with",
"0",
"representing",
"the",
"first",
"column",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Sheet.php#L111-L120 |
191,592 | nimmneun/onesheet | src/OneSheet/Sheet.php | Sheet.getColumnWidths | public function getColumnWidths()
{
foreach ($this->columnWidths as $column => $width) {
if ($width > $this->maxColumnWidth) {
$this->columnWidths[$column] = $this->maxColumnWidth;
} elseif ($width < $this->minColumnWidth) {
$this->columnWidths[$column... | php | public function getColumnWidths()
{
foreach ($this->columnWidths as $column => $width) {
if ($width > $this->maxColumnWidth) {
$this->columnWidths[$column] = $this->maxColumnWidth;
} elseif ($width < $this->minColumnWidth) {
$this->columnWidths[$column... | [
"public",
"function",
"getColumnWidths",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"columnWidths",
"as",
"$",
"column",
"=>",
"$",
"width",
")",
"{",
"if",
"(",
"$",
"width",
">",
"$",
"this",
"->",
"maxColumnWidth",
")",
"{",
"$",
"this",
"-... | Return array containing all column widths, limited to min or max
column width, if one or both of them are set.
@return array | [
"Return",
"array",
"containing",
"all",
"column",
"widths",
"limited",
"to",
"min",
"or",
"max",
"column",
"width",
"if",
"one",
"or",
"both",
"of",
"them",
"are",
"set",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Sheet.php#L140-L151 |
191,593 | nimmneun/onesheet | src/OneSheet/Sheet.php | Sheet.addRow | public function addRow(array $row, Style $style)
{
$columnCount = count($row);
$this->updateMaxColumnCount($columnCount);
$cellXml = $this->getCellXml($row, $style);
return $this->getRowXml($columnCount, $cellXml);
} | php | public function addRow(array $row, Style $style)
{
$columnCount = count($row);
$this->updateMaxColumnCount($columnCount);
$cellXml = $this->getCellXml($row, $style);
return $this->getRowXml($columnCount, $cellXml);
} | [
"public",
"function",
"addRow",
"(",
"array",
"$",
"row",
",",
"Style",
"$",
"style",
")",
"{",
"$",
"columnCount",
"=",
"count",
"(",
"$",
"row",
")",
";",
"$",
"this",
"->",
"updateMaxColumnCount",
"(",
"$",
"columnCount",
")",
";",
"$",
"cellXml",
... | Add single row and style to sheet.
@param array $row
@param Style $style
@return string | [
"Add",
"single",
"row",
"and",
"style",
"to",
"sheet",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Sheet.php#L161-L168 |
191,594 | nimmneun/onesheet | src/OneSheet/Sheet.php | Sheet.getRowXml | private function getRowXml($columnCount, $cellXml)
{
return sprintf(RowXml::DEFAULT_XML, $this->rowIndex++, $columnCount, $cellXml);
} | php | private function getRowXml($columnCount, $cellXml)
{
return sprintf(RowXml::DEFAULT_XML, $this->rowIndex++, $columnCount, $cellXml);
} | [
"private",
"function",
"getRowXml",
"(",
"$",
"columnCount",
",",
"$",
"cellXml",
")",
"{",
"return",
"sprintf",
"(",
"RowXml",
"::",
"DEFAULT_XML",
",",
"$",
"this",
"->",
"rowIndex",
"++",
",",
"$",
"columnCount",
",",
"$",
"cellXml",
")",
";",
"}"
] | Build and return xml string for single row.
@param int $columnCount
@param string $cellXml
@return string | [
"Build",
"and",
"return",
"xml",
"string",
"for",
"single",
"row",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Sheet.php#L189-L192 |
191,595 | nimmneun/onesheet | src/OneSheet/Sheet.php | Sheet.getCellXml | private function getCellXml(array $row, Style $style)
{
$cellXml = '';
foreach (array_values($row) as $cellIndex => $cellValue) {
$this->updateColumnWidths($cellValue, $cellIndex, $style->getFont());
$cellXml .= $this->cellBuilder->build(
$this->rowIndex, $cel... | php | private function getCellXml(array $row, Style $style)
{
$cellXml = '';
foreach (array_values($row) as $cellIndex => $cellValue) {
$this->updateColumnWidths($cellValue, $cellIndex, $style->getFont());
$cellXml .= $this->cellBuilder->build(
$this->rowIndex, $cel... | [
"private",
"function",
"getCellXml",
"(",
"array",
"$",
"row",
",",
"Style",
"$",
"style",
")",
"{",
"$",
"cellXml",
"=",
"''",
";",
"foreach",
"(",
"array_values",
"(",
"$",
"row",
")",
"as",
"$",
"cellIndex",
"=>",
"$",
"cellValue",
")",
"{",
"$",
... | Build and return xml string for single cell and update cell widths.
@param array $row
@param Style $style
@return string | [
"Build",
"and",
"return",
"xml",
"string",
"for",
"single",
"cell",
"and",
"update",
"cell",
"widths",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Sheet.php#L201-L212 |
191,596 | nimmneun/onesheet | src/OneSheet/Sheet.php | Sheet.updateColumnWidths | private function updateColumnWidths($value, $cellIndex, Font $font)
{
if ($this->useCellAutosizing) {
$cellWidth = $this->sizeCalculator->getCellWidth($font->getName(), $font->getSize(), $value);
if (!isset($this->columnWidths[$cellIndex])
|| $this->columnWidths[$cell... | php | private function updateColumnWidths($value, $cellIndex, Font $font)
{
if ($this->useCellAutosizing) {
$cellWidth = $this->sizeCalculator->getCellWidth($font->getName(), $font->getSize(), $value);
if (!isset($this->columnWidths[$cellIndex])
|| $this->columnWidths[$cell... | [
"private",
"function",
"updateColumnWidths",
"(",
"$",
"value",
",",
"$",
"cellIndex",
",",
"Font",
"$",
"font",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"useCellAutosizing",
")",
"{",
"$",
"cellWidth",
"=",
"$",
"this",
"->",
"sizeCalculator",
"->",
"get... | Track cell width for column width sizing if its enabled.
@param mixed $value
@param int $cellIndex
@param Font $font | [
"Track",
"cell",
"width",
"for",
"column",
"width",
"sizing",
"if",
"its",
"enabled",
"."
] | 2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32 | https://github.com/nimmneun/onesheet/blob/2a6fa19c8d2f35fffb52c1a42ebcf333bc909a32/src/OneSheet/Sheet.php#L221-L231 |
191,597 | pravednik/xmlBundle | Model/XmlAbstract.php | XmlAbstract.isXml | public function isXml($xmlString)
{
$previousValue = libxml_use_internal_errors(true);
$simpleXml = simplexml_load_string($xmlString);
libxml_use_internal_errors($previousValue);
return false !== $simpleXml;
} | php | public function isXml($xmlString)
{
$previousValue = libxml_use_internal_errors(true);
$simpleXml = simplexml_load_string($xmlString);
libxml_use_internal_errors($previousValue);
return false !== $simpleXml;
} | [
"public",
"function",
"isXml",
"(",
"$",
"xmlString",
")",
"{",
"$",
"previousValue",
"=",
"libxml_use_internal_errors",
"(",
"true",
")",
";",
"$",
"simpleXml",
"=",
"simplexml_load_string",
"(",
"$",
"xmlString",
")",
";",
"libxml_use_internal_errors",
"(",
"$... | Checks XML string for validity
@param string $xmlString
@return boolean | [
"Checks",
"XML",
"string",
"for",
"validity"
] | fa3a0852097209eb6840ef01224b4ddb004790b5 | https://github.com/pravednik/xmlBundle/blob/fa3a0852097209eb6840ef01224b4ddb004790b5/Model/XmlAbstract.php#L25-L34 |
191,598 | pravednik/xmlBundle | Model/XmlAbstract.php | XmlAbstract.removeAnnouncement | public function removeAnnouncement($xmlString)
{
$matches = [];
preg_match('/<?xml version="(.*)" encoding="(.*)"?>(.*)$/isuU', $xmlString, $matches);
return isset($matches[3]) ? $matches[3] : $xmlString;
} | php | public function removeAnnouncement($xmlString)
{
$matches = [];
preg_match('/<?xml version="(.*)" encoding="(.*)"?>(.*)$/isuU', $xmlString, $matches);
return isset($matches[3]) ? $matches[3] : $xmlString;
} | [
"public",
"function",
"removeAnnouncement",
"(",
"$",
"xmlString",
")",
"{",
"$",
"matches",
"=",
"[",
"]",
";",
"preg_match",
"(",
"'/<?xml version=\"(.*)\" encoding=\"(.*)\"?>(.*)$/isuU'",
",",
"$",
"xmlString",
",",
"$",
"matches",
")",
";",
"return",
"isset",
... | Removes XML declaration
@param string $xmlString
@return string | [
"Removes",
"XML",
"declaration"
] | fa3a0852097209eb6840ef01224b4ddb004790b5 | https://github.com/pravednik/xmlBundle/blob/fa3a0852097209eb6840ef01224b4ddb004790b5/Model/XmlAbstract.php#L43-L50 |
191,599 | gushphp/gush | src/Helper/TableHelper.php | TableHelper.setLayout | public function setLayout($layout)
{
if (is_string($layout)) {
$layout = constant('Gush\Helper\TableHelper::LAYOUT_'.strtoupper($layout));
}
switch ($layout) {
case self::LAYOUT_BORDERLESS:
$this->table->setStyle('borderless');
break;
... | php | public function setLayout($layout)
{
if (is_string($layout)) {
$layout = constant('Gush\Helper\TableHelper::LAYOUT_'.strtoupper($layout));
}
switch ($layout) {
case self::LAYOUT_BORDERLESS:
$this->table->setStyle('borderless');
break;
... | [
"public",
"function",
"setLayout",
"(",
"$",
"layout",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"layout",
")",
")",
"{",
"$",
"layout",
"=",
"constant",
"(",
"'Gush\\Helper\\TableHelper::LAYOUT_'",
".",
"strtoupper",
"(",
"$",
"layout",
")",
")",
";",
... | Sets table layout type.
@param int $layout self::LAYOUT_*
@throws \InvalidArgumentException
@return TableHelper | [
"Sets",
"table",
"layout",
"type",
"."
] | 957940ac27c1734e112c4b1b3cbc905a2c97e701 | https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Helper/TableHelper.php#L76-L114 |
Subsets and Splits
Yii Code Samples
Gathers all records from test, train, and validation sets that contain the word 'yii', providing a basic filtered view of the dataset relevant to Yii-related content.