mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
commit
153f530a01
5 changed files with 44 additions and 46 deletions
|
@ -123,9 +123,9 @@ before_script:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}" > app/Config/database.php
|
}" > app/Config/database.php
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- sh -c "if [ '$PHPCS' = '1' ]; then phpcs -p --extensions=php --standard=CakePHP ./lib/Cake; elif [ '$DB' = 'mysql' ]; then ./lib/Cake/Console/cake test core AllTests --stderr; else ./lib/Cake/Console/cake test core AllDbRelated --stderr; fi"
|
- sh -c "if [ '$PHPCS' != '1' ]; then ./lib/Cake/Console/cake test core AllTests --stderr; fi"
|
||||||
|
- sh -c "if [ '$PHPCS' = '1' ]; then phpcs -p --extensions=php --standard=CakePHP ./lib/Cake; fi;"
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
|
|
@ -114,9 +114,7 @@ class AclNode extends Model {
|
||||||
$db->name("{$type}.lft") . ' <= ' . $db->name("{$type}{$i}.lft") . ' AND ' . $db->name("{$type}.rght") . ' >= ' . $db->name("{$type}{$i}.rght"))
|
$db->name("{$type}.lft") . ' <= ' . $db->name("{$type}{$i}.lft") . ' AND ' . $db->name("{$type}.rght") . ' >= ' . $db->name("{$type}{$i}.rght"))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$queryData['conditions'] = array_merge($queryData['conditions'], $conditionsAfterJoin);
|
$queryData['conditions'] = array_merge($queryData['conditions'], $conditionsAfterJoin);
|
||||||
|
|
||||||
$result = $db->read($this, $queryData, -1);
|
$result = $db->read($this, $queryData, -1);
|
||||||
$path = array_values($path);
|
$path = array_values($path);
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ class DataSource extends Object {
|
||||||
/**
|
/**
|
||||||
* Caches/returns cached results for child instances
|
* Caches/returns cached results for child instances
|
||||||
*
|
*
|
||||||
* @param mixed $data
|
* @param mixed $data Unused in this class.
|
||||||
* @return array Array of sources available in this datasource.
|
* @return array Array of sources available in this datasource.
|
||||||
*/
|
*/
|
||||||
public function listSources($data = null) {
|
public function listSources($data = null) {
|
||||||
|
@ -116,7 +116,7 @@ class DataSource extends Object {
|
||||||
/**
|
/**
|
||||||
* Returns a Model description (metadata) or null if none found.
|
* Returns a Model description (metadata) or null if none found.
|
||||||
*
|
*
|
||||||
* @param Model|string $model
|
* @param Model|string $model The model to describe.
|
||||||
* @return array Array of Metadata for the $model
|
* @return array Array of Metadata for the $model
|
||||||
*/
|
*/
|
||||||
public function describe($model) {
|
public function describe($model) {
|
||||||
|
@ -214,7 +214,7 @@ class DataSource extends Object {
|
||||||
* @param Model $Model Instance of the model class being updated
|
* @param Model $Model Instance of the model class being updated
|
||||||
* @param array $fields Array of fields to be updated
|
* @param array $fields Array of fields to be updated
|
||||||
* @param array $values Array of values to be update $fields to.
|
* @param array $values Array of values to be update $fields to.
|
||||||
* @param mixed $conditions
|
* @param mixed $conditions The array of conditions to use.
|
||||||
* @return boolean Success
|
* @return boolean Success
|
||||||
*/
|
*/
|
||||||
public function update(Model $Model, $fields = null, $values = null, $conditions = null) {
|
public function update(Model $Model, $fields = null, $values = null, $conditions = null) {
|
||||||
|
@ -237,7 +237,7 @@ class DataSource extends Object {
|
||||||
/**
|
/**
|
||||||
* Returns the ID generated from the previous INSERT operation.
|
* Returns the ID generated from the previous INSERT operation.
|
||||||
*
|
*
|
||||||
* @param mixed $source
|
* @param mixed $source The source name.
|
||||||
* @return mixed Last ID key generated in previous INSERT
|
* @return mixed Last ID key generated in previous INSERT
|
||||||
*/
|
*/
|
||||||
public function lastInsertId($source = null) {
|
public function lastInsertId($source = null) {
|
||||||
|
@ -247,7 +247,7 @@ class DataSource extends Object {
|
||||||
/**
|
/**
|
||||||
* Returns the number of rows returned by last operation.
|
* Returns the number of rows returned by last operation.
|
||||||
*
|
*
|
||||||
* @param mixed $source
|
* @param mixed $source The source name.
|
||||||
* @return integer Number of rows returned by last operation
|
* @return integer Number of rows returned by last operation
|
||||||
*/
|
*/
|
||||||
public function lastNumRows($source = null) {
|
public function lastNumRows($source = null) {
|
||||||
|
@ -257,7 +257,7 @@ class DataSource extends Object {
|
||||||
/**
|
/**
|
||||||
* Returns the number of rows affected by last query.
|
* Returns the number of rows affected by last query.
|
||||||
*
|
*
|
||||||
* @param mixed $source
|
* @param mixed $source The source name.
|
||||||
* @return integer Number of rows affected by last query.
|
* @return integer Number of rows affected by last query.
|
||||||
*/
|
*/
|
||||||
public function lastAffected($source = null) {
|
public function lastAffected($source = null) {
|
||||||
|
@ -320,7 +320,7 @@ class DataSource extends Object {
|
||||||
* @param array $data Array of data with values that will be inserted in placeholders.
|
* @param array $data Array of data with values that will be inserted in placeholders.
|
||||||
* @param string $association Name of association model being replaced.
|
* @param string $association Name of association model being replaced.
|
||||||
* @param Model $Model Model instance.
|
* @param Model $Model Model instance.
|
||||||
* @param array $stack
|
* @param array $stack The context stack.
|
||||||
* @return mixed String of query data with placeholders replaced, or false on failure.
|
* @return mixed String of query data with placeholders replaced, or false on failure.
|
||||||
*/
|
*/
|
||||||
public function insertQueryData($query, $data, $association, Model $Model, $stack) {
|
public function insertQueryData($query, $data, $association, Model $Model, $stack) {
|
||||||
|
|
|
@ -135,7 +135,7 @@ class Sqlite extends DboSource {
|
||||||
/**
|
/**
|
||||||
* Returns an array of tables in the database. If there are no tables, an error is raised and the application exits.
|
* Returns an array of tables in the database. If there are no tables, an error is raised and the application exits.
|
||||||
*
|
*
|
||||||
* @param mixed $data
|
* @param mixed $data Unused.
|
||||||
* @return array Array of table names in the database
|
* @return array Array of table names in the database
|
||||||
*/
|
*/
|
||||||
public function listSources($data = null) {
|
public function listSources($data = null) {
|
||||||
|
@ -202,10 +202,10 @@ class Sqlite extends DboSource {
|
||||||
/**
|
/**
|
||||||
* Generates and executes an SQL UPDATE statement for given model, fields, and values.
|
* Generates and executes an SQL UPDATE statement for given model, fields, and values.
|
||||||
*
|
*
|
||||||
* @param Model $model
|
* @param Model $model The model instance to update.
|
||||||
* @param array $fields
|
* @param array $fields The fields to update.
|
||||||
* @param array $values
|
* @param array $values The values to set columns to.
|
||||||
* @param mixed $conditions
|
* @param mixed $conditions array of conditions to use.
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function update(Model $model, $fields = array(), $values = null, $conditions = null) {
|
public function update(Model $model, $fields = array(), $values = null, $conditions = null) {
|
||||||
|
@ -448,9 +448,9 @@ class Sqlite extends DboSource {
|
||||||
/**
|
/**
|
||||||
* Removes redundant primary key indexes, as they are handled in the column def of the key.
|
* Removes redundant primary key indexes, as they are handled in the column def of the key.
|
||||||
*
|
*
|
||||||
* @param array $indexes
|
* @param array $indexes The indexes to build.
|
||||||
* @param string $table
|
* @param string $table The table name.
|
||||||
* @return string
|
* @return string The completed index.
|
||||||
*/
|
*/
|
||||||
public function buildIndex($indexes, $table = null) {
|
public function buildIndex($indexes, $table = null) {
|
||||||
$join = array();
|
$join = array();
|
||||||
|
@ -526,8 +526,8 @@ class Sqlite extends DboSource {
|
||||||
/**
|
/**
|
||||||
* Overrides DboSource::renderStatement to handle schema generation with SQLite-style indexes
|
* Overrides DboSource::renderStatement to handle schema generation with SQLite-style indexes
|
||||||
*
|
*
|
||||||
* @param string $type
|
* @param string $type The type of statement being rendered.
|
||||||
* @param array $data
|
* @param array $data The data to convert to SQL.
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function renderStatement($type, $data) {
|
public function renderStatement($type, $data) {
|
||||||
|
|
Loading…
Reference in a new issue