I know this may not directly merit any functionality provided by RDFIO but if time permits maybe consider the following re-factoring to ease maintenance in future by using some common assumptions about PHP.
- One class per file
|
class RDFIOARC2StoreWrapperException extends MWException { |
|
} |
- Remove dependency on
MWException and use standard exceptions like RuntimeException or classes thereof
- Move classes (except for scripts) to
/src and related sub-directories
- When moving classes consider using the
RDFIO namespace instead of naming each class with RDFIO...
- Match class names against PSR-4 such as
/src/Parser to correspond to RDFIO\Parser\ARC2ToWikiConverter.php
- For public functions use the
public prefix to make visibility more clearer
- When moving a class try to create a simple unit test to at least cover the constructor (can be extended at any time)
- For "pure" unit tests avoid
MediaWikiTestCase and instead use the standard PHPUnit_Framework_TestCase
- Documentation such as
RDFIOCallGraph.pdf may find a more dedicated location (e.g. /docs)
I know this may not directly merit any functionality provided by RDFIO but if time permits maybe consider the following re-factoring to ease maintenance in future by using some common assumptions about PHP.
RDFIO/classes/RDFIO_ARC2StoreWrapper.php
Lines 200 to 201 in 4338de2
MWExceptionand use standard exceptions likeRuntimeExceptionor classes thereof/srcand related sub-directoriesRDFIOnamespace instead of naming each class withRDFIO.../src/Parserto correspond toRDFIO\Parser\ARC2ToWikiConverter.phppublicprefix to make visibility more clearerMediaWikiTestCaseand instead use the standardPHPUnit_Framework_TestCaseRDFIOCallGraph.pdfmay find a more dedicated location (e.g./docs)