以下のコードに対してエラーや警告なしで実行されるcodesnifferの標準はありますか?コード標準を作成するためのチュートリアルがない場合は、すでに実装されている標準のさまざまなスニファーについても説明していますか?
<?php
/**
* project name
*
* description
*
* @author First Last <email@google.com>
*/
class Cookie
{
public static function set($key, $user, $timeout, $data, $sessionId)
{
foreach($user as $key => $value)
{
// some other things
}
if($key > 1)
{
// Line length 120
// Unix line endings
// no counts in loops
}
elseif($key == 1)
{
$timeout = TRUE;
}
switch ($data)
{
case '1':
{
// only '' for strings
}break;
case '2':
{
}break;
default:
{
}break;
}
}
public static function get($key)
{
}
public static function delete($key)
{
}
}
?>
回答ありがとうございます。