_id stringlengths 2 7 | title stringlengths 3 151 | partition stringclasses 3
values | text stringlengths 33 8k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q16700 | OraclePlatform.getDropAutoincrementSql | train | public function getDropAutoincrementSql($table)
{
$table = $this->normalizeIdentifier($table);
$autoincrementIdentifierName = $this->getAutoincrementIdentifierName($table);
$identitySequenceName = $this->getIdentitySequenceName(
| php | {
"resource": ""
} |
q16701 | OraclePlatform.normalizeIdentifier | train | private function normalizeIdentifier($name)
{
$identifier = new Identifier($name);
| php | {
"resource": ""
} |
q16702 | OraclePlatform.getAutoincrementIdentifierName | train | private function getAutoincrementIdentifierName(Identifier $table)
{
$identifierName = $table->getName() . '_AI_PK';
return $table->isQuoted()
| php | {
"resource": ""
} |
q16703 | Table.setPrimaryKey | train | public function setPrimaryKey(array $columnNames, $indexName = false)
{
$this->_addIndex($this->_createIndex($columnNames, $indexName ?: 'primary', | php | {
"resource": ""
} |
q16704 | Table.columnsAreIndexed | train | public function columnsAreIndexed(array $columnNames)
{
foreach ($this->getIndexes() as $index) {
/** @var $index Index */
| php | {
"resource": ""
} |
q16705 | Table.changeColumn | train | public function changeColumn($columnName, array $options)
{
$column = $this->getColumn($columnName);
| php | {
"resource": ""
} |
q16706 | Table.dropColumn | train | public function dropColumn($columnName)
{
$columnName = $this->normalizeIdentifier($columnName); | php | {
"resource": ""
} |
q16707 | Table.addNamedForeignKeyConstraint | train | public function addNamedForeignKeyConstraint($name, $foreignTable, array $localColumnNames, array $foreignColumnNames, array $options = [])
{
if ($foreignTable instanceof Table) {
foreach ($foreignColumnNames as $columnName) {
if (! $foreignTable->hasColumn($columnName)) {
... | php | {
"resource": ""
} |
q16708 | Table.hasForeignKey | train | public function hasForeignKey($constraintName)
{
$constraintName = $this->normalizeIdentifier($constraintName);
| php | {
"resource": ""
} |
q16709 | Table.getForeignKey | train | public function getForeignKey($constraintName)
{
$constraintName = $this->normalizeIdentifier($constraintName);
if (! $this->hasForeignKey($constraintName)) | php | {
"resource": ""
} |
q16710 | Table.getForeignKeyColumns | train | private function getForeignKeyColumns()
{
$foreignKeyColumns = [];
foreach ($this->getForeignKeys() as $foreignKey) | php | {
"resource": ""
} |
q16711 | Table.filterColumns | train | private function filterColumns(array $columnNames)
{
return array_filter($this->_columns, static function ($columnName) use ($columnNames) {
| php | {
"resource": ""
} |
q16712 | Table.hasColumn | train | public function hasColumn($columnName)
{
$columnName = $this->normalizeIdentifier($columnName);
| php | {
"resource": ""
} |
q16713 | Table.getColumn | train | public function getColumn($columnName)
{
$columnName = $this->normalizeIdentifier($columnName);
if (! $this->hasColumn($columnName)) | php | {
"resource": ""
} |
q16714 | Table.getPrimaryKeyColumns | train | public function getPrimaryKeyColumns()
{
$primaryKey = $this->getPrimaryKey();
if ($primaryKey === null) {
throw new DBALException('Table | php | {
"resource": ""
} |
q16715 | Table.hasIndex | train | public function hasIndex($indexName)
{
$indexName = $this->normalizeIdentifier($indexName);
| php | {
"resource": ""
} |
q16716 | Table.getIndex | train | public function getIndex($indexName)
{
$indexName = $this->normalizeIdentifier($indexName);
if (! $this->hasIndex($indexName)) | php | {
"resource": ""
} |
q16717 | Sequence.isAutoIncrementsFor | train | public function isAutoIncrementsFor(Table $table)
{
$primaryKey = $table->getPrimaryKey();
if ($primaryKey === null) {
return false;
}
$pkColumns = $primaryKey->getColumns();
if (count($pkColumns) !== 1) {
return false;
}
$column = ... | php | {
"resource": ""
} |
q16718 | MysqliConnection.setDriverOptions | train | private function setDriverOptions(array $driverOptions = [])
{
$supportedDriverOptions = [
MYSQLI_OPT_CONNECT_TIMEOUT,
MYSQLI_OPT_LOCAL_INFILE,
MYSQLI_INIT_COMMAND,
MYSQLI_READ_DEFAULT_FILE,
MYSQLI_READ_DEFAULT_GROUP,
];
if (define... | php | {
"resource": ""
} |
q16719 | MysqliConnection.setSecureConnection | train | private function setSecureConnection(array $params)
{
if (! isset($params['ssl_key']) &&
! isset($params['ssl_cert']) &&
! isset($params['ssl_ca']) &&
! isset($params['ssl_capath']) &&
! isset($params['ssl_cipher'])
) {
return;
}
... | php | {
"resource": ""
} |
q16720 | AbstractSchemaManager.tryMethod | train | public function tryMethod()
{
$args = func_get_args();
$method = $args[0];
unset($args[0]);
$args = array_values($args);
$callback = [$this, $method];
assert(is_callable($callback));
try {
| php | {
"resource": ""
} |
q16721 | AbstractSchemaManager.listDatabases | train | public function listDatabases()
{
$sql = $this->_platform->getListDatabasesSQL();
| php | {
"resource": ""
} |
q16722 | AbstractSchemaManager.listNamespaceNames | train | public function listNamespaceNames()
{
$sql = $this->_platform->getListNamespacesSQL();
| php | {
"resource": ""
} |
q16723 | AbstractSchemaManager.listSequences | train | public function listSequences($database = null)
{
if ($database === null) {
$database = $this->_conn->getDatabase();
}
$sql = $this->_platform->getListSequencesSQL($database);
| php | {
"resource": ""
} |
q16724 | AbstractSchemaManager.listTableColumns | train | public function listTableColumns($table, $database = null)
{
if (! $database) {
$database = $this->_conn->getDatabase();
}
$sql = $this->_platform->getListTableColumnsSQL($table, $database);
| php | {
"resource": ""
} |
q16725 | AbstractSchemaManager.tablesExist | train | public function tablesExist($tableNames)
{
$tableNames = array_map('strtolower', (array) $tableNames);
| php | {
"resource": ""
} |
q16726 | AbstractSchemaManager.listTableNames | train | public function listTableNames()
{
$sql = $this->_platform->getListTablesSQL();
$tables | php | {
"resource": ""
} |
q16727 | AbstractSchemaManager.filterAssetNames | train | protected function filterAssetNames($assetNames)
{
$filter = $this->_conn->getConfiguration()->getSchemaAssetsFilter();
if (! $filter) {
| php | {
"resource": ""
} |
q16728 | AbstractSchemaManager.listViews | train | public function listViews()
{
$database = $this->_conn->getDatabase();
$sql = $this->_platform->getListViewsSQL($database);
$views | php | {
"resource": ""
} |
q16729 | AbstractSchemaManager.dropIndex | train | public function dropIndex($index, $table)
{
if ($index instanceof Index) {
$index = $index->getQuotedName($this->_platform);
}
| php | {
"resource": ""
} |
q16730 | AbstractSchemaManager.dropConstraint | train | public function dropConstraint(Constraint $constraint, $table)
{
| php | {
"resource": ""
} |
q16731 | AbstractSchemaManager.dropForeignKey | train | public function dropForeignKey($foreignKey, $table)
{
| php | {
"resource": ""
} |
q16732 | AbstractSchemaManager.createConstraint | train | public function createConstraint(Constraint $constraint, $table)
{
| php | {
"resource": ""
} |
q16733 | AbstractSchemaManager.createIndex | train | public function createIndex(Index $index, $table)
{ | php | {
"resource": ""
} |
q16734 | AbstractSchemaManager.createForeignKey | train | public function createForeignKey(ForeignKeyConstraint $foreignKey, $table)
{
| php | {
"resource": ""
} |
q16735 | AbstractSchemaManager.createView | train | public function createView(View $view)
{
$this->_execSql($this->_platform->getCreateViewSQL | php | {
"resource": ""
} |
q16736 | AbstractSchemaManager.dropAndCreateConstraint | train | public function dropAndCreateConstraint(Constraint $constraint, $table)
{
| php | {
"resource": ""
} |
q16737 | AbstractSchemaManager.dropAndCreateIndex | train | public function dropAndCreateIndex(Index $index, $table)
{
$this->tryMethod('dropIndex', | php | {
"resource": ""
} |
q16738 | AbstractSchemaManager.dropAndCreateForeignKey | train | public function dropAndCreateForeignKey(ForeignKeyConstraint $foreignKey, $table)
{
| php | {
"resource": ""
} |
q16739 | AbstractSchemaManager.dropAndCreateSequence | train | public function dropAndCreateSequence(Sequence $sequence)
{
$this->tryMethod('dropSequence', | php | {
"resource": ""
} |
q16740 | AbstractSchemaManager.dropAndCreateTable | train | public function dropAndCreateTable(Table $table)
{
$this->tryMethod('dropTable', | php | {
"resource": ""
} |
q16741 | AbstractSchemaManager.dropAndCreateView | train | public function dropAndCreateView(View $view)
{
$this->tryMethod('dropView', | php | {
"resource": ""
} |
q16742 | AbstractSchemaManager.alterTable | train | public function alterTable(TableDiff $tableDiff)
{
$queries = $this->_platform->getAlterTableSQL($tableDiff);
if (! is_array($queries) || ! count($queries)) {
return;
} | php | {
"resource": ""
} |
q16743 | AbstractSchemaManager.renameTable | train | public function renameTable($name, $newName)
{
$tableDiff | php | {
"resource": ""
} |
q16744 | AbstractSchemaManager._getPortableTableColumnList | train | protected function _getPortableTableColumnList($table, $database, $tableColumns)
{
$eventManager = $this->_platform->getEventManager();
$list = [];
foreach ($tableColumns as $tableColumn) {
$column = null;
$defaultPrevented = false;
if ($eventM... | php | {
"resource": ""
} |
q16745 | AbstractSchemaManager._getPortableTableIndexesList | train | protected function _getPortableTableIndexesList($tableIndexRows, $tableName = null)
{
$result = [];
foreach ($tableIndexRows as $tableIndex) {
$indexName = $keyName = $tableIndex['key_name'];
if ($tableIndex['primary']) {
$keyName = 'primary';
}
... | php | {
"resource": ""
} |
q16746 | AbstractSchemaManager.createSchema | train | public function createSchema()
{
$namespaces = [];
if ($this->_platform->supportsSchemas()) {
$namespaces = $this->listNamespaceNames();
}
$sequences = [];
if ($this->_platform->supportsSequences()) {
$sequences = $this->listSequences(); | php | {
"resource": ""
} |
q16747 | AbstractSchemaManager.createSchemaConfig | train | public function createSchemaConfig()
{
$schemaConfig = new SchemaConfig();
$schemaConfig->setMaxIdentifierLength($this->_platform->getMaxIdentifierLength());
$searchPaths = $this->getSchemaSearchPaths();
if (isset($searchPaths[0])) {
$schemaConfig->setName($searchPaths[0... | php | {
"resource": ""
} |
q16748 | AbstractSchemaManager.extractDoctrineTypeFromComment | train | public function extractDoctrineTypeFromComment($comment, $currentType)
{
if ($comment !== | php | {
"resource": ""
} |
q16749 | Driver.buildDsn | train | private function buildDsn($host, $port, $server, $dbname, $username = null, $password = null, array $driverOptions = [])
{
$host = $host ?: 'localhost';
$port = $port ?: 2638;
if (! empty($server)) {
$server = ';ServerName=' . $server;
}
return 'HOST=' . $host .... | php | {
"resource": ""
} |
q16750 | Type.getTypesMap | train | public static function getTypesMap()
{
return array_map(
static function (Type $type) : string {
| php | {
"resource": ""
} |
q16751 | Driver._constructPdoDsn | train | private function _constructPdoDsn(array $params, array $connectionOptions)
{
$dsn = 'sqlsrv:server=';
if (isset($params['host'])) {
$dsn .= $params['host'];
}
if (isset($params['port']) && ! empty($params['port'])) {
$dsn .= ',' . $params['port'];
}
... | php | {
"resource": ""
} |
q16752 | Driver.getConnectionOptionsDsn | train | private function getConnectionOptionsDsn(array $connectionOptions) : string
{
$connectionOptionsDsn = '';
foreach ($connectionOptions as $paramName => $paramValue) {
| php | {
"resource": ""
} |
q16753 | Driver._constructPdoDsn | train | private function _constructPdoDsn(array $params)
{
$dsn = 'pgsql:';
if (isset($params['host']) && $params['host'] !== '') {
$dsn .= 'host=' . $params['host'] . ';';
}
if (isset($params['port']) && $params['port'] !== '') {
$dsn .= 'port=' . $params['port'] .... | php | {
"resource": ""
} |
q16754 | QueryCacheProfile.generateCacheKeys | train | public function generateCacheKeys($query, $params, $types, array $connectionParams = [])
{
$realCacheKey = 'query=' . $query .
'¶ms=' . serialize($params) .
'&types=' . serialize($types) .
'&connectionParams=' . hash('sha256', serialize($connectionParams));
/... | php | {
"resource": ""
} |
q16755 | MysqliStatement.bindTypedParameters | train | private function bindTypedParameters()
{
$streams = $values = [];
$types = $this->types;
foreach ($this->_bindedValues as $parameter => $value) {
if (! isset($types[$parameter - 1])) {
$types[$parameter - 1] = static::$_paramTypeMap[ParameterType::STRING];
... | php | {
"resource": ""
} |
q16756 | MysqliStatement.bindUntypedValues | train | private function bindUntypedValues(array $values)
{
$params = [];
$types = str_repeat('s', count($values));
foreach ($values as &$v) {
| php | {
"resource": ""
} |
q16757 | SQLAnywhereException.fromSQLAnywhereError | train | public static function fromSQLAnywhereError($conn = null, $stmt = null)
{
$state = $conn ? sasql_sqlstate($conn) : sasql_sqlstate();
$code = null;
$message = null;
/**
* Try retrieving the last error from statement resource if given
*/
if ($stmt) {
... | php | {
"resource": ""
} |
q16758 | AbstractAsset._setName | train | protected function _setName($name)
{
if ($this->isIdentifierQuoted($name)) {
$this->_quoted = true;
$name = $this->trimQuotes($name);
}
if (strpos($name, '.') !== false) {
$parts | php | {
"resource": ""
} |
q16759 | AbstractAsset.getQuotedName | train | public function getQuotedName(AbstractPlatform $platform)
{
$keywords = $platform->getReservedKeywordsList();
$parts = explode('.', $this->getName());
| php | {
"resource": ""
} |
q16760 | AbstractAsset._generateIdentifierName | train | protected function _generateIdentifierName($columnNames, $prefix = '', $maxSize = 30)
{
$hash = implode('', array_map(static function ($column) {
return dechex(crc32($column));
| php | {
"resource": ""
} |
q16761 | TableGenerator.nextValue | train | public function nextValue($sequenceName)
{
if (isset($this->sequences[$sequenceName])) {
$value = $this->sequences[$sequenceName]['value'];
$this->sequences[$sequenceName]['value']++;
if ($this->sequences[$sequenceName]['value'] >= $this->sequences[$sequenceName]['max']) ... | php | {
"resource": ""
} |
q16762 | SQLServerPlatform.getCreateColumnCommentSQL | train | protected function getCreateColumnCommentSQL($tableName, $columnName, $comment)
{
if (strpos($tableName, '.') !== false) {
[$schemaSQL, $tableSQL] = explode('.', $tableName);
$schemaSQL = $this->quoteStringLiteral($schemaSQL);
$tableSQL = $this-... | php | {
"resource": ""
} |
q16763 | SQLServerPlatform.getDefaultConstraintDeclarationSQL | train | public function getDefaultConstraintDeclarationSQL($table, array $column)
{
if (! isset($column['default'])) {
throw new InvalidArgumentException("Incomplete column definition. 'default' required.");
}
$columnName = new Identifier($column['name']);
return ' CONSTRAINT ' | php | {
"resource": ""
} |
q16764 | SQLServerPlatform._appendUniqueConstraintDefinition | train | private function _appendUniqueConstraintDefinition($sql, Index $index)
{
$fields = [];
foreach ($index->getQuotedColumns($this) as $field) {
$fields[] = | php | {
"resource": ""
} |
q16765 | SQLServerPlatform.getAlterTableAddDefaultConstraintClause | train | private function getAlterTableAddDefaultConstraintClause($tableName, Column $column)
{
$columnDef = $column->toArray();
$columnDef['name'] = $column->getQuotedName($this);
| php | {
"resource": ""
} |
q16766 | SQLServerPlatform.alterColumnRequiresDropDefaultConstraint | train | private function alterColumnRequiresDropDefaultConstraint(ColumnDiff $columnDiff)
{
// We can only decide whether to drop an existing default constraint
// if we know the original default value.
if (! $columnDiff->fromColumn instanceof Column) {
return false;
}
/... | php | {
"resource": ""
} |
q16767 | SQLServerPlatform.getAlterColumnCommentSQL | train | protected function getAlterColumnCommentSQL($tableName, $columnName, $comment)
{
if (strpos($tableName, '.') !== false) {
[$schemaSQL, $tableSQL] = explode('.', $tableName);
$schemaSQL = $this->quoteStringLiteral($schemaSQL);
$tableSQL = $this->... | php | {
"resource": ""
} |
q16768 | SQLServerPlatform.getDropColumnCommentSQL | train | protected function getDropColumnCommentSQL($tableName, $columnName)
{
if (strpos($tableName, '.') !== false) {
[$schemaSQL, $tableSQL] = explode('.', $tableName);
$schemaSQL = $this->quoteStringLiteral($schemaSQL);
$tableSQL = $this->quoteString... | php | {
"resource": ""
} |
q16769 | SQLServerPlatform.getAddExtendedPropertySQL | train | public function getAddExtendedPropertySQL(
$name,
$value = null,
$level0Type = null,
$level0Name = null,
$level1Type = null,
$level1Name = null,
$level2Type = null,
$level2Name = null
) {
return 'EXEC sp_addextendedproperty ' .
'N' ... | php | {
"resource": ""
} |
q16770 | SQLServerPlatform.getDropExtendedPropertySQL | train | public function getDropExtendedPropertySQL(
$name,
$level0Type = null,
$level0Name = null,
$level1Type = null,
$level1Name = null,
$level2Type = null,
$level2Name = null
) {
return 'EXEC sp_dropextendedproperty ' .
'N' . $this->quoteStringL... | php | {
"resource": ""
} |
q16771 | SQLServerPlatform.getTableWhereClause | train | private function getTableWhereClause($table, $schemaColumn, $tableColumn)
{
if (strpos($table, '.') !== false) {
[$schema, $table] = explode('.', $table);
$schema = $this->quoteStringLiteral($schema);
$table = $this->quoteStringLiteral($table);
... | php | {
"resource": ""
} |
q16772 | SQLServerPlatform.isOrderByInTopNSubquery | train | private function isOrderByInTopNSubquery($query, $currentPosition)
{
// Grab query text on the same nesting level as the ORDER BY clause we're examining.
$subQueryBuffer = '';
$parenCount = 0;
// If $parenCount goes negative, we've exited the subquery we're examining.
//... | php | {
"resource": ""
} |
q16773 | SQLServerPlatform.generateIdentifierName | train | private function generateIdentifierName($identifier)
{
// Always generate name for unquoted identifiers to ensure consistency.
| php | {
"resource": ""
} |
q16774 | TypeRegistry.get | train | public function get(string $name) : Type
{
if (! isset($this->instances[$name])) {
| php | {
"resource": ""
} |
q16775 | TypeRegistry.lookupName | train | public function lookupName(Type $type) : string
{
$name = $this->findTypeName($type);
if ($name === null) {
| php | {
"resource": ""
} |
q16776 | TypeRegistry.register | train | public function register(string $name, Type $type) : void
{
if (isset($this->instances[$name])) {
throw DBALException::typeExists($name);
| php | {
"resource": ""
} |
q16777 | EasyConnectString.fromConnectionParameters | train | public static function fromConnectionParameters(array $params) : self
{
if (! empty($params['connectstring'])) {
return new self($params['connectstring']);
}
if (empty($params['host'])) {
return new self($params['dbname'] ?? '');
}
$connectData = [];... | php | {
"resource": ""
} |
q16778 | DBALException.formatParameters | train | private static function formatParameters(array $params)
{
return '[' . implode(', ', array_map(static function ($param) {
if (is_resource($param)) {
return (string) $param;
}
$json = @json_encode($param);
if (! is_string($json) || $json === '... | php | {
"resource": ""
} |
q16779 | PostgreSqlSchemaManager.getSchemaSearchPaths | train | public function getSchemaSearchPaths()
{
$params = $this->_conn->getParams();
$schema = explode(',', $this->_conn->fetchColumn('SHOW search_path'));
if (isset($params['user'])) {
| php | {
"resource": ""
} |
q16780 | PostgreSqlSchemaManager.determineExistingSchemaSearchPaths | train | public function determineExistingSchemaSearchPaths()
{
$names = $this->getSchemaNames();
$paths = $this->getSchemaSearchPaths();
| php | {
"resource": ""
} |
q16781 | Schema.hasNamespace | train | public function hasNamespace($namespaceName)
{
$namespaceName = strtolower($this->getUnquotedAssetName($namespaceName));
| php | {
"resource": ""
} |
q16782 | Schema.hasTable | train | public function hasTable($tableName)
{
$tableName = $this->getFullQualifiedAssetName($tableName); | php | {
"resource": ""
} |
q16783 | Schema.createNamespace | train | public function createNamespace($namespaceName)
{
$unquotedNamespaceName = strtolower($this->getUnquotedAssetName($namespaceName));
if (isset($this->namespaces[$unquotedNamespaceName])) {
| php | {
"resource": ""
} |
q16784 | Schema.dropTable | train | public function dropTable($tableName)
{
$tableName = $this->getFullQualifiedAssetName($tableName);
| php | {
"resource": ""
} |
q16785 | Schema.createSequence | train | public function createSequence($sequenceName, $allocationSize = 1, $initialValue = 1)
{
$seq = | php | {
"resource": ""
} |
q16786 | Schema.toSql | train | public function toSql(AbstractPlatform $platform)
{
$sqlCollector = new CreateSchemaSqlCollector($platform);
| php | {
"resource": ""
} |
q16787 | Schema.toDropSql | train | public function toDropSql(AbstractPlatform $platform)
{
$dropSqlCollector = new DropSchemaSqlCollector($platform);
| php | {
"resource": ""
} |
q16788 | PackageSelection.createStripHostsPatterns | train | private function createStripHostsPatterns($stripHostsConfig)
{
if (!is_array($stripHostsConfig)) {
return $stripHostsConfig;
}
$patterns = [];
foreach ($stripHostsConfig as $entry) {
if (!strlen($entry)) {
continue;
}
... | php | {
"resource": ""
} |
q16789 | PackageSelection.applyStripHosts | train | private function applyStripHosts()
{
if (false === $this->stripHosts) {
return;
}
foreach ($this->selected as $uniqueName => $package) {
$sources = [];
if ($package->getSourceType()) {
$sources[] = 'source';
}
if ... | php | {
"resource": ""
} |
q16790 | PackageSelection.matchStripHostsPatterns | train | private function matchStripHostsPatterns($url)
{
if (Filesystem::isLocalPath($url)) {
return true;
}
if (is_array($this->stripHosts)) {
$url = trim(parse_url($url, PHP_URL_HOST), '[]');
if (false !== filter_var($url, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)... | php | {
"resource": ""
} |
q16791 | PackageSelection.matchAddr | train | private function matchAddr($addr1, $addr2, $len = 0, $chunklen = 32)
{
for (; $len > 0; $len -= $chunklen, next($addr1), next($addr2)) {
$shift = $len >= $chunklen ? 0 : $chunklen - $len;
if | php | {
"resource": ""
} |
q16792 | PackageSelection.addRepositories | train | private function addRepositories(Pool $pool, array $repos)
{
foreach ($repos as $repo) {
try {
$pool->addRepository($repo);
} catch (\Exception $exception) {
if (!$this->skipErrors) {
throw $exception;
}
| php | {
"resource": ""
} |
q16793 | PackageSelection.setSelectedAsAbandoned | train | private function setSelectedAsAbandoned()
{
foreach ($this->selected as $name => $package) {
if (array_key_exists($package->getName(), $this->abandoned)) {
| php | {
"resource": ""
} |
q16794 | PackageSelection.getFilteredLinks | train | private function getFilteredLinks(Composer $composer)
{
$links = array_values($composer->getPackage()->getRequires());
// only pick up packages in our filter, if a filter has been set.
if ($this->hasFilterForPackages()) {
$packagesFilter = $this->packagesFilter;
$lin... | php | {
"resource": ""
} |
q16795 | PackageSelection.getAllLinks | train | private function getAllLinks($repos, $minimumStability, $verbose)
{
$links = [];
foreach ($repos as $repo) {
// collect links for composer repos with providers
if ($repo instanceof ComposerRepository && $repo->hasProviders()) {
foreach ($repo->getProviderName... | php | {
"resource": ""
} |
q16796 | PackageSelection.getDepRepos | train | private function getDepRepos(Composer $composer)
{
$depRepos = [];
if (\is_array($this->depRepositories)) {
$rm = $composer->getRepositoryManager();
foreach ($this->depRepositories as $index => $repoConfig) {
$name = \is_int($index) && isset($repoConfig['url']... | php | {
"resource": ""
} |
q16797 | PackageSelection.getPackages | train | private function getPackages(RepositoryInterface $repo)
{
$packages = [];
if ($this->hasFilterForPackages()) {
// apply package filter if defined
foreach ($this->packagesFilter as $filter) {
$packages += $repo->findPackages($filter);
| php | {
"resource": ""
} |
q16798 | PackageSelection.getRequired | train | private function getRequired(PackageInterface $package, bool $isRoot)
{
$required = [];
if ($this->requireDependencies) {
$required = $package->getRequires();
}
| php | {
"resource": ""
} |
q16799 | PackageSelection.filterRepositories | train | private function filterRepositories(array $repositories)
{
$url = $this->repositoryFilter;
return array_filter($repositories, function ($repository) use ($url) {
if (!($repository instanceof ConfigurableRepositoryInterface)) {
return false;
}
| php | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.