Completed
Push — work-fleets ( b0e897...355465 )
by SuperNova.WS
13:11 queued 07:54
created

DbSqlHelper::UCFirstByRef()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
ccs 3
cts 3
cp 1
crap 1
1
<?php
2
3
class DbSqlHelper {
4
5 3
  public static function UCFirstByRef(&$value) {
6 3
    $value = ucfirst($value);
7 3
  }
8
9
  /**
10
   * Quotes comment with SQL comment statement
11
   * Make checks for comment limiters in comment
12
   *
13
   * @param $comment
14
   *
15
   * @return string
16
   */
17
  public static function quoteComment($comment) {
18
    if($comment == '') {
19
      return '';
20
    }
21
22
    $comment = str_replace(array('/*', '*/'), '__',$comment);
23
24
    return "\r\n/*" . $comment . "*/";
25
  }
26
27
}
28