• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ledgersmb / LedgerSMB / 6978 / 3
63%
master: 63%

Build:
DEFAULT BRANCH: master
Ran 27 Aug 2018 01:08PM UTC
Files 225
Run time 17s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Aug 2018 09:45AM UTC coverage: 29.197% (-0.01%) from 29.21%
COVERAGE=1

push

travis-ci

ehuelsmann
Simplify LedgerSMB::PGOld, reduce App_State::DBH dependency (#3790)

* Drop redundant _DBH parameter from PGOld->new

Although undocumented, LedgerSMB::PGOld contains code which modifies
the provided arguments if a parameter `_DBH` is set. This is an
action-at-distance code pattern to surprise the unwary and unecessary
in current lsmb code. It is therefore removed.

* Remove useless parameter from LedgerSMB::PGOld->set_dbh call

`LedgerSMB::PGOld->set_dbh` does not accept arguments. It always uses
`LedgerSMB::App_State::DBH()` for initialisation.

In `LedgerSMB::DBObject::TransTemplate`, `LedgerSMB::PGOld->set_dbh`
was being called with a useless initialisation parameter. This has
been removed.

* Fix POD typos in LedgerSMB::DBObject::Account

* Use published interface to set PGObject::Simple db handle

LedgerSMB::PGOld->set_dbh() was manipulating an undocumented private
`_DBH` property of the `PGObject::Simple` class it inherits from.

We should not be manipulating the internal state of other classes.
Changed to use the documented setter method.

* Remove unnecessary subclassed method LedgerSMB::PGOld->dbh

`LedgerSMB::PGOld` subclassed the `PGObject::Simple` to return
the value of `LedgerSMB::App_State::DBH()' when called as a
simple function.

It was never called in this way, so this method has been
removed - calls can be handled by the base `PGObject::Simple`
method.

* Remove LedgerSMB::PGOld->set_dbh() method

This patch removes a piece of old code and reduces dependency on the
global LedgerSMB::App_State, which we are trying to deprecate.

`LedgerSMB::PGOld` was overriding `PGObject::Simple`'s `set_dbh()`
method with one that used `LedgerSMB::App_State::DBH()` to initialise
the class's dbh.

This effect was not documented and removed any public way of explicitly
setting a different dbh.

The override has been removed. `LedgerSMB::PGOld->set_dbh()` now calls
the underlying `PGObject::Simple->set_d... (continued)

5670 of 19420 relevant lines covered (29.2%)

591.56 hits per line

Source Files on job 6978.3 (COVERAGE=1)
  • Tree
  • List 0
  • Changed 16
  • Source Changed 5
  • Coverage Changed 15
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 6678
  • Travis Job 6978.3
  • 648cda44 on github
  • Prev Job for COVERAGE=1 on master (#6970.3)
  • Next Job for COVERAGE=1 on master (#6979.3)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc