Skip to content

Commit

Permalink
Fixing spacing and line length in a few files SemanticMediaWiki#899
Browse files Browse the repository at this point in the history
  • Loading branch information
ckoerner committed Mar 20, 2015
1 parent 132856b commit ece947f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
33 changes: 19 additions & 14 deletions src/SPARQLStore/SparqlDBConnectionProvider.php
Expand Up @@ -68,19 +68,24 @@ class SparqlDBConnectionProvider implements DBConnectionProvider {
* @param string|null $updateEndpoint
* @param string|null $dataEndpoint
*/
public function __construct( $connectorId = null, $defaultGraph = null, $queryEndpoint = null, $updateEndpoint = null, $dataEndpoint = null ) {
$this->connectorId = $connectorId;

if ( $this->connectorId === null ) {
$this->connectorId = $GLOBALS['smwgSparqlDatabaseConnector'];
public function __construct(
$connectorId = null,
$defaultGraph = null,
$queryEndpoint = null,
$updateEndpoint = null,
$dataEndpoint = null ) {
$this->connectorId = $connectorId;

if ( $this->connectorId === null ) {
$this->connectorId = $GLOBALS['smwgSparqlDatabaseConnector'];
}

$this->defaultGraph = $defaultGraph;
$this->queryEndpoint = $queryEndpoint;
$this->updateEndpoint = $updateEndpoint;
$this->dataEndpoint = $dataEndpoint;
}

$this->defaultGraph = $defaultGraph;
$this->queryEndpoint = $queryEndpoint;
$this->updateEndpoint = $updateEndpoint;
$this->dataEndpoint = $dataEndpoint;
}

/**
* @see DBConnectionProvider::getConnection
*
Expand Down Expand Up @@ -143,10 +148,10 @@ private function connectTo( $connectorId ) {

private function mapConnectorIdToClass( $connectorId ) {

$databaseConnector = $this->connectorIdToClass[ 'default' ];
$databaseConnector = $this->connectorIdToClass['default'];

if ( isset( $this->connectorIdToClass[ $connectorId ] ) ) {
$databaseConnector = $this->connectorIdToClass[ $connectorId ];
if ( isset( $this->connectorIdToClass[$connectorId] ) ) {
$databaseConnector = $this->connectorIdToClass[$connectorId];
}

if ( $connectorId === 'custom' ) {
Expand Down
6 changes: 3 additions & 3 deletions src/SPARQLStore/TurtleTriplesBuilder.php
Expand Up @@ -230,11 +230,11 @@ private function expandUpdateExpResource( SMWExpResource $expResource, array &$a
$diWikiPage = $elementTarget->getDataItem();
$hash = $diWikiPage->getHash();

if ( !isset( self::$dataItemExportCache[ $hash ] ) ) {
self::$dataItemExportCache[ $hash ] = SMWExporter::getInstance()->makeExportDataForSubject( $diWikiPage, true );
if ( !isset( self::$dataItemExportCache[$hash] ) ) {
self::$dataItemExportCache[$hash] = SMWExporter::getInstance()->makeExportDataForSubject( $diWikiPage, true );
}

$auxiliaryExpData[ $hash ] = self::$dataItemExportCache[ $hash ];
$auxiliaryExpData[$hash] = self::$dataItemExportCache[$hash];
}

return $elementTarget;
Expand Down

0 comments on commit ece947f

Please sign in to comment.