Passed
Push — 8.x-2.x ( bfb9ec...68110c )
by Frédéric G.
03:30
created

TopResult   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A bsonUnserialize() 0 4 1
1
<?php
2
3
namespace Drupal\mongodb_watchdog\Controller;
4
5
use MongoDB\BSON\Unserializable;
6
7
/**
8
 * Class TopResult is a value object holding the Top aggregation results.
9
 */
10
final class TopResult implements Unserializable {
11
12
  /**
13
   * The number of hits on the grouped URL.
14
   *
15
   * @var int
16
   */
17
  public $count;
18
19
  /**
20
   * The URL on which the count of hits is grouped.
21
   *
22
   * @var string
23
   */
24
  public $uri;
25
26
  /**
27
   * {@inheritDoc}
28
   */
29
  public function bsonUnserialize(array $data) {
30
    $this->uri = $data['_id'];
31
    $this->count = $data['count'];
32
  }
33
34
}
35