for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
if (!function_exists('builder'))
{
/**
* @return \Bavix\Builder\Builder
*/
function builder()
global $builder;
global
Instead of relying on global state, we recommend one of these alternatives:
function myFunction($a, $b) { // Do something }
class MyClass { private $a; private $b; public function __construct($a, $b) { $this->a = $a; $this->b = $b; } public function myFunction() { // Do something } }
return $builder;
}
if (!function_exists('config'))
* @param string $name
*
* @return \Bavix\Slice\Slice
function config(string $name)
return $builder->config()->get($name);
if (!function_exists('factory'))
* @return \Bavix\Processors\Factory
function factory()
return $builder->factory();
Instead of relying on
global
state, we recommend one of these alternatives:1. Pass all data via parameters
2. Create a class that maintains your state