PMCORE-3920 Create a PM table or Report Table are not working
This commit is contained in:
23
thirdparty/phing/IntrospectionHelper.php
vendored
23
thirdparty/phing/IntrospectionHelper.php
vendored
@@ -221,7 +221,7 @@ class IntrospectionHelper {
|
||||
|
||||
$classname = null;
|
||||
|
||||
if (($hint = $params[0]->getClass()) !== null) {
|
||||
if (($hint = $this->getClass($params[0])) !== null) {
|
||||
$classname = $hint->getName();
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ class IntrospectionHelper {
|
||||
|
||||
$classname = null;
|
||||
|
||||
if (($hint = $params[0]->getClass()) !== null) {
|
||||
if (($hint = $this->getClass($params[0])) !== null) {
|
||||
$classname = $hint->getName();
|
||||
}
|
||||
|
||||
@@ -325,8 +325,8 @@ class IntrospectionHelper {
|
||||
$params = $method->getParameters();
|
||||
|
||||
$classname = null;
|
||||
|
||||
if (($hint = $params[0]->getClass()) !== null) {
|
||||
|
||||
if (($hint = $this->getClass($params[0])) !== null) {
|
||||
$classname = $hint->getName();
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ class IntrospectionHelper {
|
||||
|
||||
$classname = null;
|
||||
|
||||
if (($hint = $params[0]->getClass()) !== null) {
|
||||
if (($hint = $this->getClass($params[0])) !== null) {
|
||||
$classname = $hint->getName();
|
||||
}
|
||||
|
||||
@@ -539,4 +539,17 @@ class IntrospectionHelper {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get class
|
||||
* @param object $param
|
||||
* @return mixed
|
||||
*/
|
||||
private function getClass(object $param)
|
||||
{
|
||||
$name = null;
|
||||
if ($param->getType() && !$param->getType()->isBuiltin()) {
|
||||
$name = new ReflectionClass($param->getType()->getName());
|
||||
}
|
||||
return $name;
|
||||
}
|
||||
}
|
||||
|
||||
4
thirdparty/phing/listener/DefaultLogger.php
vendored
4
thirdparty/phing/listener/DefaultLogger.php
vendored
@@ -29,7 +29,7 @@ include_once 'phing/BuildEvent.php';
|
||||
* any messages that get logged.
|
||||
*
|
||||
* @author Andreas Aderhold <andi@binarycloud.com>
|
||||
* @copyright <EFBFBD> 2001,2002 THYRELL. All rights reserved
|
||||
* @copyright © 2001,2002 THYRELL. All rights reserved
|
||||
* @version $Revision: 1.11 $ $Date: 2005/08/25 19:33:43 $
|
||||
* @see BuildEvent
|
||||
* @package phing.listener
|
||||
@@ -214,7 +214,7 @@ class DefaultLogger implements BuildListener {
|
||||
$minutes, ($minutes === 1 ? " " : "s "),
|
||||
$seconds - floor($seconds/60) * 60, ($seconds%60 === 1 ? "" : "s"));
|
||||
} else {
|
||||
return sprintf("%0.4f second%s", $seconds, ($seconds%60 === 1 ? "" : "s"));
|
||||
return sprintf("%0.4f second%s", $seconds, ((int) $seconds % 60 === 1 ? "" : "s"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
5
thirdparty/phing/system/util/Properties.php
vendored
5
thirdparty/phing/system/util/Properties.php
vendored
@@ -215,7 +215,10 @@ class Properties {
|
||||
* @return mixed Old property value or NULL if none was set.
|
||||
*/
|
||||
function setProperty($key, $value) {
|
||||
$oldValue = @$this->properties[$key];
|
||||
$oldValue = null;
|
||||
if (array_key_exists($key, $this->properties)) {
|
||||
$oldValue = $this->properties[$key];
|
||||
}
|
||||
$this->properties[$key] = $value;
|
||||
return $oldValue;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ include_once 'phing/tasks/system/condition/Condition.php';
|
||||
*
|
||||
* @author Hans Lellelid <hans@xmpl.org>
|
||||
* @author Andreas Aderhold <andi@binarycloud.com>
|
||||
* @copyright <EFBFBD> 2001,2002 THYRELL. All rights reserved
|
||||
* @copyright © 2001,2002 THYRELL. All rights reserved
|
||||
* @version $Revision: 1.16 $
|
||||
* @package phing.tasks.system.condition
|
||||
*/
|
||||
@@ -46,7 +46,7 @@ abstract class ConditionBase extends ProjectComponent implements IteratorAggrega
|
||||
/**
|
||||
* Required for IteratorAggregate
|
||||
*/
|
||||
function getIterator() {
|
||||
function getIterator(): \Traversable {
|
||||
return new ConditionEnumeration($this);
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ class ConditionEnumeration implements Iterator {
|
||||
$this->outer = $outer;
|
||||
}
|
||||
|
||||
public function valid() {
|
||||
public function valid(): bool {
|
||||
return $this->outer->countConditions() > $this->num;
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ class ConditionEnumeration implements Iterator {
|
||||
return $o;
|
||||
}
|
||||
|
||||
function next() {
|
||||
function next(): void {
|
||||
$this->num++;
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ class ConditionEnumeration implements Iterator {
|
||||
return $this->num;
|
||||
}
|
||||
|
||||
function rewind() {
|
||||
function rewind(): void {
|
||||
$this->num = 0;
|
||||
}
|
||||
}
|
||||
|
||||
2
thirdparty/phing/util/StringHelper.php
vendored
2
thirdparty/phing/util/StringHelper.php
vendored
@@ -167,7 +167,7 @@ class StringHelper {
|
||||
* a natural way of getting a subtring, php's circular string buffer and strange
|
||||
* return values suck if you want to program strict as of C or friends
|
||||
*/
|
||||
public static function substring($string, $startpos, $endpos = -1) {
|
||||
public static function substring(string $string, $startpos, $endpos = -1) {
|
||||
$len = strlen($string);
|
||||
$endpos = (int) (($endpos === -1) ? $len-1 : $endpos);
|
||||
if ($startpos > $len-1 || $startpos < 0) {
|
||||
|
||||
@@ -148,7 +148,11 @@ CREATE TABLE ".$this->quoteIdentifier($table->getName())."
|
||||
// $script .= " DEFAULT CHARSET='". $platform->escapeText( $vendorSpecific['Collation'] )."'";
|
||||
$script .= " DEFAULT CHARSET='utf8'";
|
||||
}
|
||||
if($vendorSpecific['Comment'] ) {
|
||||
$value = null;
|
||||
if (array_key_exists('Comment', $vendorSpecific)) {
|
||||
$value = $vendorSpecific['Comment'];
|
||||
}
|
||||
if($value) {
|
||||
$script .= " COMMENT='". $platform->escapeText( $vendorSpecific['Comment'] )."'";
|
||||
}
|
||||
// if($table->getDescription()) {
|
||||
|
||||
@@ -81,6 +81,7 @@ abstract class XMLElement {
|
||||
if (is_numeric($val)) {
|
||||
return (bool) $val;
|
||||
} else {
|
||||
$val = is_null($val) ? '' : $val;
|
||||
return (in_array(strtolower($val), array('true', 't', 'y', 'yes'), true) ? true : false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,9 @@ class MysqlPlatform extends DefaultPlatform {
|
||||
$usingInnoDB = false;
|
||||
if(class_exists('DataModelBuilder', false))
|
||||
{
|
||||
$usingInnoDB = strtolower(DataModelBuilder::getBuildProperty('mysqlTableType')) == 'innodb';
|
||||
$val = DataModelBuilder::getBuildProperty('mysqlTableType');
|
||||
$val = is_null($val) ? '' : $val;
|
||||
$usingInnoDB = strtolower($val) == 'innodb';
|
||||
}
|
||||
return $usingInnoDB || false;
|
||||
}
|
||||
|
||||
@@ -821,7 +821,7 @@ class PmTable
|
||||
*
|
||||
* @return array contains all supported columns types provided by propel
|
||||
*/
|
||||
public function getPropelSupportedColumnTypes()
|
||||
public static function getPropelSupportedColumnTypes()
|
||||
{
|
||||
/**
|
||||
* http://www.propelorm.org/wiki/Documentation/1.2/Schema
|
||||
@@ -926,7 +926,8 @@ class PmTable
|
||||
$args[] = $target;
|
||||
}
|
||||
|
||||
if (DIRECTORY_SEPARATOR != '\\' && (function_exists('posix_isatty') && @posix_isatty(STDOUT))) {
|
||||
$fd = defined('STDOUT') ? STDOUT : fopen('php://stdout', 'w');
|
||||
if (DIRECTORY_SEPARATOR != '\\' && (function_exists('posix_isatty') && posix_isatty($fd))) {
|
||||
$args[] = '-logger';
|
||||
$args[] = 'phing.listener.AnsiColorLogger';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user