for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the docodeit/wechat.
*
* (c) docodeit <[email protected]>
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace JinWeChat;
/**
* 入口文件.
* @method static OfficialAccount\Application officialAccount(array $config)
**/
class Factory
{
* @param $name
* @param array $config
* @return mixed
public static function make($name, array $config)
$application = "\\JinWeChat\\{$name}\\Application";
return new $application($config);
}
* @param $args
public static function __callStatic($name, $args)
$name = ucwords(str_replace(['-', '_'], ' ', $name));
return self::make($name, ...$args);
$args
$config
JinWeChat\Factory::make()
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
ignore-type
return self::make($name, /** @scrutinizer ignore-type */ ...$args);