Passed
Push — master ( 151185...42f330 )
by P.R.
04:09
created

TableWrapper::writeRoutineFunctionLobReturnData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 0
nc 1
nop 0
dl 0
loc 2
ccs 0
cts 0
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace SetBased\Stratum\MySql\Wrapper;
5
6
use SetBased\Stratum\MySql\Exception\MySqlDataLayerException;
7
8
/**
9
 * Class for generating a wrapper method for a stored procedure of which the selected rows must be echoed in a table
10
 * layout.
11
 */
12
class TableWrapper extends Wrapper
13
{
14
  //--------------------------------------------------------------------------------------------------------------------
15
  /**
16
   * @inheritdoc
17
   */
18 1
  protected function getDocBlockReturnType(): string
19
  {
20 1
    return 'int';
21
  }
22
23
  //--------------------------------------------------------------------------------------------------------------------
24
  /**
25
   * @inheritdoc
26
   */
27 1
  protected function getReturnTypeDeclaration(): string
28
  {
29 1
    return ': int';
30
  }
31
32
  //--------------------------------------------------------------------------------------------------------------------
33
  /**
34
   * @inheritdoc
35
   */
36 1
  protected function writeResultHandler(): void
37
  {
38 1
    $this->throws(MySqlDataLayerException::class);
39
40 1
    $routineArgs = $this->getRoutineArgs();
41 1
    $this->codeStore->append('return $this->executeTable(\'call '.$this->routine['routine_name'].'('.$routineArgs.')\');');
42
  }
43
44
  //--------------------------------------------------------------------------------------------------------------------
45
  /**
46
   * @inheritdoc
47
   */
48
  protected function writeRoutineFunctionLobFetchData(): void
49
  {
50
    // Nothing to do.
51
  }
52
53
  //--------------------------------------------------------------------------------------------------------------------
54
  /**
55
   * @inheritdoc
56
   */
57
  protected function writeRoutineFunctionLobReturnData(): void
58
  {
59
    // Nothing to do.
60
  }
61
62
  //--------------------------------------------------------------------------------------------------------------------
63
}
64
65
//----------------------------------------------------------------------------------------------------------------------
66