protected function addHasOnlyDefaultValuesBody(&$script)
    {
        $table = $this->getTable();
        $colsWithDefaults = [];
        foreach ($table->getColumns() as $col) {
            $def = $col->getDefaultValue();
            if ($def !== null && !$def->isExpression()) {
                $colsWithDefaults[] = $col;
            }
        }

        foreach ($colsWithDefaults as $col) {
            /** @var Column $col */
            $clo = $col->getLowercasedName();
            $accessor = "\$this->$clo";
            if ($col->isTemporalType()) {
                $fmt = $this->getTemporalFormatter($col);
                $accessor = "\$this->$clo && \$this->{$clo}->format('$fmt')";
            }
            $script .= "
            if ($accessor !== " . $this->getDefaultValueString($col).") {
                return false;
            }
";
        }
    }
protected function addHasOnlyDefaultValuesBody(&$script)
    {
        $table = $this->getTable();
        $colsWithDefaults = [];
        foreach ($table->getColumns() as $col) {
            $def = $col->getDefaultValue();
            if ($def !== null && !$def->isExpression()) {
                $colsWithDefaults[] = $col;
            }
        }

        foreach ($colsWithDefaults as $col) {
            /** @var Column $col */
            $clo = $col->getLowercasedName();
            $accessor = "\$this->$clo";
            if ($col->isTemporalType()) {
                $fmt = $this->getTemporalFormatter($col);
                $accessor = "\$this->$clo && \$this->{$clo}->format('$fmt')";
            }
            $script .= "
            if ($accessor !== " . $this->getDefaultValueString($col).") {
                return false;
            }
";
        }
    }
protected function addHasOnlyDefaultValuesBody ( & $ script ) { $ table = $ this -> getTable ( ) ; $ colsWithDefaults = [ ] ; foreach ( $ table -> getColumns ( ) as $ col ) { $ def = $ col -> getDefaultValue ( ) ; if ( $ def !== null && ! $ def -> isExpression ( ) ) { $ colsWithDefaults [ ] = $ col ; } } foreach ( $ colsWithDefaults as $ col ) { /** @var Column $col */ $ clo = $ col -> getLowercasedName ( ) ; $ accessor = "\$this->$clo" ; if ( $ col -> isTemporalType ( ) ) { $ fmt = $ this -> getTemporalFormatter ( $ col ) ; $ accessor = "\$this->$clo && \$this->{$clo}->format('$fmt')" ; } $ script .= "
            if ($accessor !== " . $ this -> getDefaultValueString ( $ col ) . ") {
                return false;
            }
" ; } }
Adds the function body for the hasOnlyDefaultValues method
@param string &$script The script will be modified in this method.
@see addHasOnlyDefaultValues
Adds the function body for the hasOnlyDefaultValues method