Skip to content

Commit

Permalink
Merge pull request #7 from mybuilder/php-8
Browse files Browse the repository at this point in the history
More PHP8 fixes
  • Loading branch information
maxbaldanza authored Sep 5, 2022
2 parents 59101ce + bb13f81 commit 686e6d3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ test/fixtures/treetest/build/
vendor/
composer.lock
composer.phar
bin/
.phpunit.result.cache
2 changes: 1 addition & 1 deletion generator/lib/config/QuickGeneratorConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ protected function parsePseudoIniFile($filepath)
}
foreach ($lines as $line) {
$line = trim($line);
if ($line == "" || $line{0} == '#' || $line{0} == ';') continue;
if ($line == "" || $line[0] == '#' || $line[0] == ';') continue;
$pos = strpos($line, '=');
$property = trim(substr($line, 0, $pos));
$value = trim(substr($line, $pos + 1));
Expand Down
4 changes: 1 addition & 3 deletions generator/lib/model/XMLElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
* @license MIT License
*/

require_once dirname(__FILE__) . '/VendorInfo.php';

/**
* An abstract class for elements represented by XML tags (e.g. Column, Table).
*
Expand Down Expand Up @@ -80,7 +78,7 @@ public function getAttribute($name, $defaultValue = null)
/**
* Converts value specified in XML to a boolean value.
* This is to support the default value when used w/ a boolean column.
* @return value
* @return bool
*/
protected function booleanValue($val)
{
Expand Down
4 changes: 1 addition & 3 deletions runtime/lib/util/PropelDateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
*/
class PropelDateTime extends DateTime
{

/**
* A string representation of the date, for serialization.
* @var string
Expand Down Expand Up @@ -116,9 +115,8 @@ public function __sleep()
* PHP "magic" function called when object is restored from serialized state.
* Calls DateTime constructor with previously stored string value of date.
*/
public function __wakeup()
public function __wakeup(): void
{
parent::__construct($this->dateString, new DateTimeZone($this->tzString));
}

}

0 comments on commit 686e6d3

Please sign in to comment.