for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Portiere\WebServer;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Templating\Loader\FilesystemLoader;
use Symfony\Component\Templating\PhpEngine;
use Symfony\Component\Templating\TemplateNameParser;
/**
* Class ManagerFactory.
*
* The ManagerFactory creates a Manager instances of the currently running web server
* @author Ignacio Velazquez <[email protected]>
*/
class ManagerFactory
{
* Creates a Manager depending on the running web server.
* @return NginxManager
public static function create()
$fs = new Filesystem();
$loader = new FilesystemLoader(__DIR__.'/../Resources/views/%name%');
__DIR__ . '/../Resources/views/%name%'
string
array
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example:
function acceptsInteger($int) { } $x = '123'; // string "123" // Instead of acceptsInteger($x); // we recommend to use acceptsInteger((integer) $x);
$templating = new PhpEngine(new TemplateNameParser(), $loader);
return new NginxManager($fs, $templating);
}
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: