Issues (1369)

classes/Storage.php (1 issue)

Severity
1
<?php
2
3
/**
4
 * Created by Gorlum 10.02.2017 0:28
5
 */
6
7
use Core\GlobalContainer;
8
9
/**
10
 * Class Storage
11
 * @deprecated
12
 */
13
class Storage {
14
15
  /**
16
   * Storage constructor.
17
   *
18
   * @param GlobalContainer $gc
19
   */
20
  public function __construct(GlobalContainer $gc) {
0 ignored issues
show
The parameter $gc is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

20
  public function __construct(/** @scrutinizer ignore-unused */ GlobalContainer $gc) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
21
  }
22
23
  /**
24
   * @param TextRecordDescription $recordDescription
25
   * @param string|int            $id
26
   *
27
   * @return array|null
28
   */
29
  public function loadById($recordDescription, $id) {
30
    $dbq = new \DBAL\DbQuery($recordDescription->db);
31
    $dbq
32
      ->setTable($recordDescription->table)
33
      ->setOneRow()
34
      ->setWhereArray(array($recordDescription->indexFieldName => $id));
35
    return $recordDescription->db->dbqSelectAndFetch($dbq);
36
  }
37
38
}
39