Code Duplication    Length = 5-5 lines in 2 locations

src/Database/Bindings/DevicesBinding.php 1 location

@@ 98-102 (lines=5) @@
95
    protected function instantiateObject($databaseRow, $params)
96
    {
97
        $logs = Device::SUPPRESS_LOGS;
98
        if (self::parameterValueExists($params, self::SCOPE_INCLUDE, self::INCLUDE_LOGS)) {
99
            $params = self::consumeParameterValue($params, self::SCOPE_INCLUDE, self::INCLUDE_LOGS);
100
            $params = self::consumeParameterValue($params, self::SCOPE_INCLUDE, LogsBinding::INCLUDE_DEVICE);
101
            $logs = $this->logs()->listByDevice($databaseRow['id'], $params);
102
        }
103
        return $this->object($databaseRow, $logs);
104
    }
105

src/Database/Bindings/EntriesBinding.php 1 location

@@ 71-75 (lines=5) @@
68
    {
69
        $log = Entry::SUPPRESS_LOG;
70
        $user = Entry::SUPPRESS_USER;
71
        if (self::parameterValueExists($params,self::SCOPE_INCLUDE,self::INCLUDE_LOG)) {
72
            $params = self::consumeParameterValue($params,self::SCOPE_INCLUDE,self::INCLUDE_LOG);
73
            $params = self::consumeParameterValue($params,self::SCOPE_INCLUDE,LogsBinding::INCLUDE_ENTRIES);
74
            $log = $this->logs()->get($databaseRow[Log::ID], $params);
75
        }
76
        if (self::parameterValueExists($params, self::SCOPE_INCLUDE, self::INCLUDE_USER)) {
77
            $params = self::consumeParameterValue($params, self::SCOPE_INCLUDE,self::INCLUDE_USER);
78
            $user = $this->users()->get($databaseRow[User::ID], $params);