@@ -38,10 +38,10 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | public $cache; |
| 40 | 40 | |
| 41 | - /** |
|
| 42 | - * @var int |
|
| 43 | - */ |
|
| 44 | - private $requestStartTime; |
|
| 41 | + /** |
|
| 42 | + * @var int |
|
| 43 | + */ |
|
| 44 | + private $requestStartTime; |
|
| 45 | 45 | |
| 46 | 46 | /** |
| 47 | 47 | * @param $configFileName |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $configurationBuilder = new EntityStoreFromConfigurationBuilder(); |
| 52 | 52 | $this->entityStore = $configurationBuilder->buildEntityStore($configFileName); |
| 53 | 53 | $this->cache = $configurationBuilder->buildCache($configFileName); |
| 54 | - $this->requestStartTime = time(); |
|
| 54 | + $this->requestStartTime = time(); |
|
| 55 | 55 | |
| 56 | 56 | $this->sitesApi = array(); |
| 57 | 57 | foreach($sitesUrls as $siteId => $url) { |
@@ -69,26 +69,26 @@ discard block |
||
| 69 | 69 | |
| 70 | 70 | if($formattedTree->equals(new ResourceListNode())) { |
| 71 | 71 | return array(); |
| 72 | - } |
|
| 73 | - |
|
| 74 | - $measures = $this->buildMeasures($formattedTree, $request->getMeasures()); |
|
| 72 | + } |
|
| 75 | 73 | |
| 76 | - $trace = $request->getTrace(); |
|
| 77 | - array_unshift($trace, array( |
|
| 78 | - "module" => "Wikidata", |
|
| 79 | - "tree" => $formattedTree, |
|
| 80 | - "measures" => $measures, |
|
| 81 | - "times" => array( |
|
| 82 | - "start" => $this->requestStartTime, |
|
| 83 | - "end" => time() |
|
| 84 | - ) |
|
| 85 | - )); |
|
| 74 | + $measures = $this->buildMeasures($formattedTree, $request->getMeasures()); |
|
| 75 | + |
|
| 76 | + $trace = $request->getTrace(); |
|
| 77 | + array_unshift($trace, array( |
|
| 78 | + "module" => "Wikidata", |
|
| 79 | + "tree" => $formattedTree, |
|
| 80 | + "measures" => $measures, |
|
| 81 | + "times" => array( |
|
| 82 | + "start" => $this->requestStartTime, |
|
| 83 | + "end" => time() |
|
| 84 | + ) |
|
| 85 | + )); |
|
| 86 | 86 | |
| 87 | 87 | return array(new ModuleResponse( |
| 88 | 88 | $request->getLanguageCode(), |
| 89 | 89 | $formattedTree, |
| 90 | - $measures, |
|
| 91 | - $trace |
|
| 90 | + $measures, |
|
| 91 | + $trace |
|
| 92 | 92 | )); |
| 93 | 93 | } |
| 94 | 94 | |