Passed
Pull Request — main (#116)
by Andreas
08:51
created

PDOStatementImplementationPhp7::fetchAll()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 3
rs 10
1
<?php
2
/**
3
 * Licensed to CRATE Technology GmbH("Crate") under one or more contributor
4
 * license agreements.  See the NOTICE file distributed with this work for
5
 * additional information regarding copyright ownership.  Crate licenses
6
 * this file to you under the Apache License, Version 2.0 (the "License");
7
 * you may not use this file except in compliance with the License.  You may
8
 * obtain a copy of the License at
9
 *
10
 * http://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing, software
13
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
15
 * License for the specific language governing permissions and limitations
16
 * under the License.
17
 *
18
 * However, if you have executed another commercial license agreement
19
 * with Crate these terms will supersede the license and you may use the
20
 * software solely pursuant to the terms of the relevant commercial agreement.
21
 */
22
23
declare(strict_types=1);
24
25
namespace Crate\PDO;
26
27
use function func_get_args;
28
29
/**
30
 * @internal
31
 */
32
trait PDOStatementImplementationPhp7
33
{
34
    /**
35
     * @deprecated Use one of the fetch- or iterate-related methods.
36
     *
37
     * @param int   $fetchMode
38
     * @param mixed $arg2
39
     * @param mixed $arg3
40
     */
41
    public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null): bool
42
    {
43
        return $this->doSetFetchMode(...func_get_args());
0 ignored issues
show
Bug introduced by
The method doSetFetchMode() does not exist on Crate\PDO\PDOStatementImplementationPhp7. Did you maybe mean setFetchMode()? ( Ignorable by Annotation )

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

43
        return $this->/** @scrutinizer ignore-call */ doSetFetchMode(...func_get_args());

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
44
    }
45
46
    /**
47
     * @deprecated Use fetchAllNumeric(), fetchAllAssociative() or fetchFirstColumn() instead.
48
     *
49
     * @param int|null $fetchMode
50
     * @param mixed    $fetchArgument
51
     * @param mixed    $ctorArgs
52
     *
53
     * @return mixed[]
54
     */
55
    public function fetchAll($fetchMode = null, $fetchArgument = null, $ctorArgs = null)
56
    {
57
        return $this->doFetchAll(...func_get_args());
0 ignored issues
show
Bug introduced by
It seems like doFetchAll() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

57
        return $this->/** @scrutinizer ignore-call */ doFetchAll(...func_get_args());
Loading history...
58
    }
59
}
60