Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a couple of spelling mistakes #20318

Merged
merged 3 commits into from
Jan 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@ public function testGetCustomerAttributeMetadata()
$this->assertNotEmpty($attributes);

// remove odd extension attributes
$allAtrributes = $expectAttrsWithVals;
$allAtrributes['created_at'] = $attributes['created_at'];
$allAtrributes['updated_at'] = $attributes['updated_at'];
$attributes = array_intersect_key($attributes, $allAtrributes);
$allAttributes = $expectAttrsWithVals;
$allAttributes['created_at'] = $attributes['created_at'];
$allAttributes['updated_at'] = $attributes['updated_at'];
$attributes = array_intersect_key($attributes, $allAttributes);

foreach ($attributes as $attributeCode => $attributeValue) {
$this->assertNotNull($attributeCode);
Expand Down
50 changes: 33 additions & 17 deletions lib/internal/Magento/Framework/DB/Adapter/AdapterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Framework\DB\Adapter;

use Magento\Framework\DB\Ddl\Table;
Expand Down Expand Up @@ -365,6 +366,7 @@ public function getIndexList($tableName, $schemaName = null);

/**
* Add new Foreign Key to table
*
* If Foreign Key with same name is exist - it will be deleted
*
* @param string $fkName
Expand All @@ -373,7 +375,6 @@ public function getIndexList($tableName, $schemaName = null);
* @param string $refTableName
* @param string $refColumnName
* @param string $onDelete
* @param string $onUpdate
* @param boolean $purge trying remove invalid data
* @param string $schemaName
* @param string $refSchemaName
Expand Down Expand Up @@ -484,6 +485,7 @@ public function insert($table, array $bind);

/**
* Inserts a table row with specified data
*
* Special for Zero values to identity column
*
* @param string $table
Expand All @@ -502,50 +504,52 @@ public function insertForce($table, array $bind);
* If the $where parameter is an array of multiple clauses, they will be joined by AND, with each clause wrapped in
* parenthesis. If you wish to use an OR, you must give a single clause that is an instance of {@see Zend_Db_Expr}
*
* @param mixed $table The table to update.
* @param array $bind Column-value pairs.
* @param mixed $where UPDATE WHERE clause(s).
* @param mixed $table The table to update.
* @param array $bind Column-value pairs.
* @param mixed $where UPDATE WHERE clause(s).
* @return int The number of affected rows.
*/
public function update($table, array $bind, $where = '');

/**
* Deletes table rows based on a WHERE clause.
*
* @param mixed $table The table to update.
* @param mixed $where DELETE WHERE clause(s).
* @param mixed $table The table to update.
* @param mixed $where DELETE WHERE clause(s).
* @return int The number of affected rows.
*/
public function delete($table, $where = '');

/**
* Prepares and executes an SQL statement with bound data.
*
* @param mixed $sql The SQL statement with placeholders.
* @param mixed $sql The SQL statement with placeholders.
* May be a string or \Magento\Framework\DB\Select.
* @param mixed $bind An array of data or data itself to bind to the placeholders.
* @param mixed $bind An array of data or data itself to bind to the placeholders.
* @return \Zend_Db_Statement_Interface
*/
public function query($sql, $bind = []);

/**
* Fetches all SQL result rows as a sequential array.
*
* Uses the current fetchMode for the adapter.
*
* @param string|\Magento\Framework\DB\Select $sql An SQL SELECT statement.
* @param mixed $bind Data to bind into SELECT placeholders.
* @param mixed $fetchMode Override current fetch mode.
* @param string|\Magento\Framework\DB\Select $sql An SQL SELECT statement.
* @param mixed $bind Data to bind into SELECT placeholders.
* @param mixed $fetchMode Override current fetch mode.
* @return array
*/
public function fetchAll($sql, $bind = [], $fetchMode = null);

/**
* Fetches the first row of the SQL result.
*
* Uses the current fetchMode for the adapter.
*
* @param string|\Magento\Framework\DB\Select $sql An SQL SELECT statement.
* @param mixed $bind Data to bind into SELECT placeholders.
* @param mixed $fetchMode Override current fetch mode.
* @param mixed $fetchMode Override current fetch mode.
* @return array
*/
public function fetchRow($sql, $bind = [], $fetchMode = null);
Expand Down Expand Up @@ -622,9 +626,9 @@ public function quote($value, $type = null);
* // $safe = "WHERE date < '2005-01-02'"
* </code>
*
* @param string $text The text with a placeholder.
* @param mixed $value The value to quote.
* @param string $type OPTIONAL SQL datatype
* @param string $text The text with a placeholder.
* @param mixed $value The value to quote.
* @param string $type OPTIONAL SQL datatype
* @param integer $count OPTIONAL count of placeholders to replace
* @return string An SQL-safe quoted value placed into the original text.
*/
Expand All @@ -633,7 +637,7 @@ public function quoteInto($text, $value, $type = null, $count = null);
/**
* Quotes an identifier.
*
* Accepts a string representing a qualified indentifier. For Example:
* Accepts a string representing a qualified identifier. For Example:
* <code>
* $adapter->quoteIdentifier('myschema.mytable')
* </code>
Expand Down Expand Up @@ -721,7 +725,8 @@ public function disallowDdlCache();

/**
* Reset cached DDL data from cache
* if table name is null - reset all cached DDL data
*
* If table name is null - reset all cached DDL data
*
* @param string $tableName
* @param string $schemaName OPTIONAL
Expand All @@ -741,6 +746,7 @@ public function saveDdlCache($tableCacheKey, $ddlType, $data);

/**
* Load DDL data from cache
*
* Return false if cache does not exists
*
* @param string $tableCacheKey the table cache key
Expand Down Expand Up @@ -784,6 +790,7 @@ public function prepareSqlCondition($fieldName, $condition);

/**
* Prepare value for save in column
*
* Return converted to column data type value
*
* @param array $column the column describe array
Expand Down Expand Up @@ -813,6 +820,7 @@ public function getIfNullSql($expression, $value = 0);

/**
* Generate fragment of SQL, that combine together (concatenate) the results from data array
*
* All arguments in data must be quoted
*
* @param array $data
Expand All @@ -823,6 +831,7 @@ public function getConcatSql(array $data, $separator = null);

/**
* Generate fragment of SQL that returns length of character string
*
* The string argument must be quoted
*
* @param string $string
Expand Down Expand Up @@ -931,6 +940,7 @@ public function getDateExtractSql($date, $unit);

/**
* Retrieve valid table name
*
* Check table name length and allowed symbols
*
* @param string $tableName
Expand All @@ -950,6 +960,7 @@ public function getTriggerName($tableName, $time, $event);

/**
* Retrieve valid index name
*
* Check index name length and allowed symbols
*
* @param string $tableName
Expand All @@ -961,6 +972,7 @@ public function getIndexName($tableName, $fields, $indexType = '');

/**
* Retrieve valid foreign key name
*
* Check foreign key name length and allowed symbols
*
* @param string $priTableName
Expand Down Expand Up @@ -1047,6 +1059,7 @@ public function supportStraightJoin();

/**
* Adds order by random to select object
*
* Possible using integer field for optimization
*
* @param \Magento\Framework\DB\Select $select
Expand Down Expand Up @@ -1074,6 +1087,7 @@ public function getPrimaryKeyName($tableName, $schemaName = null);

/**
* Converts fetched blob into raw binary PHP data.
*
* Some DB drivers return blobs as hex-coded strings, so we need to process them.
*
* @param mixed $value
Expand Down Expand Up @@ -1114,6 +1128,8 @@ public function dropTrigger($triggerName, $schemaName = null);
public function getTables($likeCondition = null);

/**
* Generates case SQL fragment
*
* Generate fragment of SQL, that check value against multiple condition cases
* and return different result depends on them
*
Expand Down
2 changes: 1 addition & 1 deletion setup/src/Magento/Setup/Console/Command/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ protected function configure()
self::INPUT_KEY_INTERACTIVE_SETUP,
self::INPUT_KEY_INTERACTIVE_SETUP_SHORTCUT,
InputOption::VALUE_NONE,
'Interactive Magento instalation'
'Interactive Magento installation'
),
new InputOption(
OperationsExecutor::KEY_SAFE_MODE,
Expand Down