Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rsinger committed Apr 16, 2018
1 parent 45c0508 commit 92488b4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
9 changes: 5 additions & 4 deletions src/mongo/delegates/Views.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use \MongoDB\Driver\ReadPreference;
use \MongoDB\Collection;
use Tripod\Mongo\JobGroup;
use Monolog\Logger;

/**
* Class Views
Expand All @@ -29,7 +28,7 @@ class Views extends CompositeBase
* @param null $stat
* @param string $readPreference
*/
function __construct($storeName, Collection $collection,$defaultContext,$stat=null,$readPreference = ReadPreference::RP_PRIMARY) // todo: $collection -> podname
public function __construct($storeName, Collection $collection,$defaultContext,$stat=null,$readPreference = ReadPreference::RP_PRIMARY) // todo: $collection -> podname
{
$this->storeName = $storeName;
$this->labeller = new Labeller();
Expand Down Expand Up @@ -311,8 +310,10 @@ public function generateViews($resources,$context=null)
foreach ($resources as $resource)
{
$resourceAlias = $this->labeller->uri_to_alias($resource);
$this->getLogger()->warning('Generating views', ['store' => $this->storeName,
'_id' => $resourceAlias]);
$this->getLogger()->warning(
'Generating views',
['store' => $this->storeName, '_id' => $resourceAlias]
);
// delete any views this resource is involved in. It's type may have changed so it's not enough just to regen it with it's new type below.
foreach (Config::getInstance()->getViewSpecifications($this->storeName) as $type=>$spec)
{
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mongo/MongoTripodConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ public function testGetAllTypesInSpecifications()
$this->assertEquals(
12,
count($types),
'There should be 11 types based on the configured view, table and search specifications in config.json'
'There should be 12 types based on the configured view, table and search specifications in config.json'
);
$expectedValues = [
'acorn:Resource',
Expand Down
1 change: 0 additions & 1 deletion test/unit/mongo/MongoTripodViewsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
require_once 'src/mongo/Driver.class.php';
require_once 'src/mongo/delegates/Views.class.php';

use \Tripod\Mongo\Composites\Views;
use \MongoDB\Client;
use Tripod\ExtendedGraph;

Expand Down

0 comments on commit 92488b4

Please sign in to comment.