It seems like the GitHub access token used for retrieving details about this repository from
GitHub became invalid. This might prevent certain types of inspections from being run (in
particular,
everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
An exit expression should only be used in rare cases. For example, if you
write a short command line script.
In most cases however, using an exit expression makes the code untestable
and often causes incompatibilities with other libraries. Thus, unless you are
absolutely sure it is required here, we recommend to refactor your code to
avoid its usage.
Loading history...
20
}
21
}
22
}
23
24
/**
25
* @param string $nameFile nome do arquivo a ser criado
26
* @param string $tplContent Conteudo do Template
27
* @param bool $overwrite Sobrescreve o arquivo ja existente
28
*
29
* @return boolean
30
*/
31
public static function makeSourcer ( $nameFile, $tplContent, $overwrite = false )
32
{
33
if ( !$overwrite && is_file ( $nameFile ) )
34
{
35
return false;
36
}
37
38
if ( !file_put_contents ( $nameFile, $tplContent ) )
39
{
40
die( "\033[0;31mError: could not write model file $nameFile.\033[0m\n" );
The method makeSourcer() contains an exit expression.
An exit expression should only be used in rare cases. For example, if you
write a short command line script.
In most cases however, using an exit expression makes the code untestable
and often causes incompatibilities with other libraries. Thus, unless you are
absolutely sure it is required here, we recommend to refactor your code to
avoid its usage.
Loading history...
41
}
42
43
return true;
44
}
45
46
/**
47
* @param string $str
48
*
49
* @return string
50
*/
51
public static function getClassName ( $str )
52
{
53
$temp = '';
54
foreach ( explode ( self::SEPARETOR, $str ) as $part )
55
{
56
$temp .= ucfirst ( strtolower( $part ) );
57
}
58
59
return $temp;
60
}
61
62
protected function getParsedTplContents ( $filePath, $vars = array () )
An exit expression should only be used in rare cases. For example, if you write a short command line script.
In most cases however, using an
exit
expression makes the code untestable and often causes incompatibilities with other libraries. Thus, unless you are absolutely sure it is required here, we recommend to refactor your code to avoid its usage.