Methods and properties visibility should always be explicitly defined 90

More information: https://insight.symfony.com/what-we-analyse/php.method_or_property_missing_visibility

  1. $this->_moveNextRow++;
  2. return $sr;
  3. }
  4. }
  5. function key()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. return $this->_moveNextRow;
  8. }
  9. }
  1. * to get all parameters received.
  2. * @param string $s1
  3. * @param string $s2
  4. * @return string
  5. */
  6. function concat($s1, $s2 = null)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. return "";
  9. }
  10. /**
  1. * @param string $sql
  2. * @param int $start
  3. * @param int $qty
  4. * @return string
  5. */
  6. function limit($sql, $start, $qty)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. return $sql;
  9. }
  10. /**
  1. * Given a SQL returns it with the proper TOP or equivalent method included
  2. * @param string $sql
  3. * @param int $qty
  4. * @return string
  5. */
  6. function top($sql, $qty)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. return $sql;
  9. }
  10. /**
  1. /**
  2. * Return if the database provider have a top or similar function
  3. * @return bool
  4. */
  5. function hasTop()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. return false;
  8. }
  9. /**
  1. /**
  2. * Return if the database provider have a limit function
  3. * @return bool
  4. */
  5. function hasLimit()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. return false;
  8. }
  9. /**
  1. * @param string $fmt
  2. * @param bool|string $col
  3. * @return string
  4. * @example $db->getDbFunctions()->SQLDate("d/m/Y H:i", "dtcriacao")
  5. */
  6. function sqlDate($fmt, $col = false)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. return "";
  9. }
  10. /**
  1. *
  2. * @param string $date
  3. * @param string $dateFormat
  4. * @return string
  5. */
  6. function toDate($date, $dateFormat)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. $dateTime = DateTime::createFromFormat($dateFormat, $date);
  9. return $dateTime->format(self::YMDH);
  10. }
  1. *
  2. * @param string $date
  3. * @param string $dateFormat
  4. * @return string
  5. */
  6. function fromDate($date, $dateFormat)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. $dateTime = DateTime::createFromFormat(self::YMDH, $date);
  9. return $dateTime->format($dateFormat);
  10. }
  1. * @param string $sql
  2. * @param array $param
  3. * @param string $sequence
  4. * @return int
  5. */
  6. function executeAndGetInsertedId($dbdataset, $sql, $param, $sequence = null)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. $dbdataset->execSQL($sql, $param);
  9. return -1;
  10. }
  11. }
  1. use ByJG\AnyDataset\Repository\DBDataset;
  2. class DBDblibFunctions extends DBBaseFunctions
  3. {
  4. function concat($s1, $s2 = null)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  5. {
  6. return implode(func_get_args(), ' + ');
  7. }
  8. /**
  1. * @param int $start
  2. * @param int $qty
  3. * @return string
  4. * @throws NotAvailableException
  5. */
  6. function limit($sql, $start, $qty)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. throw new NotAvailableException("DBLib does not support LIMIT feature.");
  9. }
  10. /**
  1. * Given a SQL returns it with the proper TOP or equivalent method included
  2. * @param string $sql
  3. * @param int $qty
  4. * @return string
  5. */
  6. function top($sql, $qty)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. return preg_replace("/^\\s*(select) /i", "\\1 top $qty ", $sql);
  9. }
  10. /**
  1. /**
  2. * Return if the database provider have a top or similar function
  3. * @return bool
  4. */
  5. function hasTop()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. return true;
  8. }
  9. /**
  1. /**
  2. * Return if the database provider have a limit function
  3. * @return bool
  4. */
  5. function hasLimit()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. return false;
  8. }
  9. /**
  1. * @param string $fmt
  2. * @param bool|string $col
  3. * @return string
  4. * @example $db->getDbFunctions()->SQLDate("d/m/Y H:i", "dtcriacao")
  5. */
  6. function sqlDate($fmt, $col = false)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. if (!$col) $col = "getdate()";
  9. $s = '';
  10. $len = strlen($fmt);
  1. *
  2. * @param string $date
  3. * @param string $dateFormat
  4. * @return string
  5. */
  6. function toDate($date, $dateFormat)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. return parent::toDate($date, $dateFormat);
  9. }
  10. /**
  1. *
  2. * @param string $date
  3. * @param string $dateFormat
  4. * @return string
  5. */
  6. function fromDate($date, $dateFormat)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. return parent::fromDate($date, $dateFormat);
  9. }
  10. /**
  1. * @param DBDataset $dbdataset
  2. * @param string $sql
  3. * @param array $param
  4. * @return int
  5. */
  6. function executeAndGetInsertedId($dbdataset, $sql, $param)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. $id = parent::executeAndGetInsertedId($dbdataset, $sql, $param);
  9. $it = $dbdataset->getIterator("select @@identity id");
  10. if ($it->hasNext()) {
  11. $sr = $it->moveNext();
  1. namespace ByJG\AnyDataset\Database;
  2. interface DBDriverInterface
  3. {
  4. function getIterator($sql, $array = null);

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  5. function getScalar($sql, $array = null);
  6. function getAllFields($tablename);
  1. interface DBDriverInterface
  2. {
  3. function getIterator($sql, $array = null);
  4. function getScalar($sql, $array = null);

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  5. function getAllFields($tablename);
  6. function executeSql($sql, $array = null);
  1. function getIterator($sql, $array = null);
  2. function getScalar($sql, $array = null);
  3. function getAllFields($tablename);

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  4. function executeSql($sql, $array = null);
  5. function beginTransaction();
  1. function getScalar($sql, $array = null);
  2. function getAllFields($tablename);
  3. function executeSql($sql, $array = null);

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  4. function beginTransaction();
  5. function commitTransaction();
  1. function getAllFields($tablename);
  2. function executeSql($sql, $array = null);
  3. function beginTransaction();

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  4. function commitTransaction();
  5. function rollbackTransaction();
  1. function executeSql($sql, $array = null);
  2. function beginTransaction();
  3. function commitTransaction();

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  4. function rollbackTransaction();
  5. function getDbConnection();
  1. function beginTransaction();
  2. function commitTransaction();
  3. function rollbackTransaction();

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  4. function getDbConnection();
  5. function setAttribute($name, $value);
  1. function commitTransaction();
  2. function rollbackTransaction();
  3. function getDbConnection();

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  4. function setAttribute($name, $value);
  5. function getAttribute($name);
  6. }
  1. function rollbackTransaction();
  2. function getDbConnection();
  3. function setAttribute($name, $value);

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  4. function getAttribute($name);
  5. }
  1. function getDbConnection();
  2. function setAttribute($name, $value);
  3. function getAttribute($name);

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  4. }
  1. * to get all parameters received.
  2. * @param string $s1
  3. * @param string $s2
  4. * @return string
  5. */
  6. function concat($s1, $s2 = null);

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. /**
  8. * Given a SQL returns it with the proper LIMIT or equivalent method included
  9. * @param string $sql
  10. * @param int $start
  1. * @param string $sql
  2. * @param int $start
  3. * @param int $qty
  4. * @return string
  5. */
  6. function limit($sql, $start, $qty);

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. /**
  8. * Given a SQL returns it with the proper TOP or equivalent method included
  9. * @param string $sql
  10. * @param int $qty
  1. * Given a SQL returns it with the proper TOP or equivalent method included
  2. * @param string $sql
  3. * @param int $qty
  4. * @return string
  5. */
  6. function top($sql, $qty);

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. /**
  8. * Return if the database provider have a top or similar function
  9. * @return bool
  10. */
  1. /**
  2. * Return if the database provider have a top or similar function
  3. * @return bool
  4. */
  5. function hasTop();

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. /**
  7. * Return if the database provider have a limit function
  8. * @return bool
  9. */
  1. /**
  2. * Return if the database provider have a limit function
  3. * @return bool
  4. */
  5. function hasLimit();

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. /**
  7. * Format date column in sql string given an input format that understands Y M D
  8. * @param string $fmt
  9. * @param bool|string $col
  1. * @param string $fmt
  2. * @param bool|string $col
  3. * @return string
  4. * @example $db->getDbFunctions()->SQLDate("d/m/Y H:i", "dtcriacao")
  5. */
  6. function sqlDate($fmt, $col = false);

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. /**
  8. * Format a string date to a string database readable format.
  9. *
  10. * @param string $date
  1. *
  2. * @param string $date
  3. * @param string $dateFormat
  4. * @return string
  5. */
  6. function toDate($date, $dateFormat);

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. /**
  8. * Format a string database readable format to a string date in a free format.
  9. *
  10. * @param string $date
  1. *
  2. * @param string $date
  3. * @param string $dateFormat
  4. * @return string
  5. */
  6. function fromDate($date, $dateFormat);

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. /**
  8. *
  9. * @param DBDataset $dbdataset
  10. * @param string $sql
  1. * @param DBDataset $dbdataset
  2. * @param string $sql
  3. * @param array $param
  4. * @return int
  5. */
  6. function executeAndGetInsertedId($dbdataset, $sql, $param);

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. }
  1. use ByJG\AnyDataset\Repository\DBDataset;
  2. class DBMySQLFunctions extends DBBaseFunctions
  3. {
  4. function concat($s1, $s2 = null)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  5. {
  6. return "concat(" . implode(func_get_args(), ', ') . ")";
  7. }
  8. /**
  1. * @param string $sql
  2. * @param int $start
  3. * @param int $qty
  4. * @return string
  5. */
  6. function limit($sql, $start, $qty)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. if (strpos($sql, ' LIMIT ') === false) {
  9. return $sql . " LIMIT $start, $qty ";
  10. }
  1. * Given a SQL returns it with the proper TOP or equivalent method included
  2. * @param string $sql
  3. * @param int $qty
  4. * @return string
  5. */
  6. function top($sql, $qty)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. return $this->limit($sql, 0, $qty);
  9. }
  10. /**
  1. /**
  2. * Return if the database provider have a top or similar function
  3. * @return bool
  4. */
  5. function hasTop()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. return true;
  8. }
  9. /**
  1. /**
  2. * Return if the database provider have a limit function
  3. * @return bool
  4. */
  5. function hasLimit()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. return true;
  8. }
  9. /**
  1. * @param string $fmt
  2. * @param string|bool $col
  3. * @return string
  4. * @example $db->getDbFunctions()->SQLDate("d/m/Y H:i", "dtcriacao")
  5. */
  6. function sqlDate($fmt, $col = false)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. if (!$col) $col = 'now()';
  9. $s = 'DATE_FORMAT(' . $col . ",'";
  10. $concat = false;
  11. $len = strlen($fmt);
  1. *
  2. * @param string $date
  3. * @param string $dateFormat
  4. * @return string
  5. */
  6. function toDate($date, $dateFormat)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. return parent::toDate($date, $dateFormat);
  9. }
  10. /**
  1. *
  2. * @param string $date
  3. * @param string $dateFormat
  4. * @return string
  5. */
  6. function fromDate($date, $dateFormat)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. return parent::fromDate($date, $dateFormat);
  9. }
  10. /**
  1. * @param DBDataset $dbdataset
  2. * @param string $sql
  3. * @param array $param
  4. * @return int
  5. */
  6. function executeAndGetInsertedId($dbdataset, $sql, $param)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. $id = parent::executeAndGetInsertedId($dbdataset, $sql, $param);
  9. $it = $dbdataset->getIterator("select LAST_INSERT_ID() id");
  10. if ($it->hasNext()) {
  11. $sr = $it->moveNext();
  1. namespace ByJG\AnyDataset\Database;
  2. class DBPGSqlFunctions extends DBBaseFunctions
  3. {
  4. function concat($s1, $s2 = null)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  5. {
  6. return implode(func_get_args(), ' || ');
  7. }
  8. /**
  1. * @param string $sql
  2. * @param int $start
  3. * @param int $qty
  4. * @return string
  5. */
  6. function limit($sql, $start, $qty)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. if (strpos($sql, ' LIMIT ') === false) {
  9. return $sql . " LIMIT $qty OFFSET $start ";
  10. }
  1. * Given a SQL returns it with the proper TOP or equivalent method included
  2. * @param string $sql
  3. * @param int $qty
  4. * @return string
  5. */
  6. function top($sql, $qty)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. return $this->limit($sql, 0, $qty);
  9. }
  10. /**
  1. /**
  2. * Return if the database provider have a top or similar function
  3. * @return bool
  4. */
  5. function hasTop()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. return true;
  8. }
  9. /**
  1. /**
  2. * Return if the database provider have a limit function
  3. * @return bool
  4. */
  5. function hasLimit()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. return true;
  8. }
  9. /**
  1. * @param string $fmt
  2. * @param string|bool $col
  3. * @return string
  4. * @example $db->getDbFunctions()->SQLDate("d/m/Y H:i", "dtcriacao")
  5. */
  6. function sqlDate($fmt, $col = false)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. if (!$col) $col = 'current_timestamp';
  9. $s = 'TO_CHAR(' . $col . ",'";
  10. $len = strlen($fmt);
  1. *
  2. * @param string $date
  3. * @param string $dateFormat
  4. * @return string
  5. */
  6. function toDate($date, $dateFormat)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. return parent::toDate($date, $dateFormat);
  9. }
  10. /**
  1. *
  2. * @param string $date
  3. * @param string $dateFormat
  4. * @return string
  5. */
  6. function fromDate($date, $dateFormat)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  7. {
  8. return parent::fromDate($date, $dateFormat);
  9. }
  10. function executeAndGetInsertedId($dbdataset, $sql, $param, $sequence = null)
  1. function fromDate($date, $dateFormat)
  2. {
  3. return parent::fromDate($date, $dateFormat);
  4. }
  5. function executeAndGetInsertedId($dbdataset, $sql, $param, $sequence = null)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. $id = parent::executeAndGetInsertedId($dbdataset, $sql, $param);
  8. $it = $dbdataset->getIterator(SQLHelper::createSafeSQL("select currval(':sequence') id",
  9. array(':sequence' => $sequence)));
  10. if ($it->hasNext()) {
  1. use ByJG\AnyDataset\Repository\DBDataset;
  2. class DBSqliteFunctions extends DBBaseFunctions
  3. {
  4. function concat($s1, $s2 = null)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Joao Gilberto Magalhaes
  5. {
  6. return implode(func_get_args(), ' || ');
  7. }
  8. /**
  1. * @param string $sql
  2. * @param int $start
  3. * @param int $qty
  4. * @return string
  5. */
  6. function limit($sql, $start, $qty)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Joao Gilberto Magalhaes
  7. {
  8. if (strpos($sql, ' LIMIT ') === false) {
  9. return $sql . " LIMIT $start, $qty ";
  10. }
  1. * Given a SQL returns it with the proper TOP or equivalent method included
  2. * @param string $sql
  3. * @param int $qty
  4. * @return string
  5. */
  6. function top($sql, $qty)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Joao Gilberto Magalhaes
  7. {
  8. return $this->limit($sql, 0, $qty);
  9. }
  10. /**
  1. /**
  2. * Return if the database provider have a top or similar function
  3. * @return bool
  4. */
  5. function hasTop()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Joao Gilberto Magalhaes
  6. {
  7. return true;
  8. }
  9. /**
  1. /**
  2. * Return if the database provider have a limit function
  3. * @return bool
  4. */
  5. function hasLimit()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Joao Gilberto Magalhaes
  6. {
  7. return true;
  8. }
  9. /**
  1. * @param string|bool $col
  2. * @return string
  3. * @throws NotImplementedException
  4. * @example $db->getDbFunctions()->SQLDate("d/m/Y H:i", "dtcriacao")
  5. */
  6. function sqlDate($fmt, $col = false)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Joao Gilberto Magalhaes
  7. {
  8. throw new NotImplementedException('Not implemented');
  9. }
  10. /**
  1. *
  2. * @param string $date
  3. * @param string $dateFormat
  4. * @return string
  5. */
  6. function toDate($date, $dateFormat)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Joao Gilberto Magalhaes
  7. {
  8. return parent::toDate($date, $dateFormat);
  9. }
  10. /**
  1. *
  2. * @param string $date
  3. * @param string $dateFormat
  4. * @return string
  5. */
  6. function fromDate($date, $dateFormat)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Joao Gilberto Magalhaes
  7. {
  8. return parent::fromDate($date, $dateFormat);
  9. }
  10. /**
  1. * @param DBDataset $dbdataset
  2. * @param string $sql
  3. * @param array $param
  4. * @return int
  5. */
  6. function executeAndGetInsertedId($dbdataset, $sql, $param)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Joao Gilberto Magalhaes
  7. {
  8. $id = parent::executeAndGetInsertedId($dbdataset, $sql, $param);
  9. $it = $dbdataset->getIterator("SELECT last_insert_rowid() id");
  10. if ($it->hasNext()) {
  11. $sr = $it->moveNext();
  1. namespace ByJG\AnyDataset\Database;
  2. interface NoSQLDriverInterface
  3. {
  4. function getIterator($filter = null, $fields = null);

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  5. function getCollection();
  6. function setCollection($collection);
  1. interface NoSQLDriverInterface
  2. {
  3. function getIterator($filter = null, $fields = null);
  4. function getCollection();

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  5. function setCollection($collection);
  6. function insert($document);
  1. function getIterator($filter = null, $fields = null);
  2. function getCollection();
  3. function setCollection($collection);

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  4. function insert($document);
  5. function update($document, $filter = null, $options = null);
  1. function getCollection();
  2. function setCollection($collection);
  3. function insert($document);

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  4. function update($document, $filter = null, $options = null);
  5. function getDbConnection();
  1. function setCollection($collection);
  2. function insert($document);
  3. function update($document, $filter = null, $options = null);

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  4. function getDbConnection();
  5. //function setAttribute($name, $value);
  6. //function getAttribute($name);
  1. function insert($document);
  2. function update($document, $filter = null, $options = null);
  3. function getDbConnection();

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  4. //function setAttribute($name, $value);
  5. //function getAttribute($name);
  6. }
  1. } else {
  2. return $this->_list[$this->_curRow++];
  3. }
  4. }
  5. function key()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. return $this->_curRow;
  8. }
  9. }
  1. } else {
  2. return null;
  3. }
  4. }
  5. function key()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. return $this->_currentRow;
  8. }
  9. }
  1. $this->_currentRow++;
  2. return $sr;
  3. }
  4. }
  5. function key()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. return $this->_currentRow;
  8. }
  9. }
  1. }
  2. return $fields;
  3. }
  4. function key()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  5. {
  6. return $this->_current;
  7. }
  8. }
  1. public function count()
  2. {
  3. throw new NotImplementedException("Implement this method");
  4. }
  5. function key()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. throw new NotImplementedException("Implement this method");
  8. }
  9. public function toArray()
  1. /* ------------------------------------- */
  2. /**
  3. * @return SingleRow
  4. */
  5. function current()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. return $this->moveNext();
  8. }
  9. function rewind()
  1. function current()
  2. {
  3. return $this->moveNext();
  4. }
  5. function rewind()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. // There is no necessary
  8. }
  9. function next()
  1. function rewind()
  2. {
  3. // There is no necessary
  4. }
  5. function next()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. // There is no necessary
  8. }
  9. function valid()
  1. function next()
  2. {
  3. // There is no necessary
  4. }
  5. function valid()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. return $this->hasNext();
  8. }
  9. }
  1. /**
  2. * @desc Check if exists more records.
  3. * @return bool Return True if is possible get one or more records.
  4. */
  5. function hasNext();

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. /**
  7. * @desc Get the next record.Return a SingleRow object
  8. * @return SingleRow
  9. */
  1. /**
  2. * @desc Get the next record.Return a SingleRow object
  3. * @return SingleRow
  4. */
  5. function moveNext();

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. /**
  7. * @desc Get the record count. Some implementations may have return -1.
  8. *
  9. */
  1. /**
  2. * @desc Get the record count. Some implementations may have return -1.
  3. *
  4. */
  5. function count();

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Joao Gilberto Magalhães
  6. /**
  7. * Get an array of the iterator
  8. */
  9. function toArray();
  1. function count();
  2. /**
  3. * Get an array of the iterator
  4. */
  5. function toArray();

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. }
  1. $sr = new SingleRow($this->_jsonObject[$this->_current++]);
  2. return $sr;
  3. }
  4. function key()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  5. {
  6. return $this->_current;
  7. }
  8. }
  1. $this->_moveNextRow++;
  2. return $sr;
  3. }
  4. }
  5. function key()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. return $this->_moveNextRow;
  8. }
  9. }
  1. $sr->addField(strtolower($this->_fields[$i]), $cols[$i]);
  2. }
  3. return $sr;
  4. }
  5. function key()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. return $this->_current;
  8. }
  9. }
  1. } else {
  2. throw new IteratorException("No more records. Unexpected behavior.");
  3. }
  4. }
  5. function key()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. return $this->_current;
  8. }
  9. }
  1. }
  2. return null;
  3. }
  4. }
  5. function key()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  6. {
  7. return $this->_current;
  8. }
  9. }
  1. }
  2. return $sr;
  3. }
  4. function key()

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by João Gilberto Magalhães
  5. {
  6. return $this->_current;
  7. }
  8. }