Passed
Pull Request — master (#2)
by
unknown
05:11
created
tests/TestCase/Controller/VatNumberChecksControllerTest.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,10 +16,10 @@  discard block
 block discarded – undo
16 16
  */
17 17
 	public $fixtures = [];
18 18
 /**
19
- * Tests `/vat_number_check/vat_number_checks/check.json`.
20
- *
21
- * @return void
22
- */
19
+	 * Tests `/vat_number_check/vat_number_checks/check.json`.
20
+	 *
21
+	 * @return void
22
+	 */
23 23
 	public function testCheck() {
24 24
 		$url = '/vat_number_check/vat_number_checks/check.json';
25 25
 		// Post request, correct vat
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
 		$this->assertSame($expected, $actual);
66 66
 	}
67 67
 /**
68
- * Gets a mocked controller instance.
69
- *
70
- * @return VatNumberChecksController
71
- */
68
+	 * Gets a mocked controller instance.
69
+	 *
70
+	 * @return VatNumberChecksController
71
+	 */
72 72
 	protected function _getMock() {
73 73
 		$VatNumberChecks = $this->generate('VatNumberCheck.VatNumberChecks');
74 74
 		$VatNumberChecks->VatNumberCheck = ClassRegistry::init('VatNumberCheck.VatNumberCheck', true);
Please login to merge, or discard this patch.
tests/test_app/src/Application.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@
 block discarded – undo
8 8
 
9 9
 class Application extends BaseApplication
10 10
 {
11
-    public function middleware($middlewareQueue)
12
-    {
13
-        $middlewareQueue
14
-            ->add(ErrorHandlerMiddleware::class)
15
-            ->add(AssetMiddleware::class)
16
-            ->add(new RoutingMiddleware($this, '_cake_routes_'));
11
+	public function middleware($middlewareQueue)
12
+	{
13
+		$middlewareQueue
14
+			->add(ErrorHandlerMiddleware::class)
15
+			->add(AssetMiddleware::class)
16
+			->add(new RoutingMiddleware($this, '_cake_routes_'));
17 17
 
18
-        return $middlewareQueue;
19
-    }
18
+		return $middlewareQueue;
19
+	}
20 20
 }
21 21
\ No newline at end of file
Please login to merge, or discard this patch.
tests/bootstrap.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 use Cake\Filesystem\Folder;
7 7
 
8 8
 if (!defined('DS')) {
9
-    define('DS', DIRECTORY_SEPARATOR);
9
+	define('DS', DIRECTORY_SEPARATOR);
10 10
 }
11 11
 
12 12
 require_once 'vendor' . DS . 'autoload.php';
@@ -47,50 +47,50 @@  discard block
 block discarded – undo
47 47
 
48 48
 Configure::write('debug', true);
49 49
 Configure::write('App', [
50
-    'namespace' => 'VatNumberCheck\Test\TestApp',
51
-    'encoding' => 'UTF-8',
52
-    'base' => false,
53
-    'baseUrl' => false,
54
-    'dir' => APP_DIR,
55
-    'webroot' => 'webroot',
56
-    'wwwRoot' => WWW_ROOT,
57
-    'fullBaseUrl' => 'http://localhost',
58
-    'imageBaseUrl' => 'img/',
59
-    'jsBaseUrl' => 'js/',
60
-    'cssBaseUrl' => 'css/',
61
-    'paths' => [
62
-        'plugins' => [TEST_APP . 'Plugin' . DS],
63
-        'templates' => [APP . 'Template' . DS],
64
-        'locales' => [APP . 'Locale' . DS],
65
-    ]
50
+	'namespace' => 'VatNumberCheck\Test\TestApp',
51
+	'encoding' => 'UTF-8',
52
+	'base' => false,
53
+	'baseUrl' => false,
54
+	'dir' => APP_DIR,
55
+	'webroot' => 'webroot',
56
+	'wwwRoot' => WWW_ROOT,
57
+	'fullBaseUrl' => 'http://localhost',
58
+	'imageBaseUrl' => 'img/',
59
+	'jsBaseUrl' => 'js/',
60
+	'cssBaseUrl' => 'css/',
61
+	'paths' => [
62
+		'plugins' => [TEST_APP . 'Plugin' . DS],
63
+		'templates' => [APP . 'Template' . DS],
64
+		'locales' => [APP . 'Locale' . DS],
65
+	]
66 66
 ]);
67 67
 
68 68
 
69 69
 Configure::write('Session', [
70
-    'defaults' => 'php'
70
+	'defaults' => 'php'
71 71
 ]);
72 72
 
73 73
 Cache::setConfig([
74
-    'default' => [
75
-        'engine' => 'Cake\Cache\Engine\FileEngine',
76
-        'prefix' => 'default_',
77
-        'serialize' => true
78
-    ],
79
-    '_cake_core_' => [
80
-        'engine' => 'Cake\Cache\Engine\FileEngine',
81
-        'prefix' => 'cake_core_',
82
-        'serialize' => true
83
-    ],
84
-    '_cake_model_' => [
85
-        'engine' => 'Cake\Cache\Engine\FileEngine',
86
-        'prefix' => 'cake_model_',
87
-        'serialize' => true
88
-    ],
89
-    '_cake_routes_' => [
90
-        'engine' => 'Cake\Cache\Engine\FileEngine',
91
-        'prefix' => 'cake_model_',
92
-        'serialize' => true
93
-    ],
74
+	'default' => [
75
+		'engine' => 'Cake\Cache\Engine\FileEngine',
76
+		'prefix' => 'default_',
77
+		'serialize' => true
78
+	],
79
+	'_cake_core_' => [
80
+		'engine' => 'Cake\Cache\Engine\FileEngine',
81
+		'prefix' => 'cake_core_',
82
+		'serialize' => true
83
+	],
84
+	'_cake_model_' => [
85
+		'engine' => 'Cake\Cache\Engine\FileEngine',
86
+		'prefix' => 'cake_model_',
87
+		'serialize' => true
88
+	],
89
+	'_cake_routes_' => [
90
+		'engine' => 'Cake\Cache\Engine\FileEngine',
91
+		'prefix' => 'cake_model_',
92
+		'serialize' => true
93
+	],
94 94
 ]);
95 95
 
96 96
 // Plugin::getCollection()->add(new VatNumberCheck\Plugin());
97 97
\ No newline at end of file
Please login to merge, or discard this patch.
src/Application.php 1 patch
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -29,53 +29,53 @@
 block discarded – undo
29 29
  */
30 30
 class Application extends BaseApplication
31 31
 {
32
-    /**
33
-     * {@inheritDoc}
34
-     */
35
-    public function bootstrap()
36
-    {
37
-        // Call parent to load bootstrap from files.
38
-        parent::bootstrap();
32
+	/**
33
+	 * {@inheritDoc}
34
+	 */
35
+	public function bootstrap()
36
+	{
37
+		// Call parent to load bootstrap from files.
38
+		parent::bootstrap();
39 39
 
40
-        if (PHP_SAPI === 'cli') {
41
-            try {
42
-                $this->addPlugin('Bake');
43
-            } catch (MissingPluginException $e) {
44
-                unset($e);
45
-            }
46
-            $this->addPlugin('Migrations');
47
-        }
40
+		if (PHP_SAPI === 'cli') {
41
+			try {
42
+				$this->addPlugin('Bake');
43
+			} catch (MissingPluginException $e) {
44
+				unset($e);
45
+			}
46
+			$this->addPlugin('Migrations');
47
+		}
48 48
 
49
-        if (Configure::read('debug')) {
50
-            $this->addPlugin(\DebugKit\Plugin::class, ['bootstrap' => true]);
51
-        }
49
+		if (Configure::read('debug')) {
50
+			$this->addPlugin(\DebugKit\Plugin::class, ['bootstrap' => true]);
51
+		}
52 52
 
53 53
 		$this->addPlugin(\VatNumberCheck\Plugin::class, ['routes' => true, 'bootstrap' => false]);
54
-    }
54
+	}
55 55
 
56
-    /**
57
-     * Setup the middleware queue your application will use.
58
-     *
59
-     * @param \Cake\Http\MiddlewareQueue $middlewareQueue The middleware queue to setup.
60
-     * @return \Cake\Http\MiddlewareQueue The updated middleware queue.
61
-     */
62
-    public function middleware($middlewareQueue)
63
-    {
64
-        // @phan-suppress-next-line PhanUndeclaredFunctionInCallable
65
-        $middlewareQueue
66
-            // Catch any exceptions in the lower layers,
67
-            // and make an error page/response
68
-            ->add(ErrorHandlerMiddleware::class)
56
+	/**
57
+	 * Setup the middleware queue your application will use.
58
+	 *
59
+	 * @param \Cake\Http\MiddlewareQueue $middlewareQueue The middleware queue to setup.
60
+	 * @return \Cake\Http\MiddlewareQueue The updated middleware queue.
61
+	 */
62
+	public function middleware($middlewareQueue)
63
+	{
64
+		// @phan-suppress-next-line PhanUndeclaredFunctionInCallable
65
+		$middlewareQueue
66
+			// Catch any exceptions in the lower layers,
67
+			// and make an error page/response
68
+			->add(ErrorHandlerMiddleware::class)
69 69
 
70
-            // Handle plugin/theme assets like CakePHP normally does.
71
-            ->add(AssetMiddleware::class)
70
+			// Handle plugin/theme assets like CakePHP normally does.
71
+			->add(AssetMiddleware::class)
72 72
 
73
-            // Add routing middleware.
74
-            // Routes collection cache enabled by default, to disable route caching
75
-            // pass null as cacheConfig, example: `new RoutingMiddleware($this)`
76
-            // you might want to disable this cache in case your routing is extremely simple
77
-            ->add(new RoutingMiddleware($this, '_cake_routes_'));
73
+			// Add routing middleware.
74
+			// Routes collection cache enabled by default, to disable route caching
75
+			// pass null as cacheConfig, example: `new RoutingMiddleware($this)`
76
+			// you might want to disable this cache in case your routing is extremely simple
77
+			->add(new RoutingMiddleware($this, '_cake_routes_'));
78 78
 
79
-        return $middlewareQueue;
80
-    }
79
+		return $middlewareQueue;
80
+	}
81 81
 }
Please login to merge, or discard this patch.
src/Soap/Soap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
 			try {
99 99
 				$this->client = new SoapClient($this->getConfig('wsdl'), $options);
100 100
 				return (bool)$this->client;
101
-			} catch(SoapFault $fault) {
101
+			} catch (SoapFault $fault) {
102 102
 				$this->showError($fault->faultstring);
103 103
 			}
104 104
 		}
Please login to merge, or discard this patch.
src/View/Helper/VatNumberCheckHelper.php 1 patch
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -37,28 +37,28 @@  discard block
 block discarded – undo
37 37
 	protected $inputClass = 'vat-number-check';
38 38
 
39 39
  /**
40
- * Generates a vat number check form field.
41
- *
42
- *  See `FormHelper::control`.
43
- *
44
- * @param string $fieldName This should be `Modelname.fieldname`
45
- * @param array $options Each type of input takes different options
46
- * @return string Html output for a form field
47
- */
48
-    public function input(string $fieldName, array $options = []): string
49
-    {
50
-        $this->helperCount += 1;
51
-        if ($this->helperCount === 1) {
52
-            $this->_addJs();
53
-        }
54
-        $options = array_merge($options, ['type' => 'text']);
55
-        $class = $this->inputClass;
56
-        if (empty($options['class'])) {
57
-            $options['class'] = $class;
58
-        } else {
59
-            $options['class'] = sprintf('%s %s', $options['class'], $class);
60
-        }
61
-        return $this->Form->control($fieldName, $options);
40
+  * Generates a vat number check form field.
41
+  *
42
+  *  See `FormHelper::control`.
43
+  *
44
+  * @param string $fieldName This should be `Modelname.fieldname`
45
+  * @param array $options Each type of input takes different options
46
+  * @return string Html output for a form field
47
+  */
48
+	public function input(string $fieldName, array $options = []): string
49
+	{
50
+		$this->helperCount += 1;
51
+		if ($this->helperCount === 1) {
52
+			$this->_addJs();
53
+		}
54
+		$options = array_merge($options, ['type' => 'text']);
55
+		$class = $this->inputClass;
56
+		if (empty($options['class'])) {
57
+			$options['class'] = $class;
58
+		} else {
59
+			$options['class'] = sprintf('%s %s', $options['class'], $class);
60
+		}
61
+		return $this->Form->control($fieldName, $options);
62 62
 	}
63 63
 
64 64
 /**
@@ -66,19 +66,19 @@  discard block
 block discarded – undo
66 66
  *
67 67
  * @return void
68 68
  */
69
-    protected function _addJs()
70
-    {
71
-        // $checkUrl = $this->Url->build([
72
-        //     'plugin' => 'VatNumberCheck', 'controller' => 'VatNumberChecks', 'action' => 'check', '_ext' => 'json'
69
+	protected function _addJs()
70
+	{
71
+		// $checkUrl = $this->Url->build([
72
+		//     'plugin' => 'VatNumberCheck', 'controller' => 'VatNumberChecks', 'action' => 'check', '_ext' => 'json'
73 73
 		// ]);
74 74
 		$checkUrl = '...';
75
-        // $checkImages = [
76
-        //     'ok' => $this->Url->build('/vat_number_check/img/ok.png'),
77
-        //     'failure' => $this->Url->build('/vat_number_check/img/failure.png'),
78
-        //     'serviceUnavailable' => $this->Url->build('/vat_number_check/img/service-unavailable.png'),
75
+		// $checkImages = [
76
+		//     'ok' => $this->Url->build('/vat_number_check/img/ok.png'),
77
+		//     'failure' => $this->Url->build('/vat_number_check/img/failure.png'),
78
+		//     'serviceUnavailable' => $this->Url->build('/vat_number_check/img/service-unavailable.png'),
79 79
 		// ];
80 80
 		$checkImages = [];
81
-        $script = "
81
+		$script = "
82 82
             /* jshint jquery:true */
83 83
             jQuery.noConflict();
84 84
             (function($) {
@@ -92,9 +92,9 @@  discard block
 block discarded – undo
92 92
                 });
93 93
             })(jQuery);
94 94
         ";
95
-        $this->Html->script([
96
-            'VatNumberCheck.jquery.min', 'VatNumberCheck.klass.min', 'VatNumberCheck.vat_number_check'
97
-        ], ['inline' => false, 'once' => true]);
98
-        $this->Html->scriptBlock($script, ['inline' => false]);
99
-    }
95
+		$this->Html->script([
96
+			'VatNumberCheck.jquery.min', 'VatNumberCheck.klass.min', 'VatNumberCheck.vat_number_check'
97
+		], ['inline' => false, 'once' => true]);
98
+		$this->Html->scriptBlock($script, ['inline' => false]);
99
+	}
100 100
 }
101 101
\ No newline at end of file
Please login to merge, or discard this patch.
config/routes.php 2 patches
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -47,48 +47,48 @@
 block discarded – undo
47 47
 Router::defaultRouteClass(DashedRoute::class);
48 48
 
49 49
 Router::scope('/', function (RouteBuilder $routes) {
50
-    // Register scoped middleware for in scopes.
51
-    $routes->registerMiddleware('csrf', new CsrfProtectionMiddleware([
52
-        'httpOnly' => true
53
-    ]));
50
+	// Register scoped middleware for in scopes.
51
+	$routes->registerMiddleware('csrf', new CsrfProtectionMiddleware([
52
+		'httpOnly' => true
53
+	]));
54 54
 
55
-    /**
56
-     * Apply a middleware to the current route scope.
57
-     * Requires middleware to be registered via `Application::routes()` with `registerMiddleware()`
58
-     */
59
-    $routes->applyMiddleware('csrf');
55
+	/**
56
+	 * Apply a middleware to the current route scope.
57
+	 * Requires middleware to be registered via `Application::routes()` with `registerMiddleware()`
58
+	 */
59
+	$routes->applyMiddleware('csrf');
60 60
 
61
-    /**
62
-     * Here, we are connecting '/' (base path) to a controller called 'Pages',
63
-     * its action called 'display', and we pass a param to select the view file
64
-     * to use (in this case, src/Template/Pages/home.ctp)...
65
-     */
66
-    $routes->connect('/', ['controller' => 'Pages', 'action' => 'display', 'home']);
61
+	/**
62
+	 * Here, we are connecting '/' (base path) to a controller called 'Pages',
63
+	 * its action called 'display', and we pass a param to select the view file
64
+	 * to use (in this case, src/Template/Pages/home.ctp)...
65
+	 */
66
+	$routes->connect('/', ['controller' => 'Pages', 'action' => 'display', 'home']);
67 67
 
68
-    /**
69
-     * ...and connect the rest of 'Pages' controller's URLs.
70
-     */
71
-    $routes->connect('/pages/*', ['controller' => 'Pages', 'action' => 'display']);
68
+	/**
69
+	 * ...and connect the rest of 'Pages' controller's URLs.
70
+	 */
71
+	$routes->connect('/pages/*', ['controller' => 'Pages', 'action' => 'display']);
72 72
 
73
-    /**
74
-     * Connect catchall routes for all controllers.
75
-     *
76
-     * Using the argument `DashedRoute`, the `fallbacks` method is a shortcut for
77
-     *
78
-     * ```
79
-     * $routes->connect('/:controller', ['action' => 'index'], ['routeClass' => 'DashedRoute']);
80
-     * $routes->connect('/:controller/:action/*', [], ['routeClass' => 'DashedRoute']);
81
-     * ```
82
-     *
83
-     * Any route class can be used with this method, such as:
84
-     * - DashedRoute
85
-     * - InflectedRoute
86
-     * - Route
87
-     * - Or your own route class
88
-     *
89
-     * You can remove these routes once you've connected the
90
-     * routes you want in your application.
91
-     */
73
+	/**
74
+	 * Connect catchall routes for all controllers.
75
+	 *
76
+	 * Using the argument `DashedRoute`, the `fallbacks` method is a shortcut for
77
+	 *
78
+	 * ```
79
+	 * $routes->connect('/:controller', ['action' => 'index'], ['routeClass' => 'DashedRoute']);
80
+	 * $routes->connect('/:controller/:action/*', [], ['routeClass' => 'DashedRoute']);
81
+	 * ```
82
+	 *
83
+	 * Any route class can be used with this method, such as:
84
+	 * - DashedRoute
85
+	 * - InflectedRoute
86
+	 * - Route
87
+	 * - Or your own route class
88
+	 *
89
+	 * You can remove these routes once you've connected the
90
+	 * routes you want in your application.
91
+	 */
92 92
 	$routes->fallbacks(DashedRoute::class);
93 93
 });
94 94
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
  */
47 47
 Router::defaultRouteClass(DashedRoute::class);
48 48
 
49
-Router::scope('/', function (RouteBuilder $routes) {
49
+Router::scope('/', function(RouteBuilder $routes) {
50 50
     // Register scoped middleware for in scopes.
51 51
     $routes->registerMiddleware('csrf', new CsrfProtectionMiddleware([
52 52
         'httpOnly' => true
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	$routes->fallbacks(DashedRoute::class);
93 93
 });
94 94
 
95
-Router::plugin('VatNumberCheck', ['path' => '/vat_number_check'], function (RouteBuilder $routes) {
95
+Router::plugin('VatNumberCheck', ['path' => '/vat_number_check'], function(RouteBuilder $routes) {
96 96
 	$routes->addExtensions(['json']);
97 97
 	$routes->fallbacks(InflectedRoute::class);
98 98
 });
Please login to merge, or discard this patch.
config/app.php 1 patch
Indentation   +238 added lines, -238 removed lines patch added patch discarded remove patch
@@ -1,180 +1,180 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 return [
3
-    /**
4
-     * Debug Level:
5
-     *
6
-     * Production Mode:
7
-     * false: No error messages, errors, or warnings shown.
8
-     *
9
-     * Development Mode:
10
-     * true: Errors and warnings shown.
11
-     */
12
-    'debug' => filter_var(env('DEBUG', true), FILTER_VALIDATE_BOOLEAN),
3
+	/**
4
+	 * Debug Level:
5
+	 *
6
+	 * Production Mode:
7
+	 * false: No error messages, errors, or warnings shown.
8
+	 *
9
+	 * Development Mode:
10
+	 * true: Errors and warnings shown.
11
+	 */
12
+	'debug' => filter_var(env('DEBUG', true), FILTER_VALIDATE_BOOLEAN),
13 13
 
14
-    /**
15
-     * Configure basic information about the application.
16
-     *
17
-     * - namespace - The namespace to find app classes under.
18
-     * - defaultLocale - The default locale for translation, formatting currencies and numbers, date and time.
19
-     * - encoding - The encoding used for HTML + database connections.
20
-     * - base - The base directory the app resides in. If false this
21
-     *   will be auto detected.
22
-     * - dir - Name of app directory.
23
-     * - webroot - The webroot directory.
24
-     * - wwwRoot - The file path to webroot.
25
-     * - baseUrl - To configure CakePHP to *not* use mod_rewrite and to
26
-     *   use CakePHP pretty URLs, remove these .htaccess
27
-     *   files:
28
-     *      /.htaccess
29
-     *      /webroot/.htaccess
30
-     *   And uncomment the baseUrl key below.
31
-     * - fullBaseUrl - A base URL to use for absolute links. When set to false (default)
32
-     *   CakePHP generates required value based on `HTTP_HOST` environment variable.
33
-     *   However, you can define it manually to optimize performance or if you
34
-     *   are concerned about people manipulating the `Host` header.
35
-     * - imageBaseUrl - Web path to the public images directory under webroot.
36
-     * - cssBaseUrl - Web path to the public css directory under webroot.
37
-     * - jsBaseUrl - Web path to the public js directory under webroot.
38
-     * - paths - Configure paths for non class based resources. Supports the
39
-     *   `plugins`, `templates`, `locales` subkeys, which allow the definition of
40
-     *   paths for plugins, view templates and locale files respectively.
41
-     */
42
-    'App' => [
43
-        'namespace' => 'App',
44
-        'encoding' => env('APP_ENCODING', 'UTF-8'),
45
-        'defaultLocale' => env('APP_DEFAULT_LOCALE', 'en_US'),
46
-        'defaultTimezone' => env('APP_DEFAULT_TIMEZONE', 'UTC'),
47
-        'base' => false,
48
-        'dir' => 'src',
49
-        'webroot' => 'webroot',
50
-        'wwwRoot' => WWW_ROOT,
51
-        //'baseUrl' => env('SCRIPT_NAME'),
52
-        'fullBaseUrl' => false,
53
-        'imageBaseUrl' => 'img/',
54
-        'cssBaseUrl' => 'css/',
55
-        'jsBaseUrl' => 'js/',
56
-        'paths' => [
57
-            'plugins' => [ROOT . DS . 'plugins' . DS],
58
-            'templates' => [APP . 'Template' . DS],
59
-            'locales' => [APP . 'Locale' . DS],
60
-        ],
61
-    ],
14
+	/**
15
+	 * Configure basic information about the application.
16
+	 *
17
+	 * - namespace - The namespace to find app classes under.
18
+	 * - defaultLocale - The default locale for translation, formatting currencies and numbers, date and time.
19
+	 * - encoding - The encoding used for HTML + database connections.
20
+	 * - base - The base directory the app resides in. If false this
21
+	 *   will be auto detected.
22
+	 * - dir - Name of app directory.
23
+	 * - webroot - The webroot directory.
24
+	 * - wwwRoot - The file path to webroot.
25
+	 * - baseUrl - To configure CakePHP to *not* use mod_rewrite and to
26
+	 *   use CakePHP pretty URLs, remove these .htaccess
27
+	 *   files:
28
+	 *      /.htaccess
29
+	 *      /webroot/.htaccess
30
+	 *   And uncomment the baseUrl key below.
31
+	 * - fullBaseUrl - A base URL to use for absolute links. When set to false (default)
32
+	 *   CakePHP generates required value based on `HTTP_HOST` environment variable.
33
+	 *   However, you can define it manually to optimize performance or if you
34
+	 *   are concerned about people manipulating the `Host` header.
35
+	 * - imageBaseUrl - Web path to the public images directory under webroot.
36
+	 * - cssBaseUrl - Web path to the public css directory under webroot.
37
+	 * - jsBaseUrl - Web path to the public js directory under webroot.
38
+	 * - paths - Configure paths for non class based resources. Supports the
39
+	 *   `plugins`, `templates`, `locales` subkeys, which allow the definition of
40
+	 *   paths for plugins, view templates and locale files respectively.
41
+	 */
42
+	'App' => [
43
+		'namespace' => 'App',
44
+		'encoding' => env('APP_ENCODING', 'UTF-8'),
45
+		'defaultLocale' => env('APP_DEFAULT_LOCALE', 'en_US'),
46
+		'defaultTimezone' => env('APP_DEFAULT_TIMEZONE', 'UTC'),
47
+		'base' => false,
48
+		'dir' => 'src',
49
+		'webroot' => 'webroot',
50
+		'wwwRoot' => WWW_ROOT,
51
+		//'baseUrl' => env('SCRIPT_NAME'),
52
+		'fullBaseUrl' => false,
53
+		'imageBaseUrl' => 'img/',
54
+		'cssBaseUrl' => 'css/',
55
+		'jsBaseUrl' => 'js/',
56
+		'paths' => [
57
+			'plugins' => [ROOT . DS . 'plugins' . DS],
58
+			'templates' => [APP . 'Template' . DS],
59
+			'locales' => [APP . 'Locale' . DS],
60
+		],
61
+	],
62 62
 
63
-    /**
64
-     * Security and encryption configuration
65
-     *
66
-     * - salt - A random string used in security hashing methods.
67
-     *   The salt value is also used as the encryption key.
68
-     *   You should treat it as extremely sensitive data.
69
-     */
70
-    'Security' => [
71
-        'salt' => env('SECURITY_SALT', '__SALT__'),
72
-    ],
63
+	/**
64
+	 * Security and encryption configuration
65
+	 *
66
+	 * - salt - A random string used in security hashing methods.
67
+	 *   The salt value is also used as the encryption key.
68
+	 *   You should treat it as extremely sensitive data.
69
+	 */
70
+	'Security' => [
71
+		'salt' => env('SECURITY_SALT', '__SALT__'),
72
+	],
73 73
 
74
-    /**
75
-     * Apply timestamps with the last modified time to static assets (js, css, images).
76
-     * Will append a querystring parameter containing the time the file was modified.
77
-     * This is useful for busting browser caches.
78
-     *
79
-     * Set to true to apply timestamps when debug is true. Set to 'force' to always
80
-     * enable timestamping regardless of debug value.
81
-     */
82
-    'Asset' => [
83
-        //'timestamp' => true,
84
-        // 'cacheTime' => '+1 year'
85
-    ],
74
+	/**
75
+	 * Apply timestamps with the last modified time to static assets (js, css, images).
76
+	 * Will append a querystring parameter containing the time the file was modified.
77
+	 * This is useful for busting browser caches.
78
+	 *
79
+	 * Set to true to apply timestamps when debug is true. Set to 'force' to always
80
+	 * enable timestamping regardless of debug value.
81
+	 */
82
+	'Asset' => [
83
+		//'timestamp' => true,
84
+		// 'cacheTime' => '+1 year'
85
+	],
86 86
 
87
-    /**
88
-     * Configure the cache adapters.
89
-     */
90
-    'Cache' => [
91
-        'default' => [
92
-            'className' => 'Cake\Cache\Engine\FileEngine',
93
-            'path' => CACHE,
94
-            'url' => env('CACHE_DEFAULT_URL', null),
95
-        ],
87
+	/**
88
+	 * Configure the cache adapters.
89
+	 */
90
+	'Cache' => [
91
+		'default' => [
92
+			'className' => 'Cake\Cache\Engine\FileEngine',
93
+			'path' => CACHE,
94
+			'url' => env('CACHE_DEFAULT_URL', null),
95
+		],
96 96
 
97
-        /**
98
-         * Configure the cache used for general framework caching.
99
-         * Translation cache files are stored with this configuration.
100
-         * Duration will be set to '+2 minutes' in bootstrap.php when debug = true
101
-         * If you set 'className' => 'Null' core cache will be disabled.
102
-         */
103
-        '_cake_core_' => [
104
-            'className' => 'Cake\Cache\Engine\FileEngine',
105
-            'prefix' => 'myapp_cake_core_',
106
-            'path' => CACHE . 'persistent/',
107
-            'serialize' => true,
108
-            'duration' => '+1 years',
109
-            'url' => env('CACHE_CAKECORE_URL', null),
110
-        ],
97
+		/**
98
+		 * Configure the cache used for general framework caching.
99
+		 * Translation cache files are stored with this configuration.
100
+		 * Duration will be set to '+2 minutes' in bootstrap.php when debug = true
101
+		 * If you set 'className' => 'Null' core cache will be disabled.
102
+		 */
103
+		'_cake_core_' => [
104
+			'className' => 'Cake\Cache\Engine\FileEngine',
105
+			'prefix' => 'myapp_cake_core_',
106
+			'path' => CACHE . 'persistent/',
107
+			'serialize' => true,
108
+			'duration' => '+1 years',
109
+			'url' => env('CACHE_CAKECORE_URL', null),
110
+		],
111 111
 
112
-        /**
113
-         * Configure the cache for model and datasource caches. This cache
114
-         * configuration is used to store schema descriptions, and table listings
115
-         * in connections.
116
-         * Duration will be set to '+2 minutes' in bootstrap.php when debug = true
117
-         */
118
-        '_cake_model_' => [
119
-            'className' => 'Cake\Cache\Engine\FileEngine',
120
-            'prefix' => 'myapp_cake_model_',
121
-            'path' => CACHE . 'models/',
122
-            'serialize' => true,
123
-            'duration' => '+1 years',
124
-            'url' => env('CACHE_CAKEMODEL_URL', null),
125
-        ],
112
+		/**
113
+		 * Configure the cache for model and datasource caches. This cache
114
+		 * configuration is used to store schema descriptions, and table listings
115
+		 * in connections.
116
+		 * Duration will be set to '+2 minutes' in bootstrap.php when debug = true
117
+		 */
118
+		'_cake_model_' => [
119
+			'className' => 'Cake\Cache\Engine\FileEngine',
120
+			'prefix' => 'myapp_cake_model_',
121
+			'path' => CACHE . 'models/',
122
+			'serialize' => true,
123
+			'duration' => '+1 years',
124
+			'url' => env('CACHE_CAKEMODEL_URL', null),
125
+		],
126 126
 
127
-        /**
128
-         * Configure the cache for routes. The cached routes collection is built the
129
-         * first time the routes are processed via `config/routes.php`.
130
-         * Duration will be set to '+2 seconds' in bootstrap.php when debug = true
131
-         */
132
-        '_cake_routes_' => [
133
-            'className' => 'Cake\Cache\Engine\FileEngine',
134
-            'prefix' => 'myapp_cake_routes_',
135
-            'path' => CACHE,
136
-            'serialize' => true,
137
-            'duration' => '+1 years',
138
-            'url' => env('CACHE_CAKEROUTES_URL', null),
139
-        ],
140
-    ],
127
+		/**
128
+		 * Configure the cache for routes. The cached routes collection is built the
129
+		 * first time the routes are processed via `config/routes.php`.
130
+		 * Duration will be set to '+2 seconds' in bootstrap.php when debug = true
131
+		 */
132
+		'_cake_routes_' => [
133
+			'className' => 'Cake\Cache\Engine\FileEngine',
134
+			'prefix' => 'myapp_cake_routes_',
135
+			'path' => CACHE,
136
+			'serialize' => true,
137
+			'duration' => '+1 years',
138
+			'url' => env('CACHE_CAKEROUTES_URL', null),
139
+		],
140
+	],
141 141
 
142
-    /**
143
-     * Configure the Error and Exception handlers used by your application.
144
-     *
145
-     * By default errors are displayed using Debugger, when debug is true and logged
146
-     * by Cake\Log\Log when debug is false.
147
-     *
148
-     * In CLI environments exceptions will be printed to stderr with a backtrace.
149
-     * In web environments an HTML page will be displayed for the exception.
150
-     * With debug true, framework errors like Missing Controller will be displayed.
151
-     * When debug is false, framework errors will be coerced into generic HTTP errors.
152
-     *
153
-     * Options:
154
-     *
155
-     * - `errorLevel` - int - The level of errors you are interested in capturing.
156
-     * - `trace` - boolean - Whether or not backtraces should be included in
157
-     *   logged errors/exceptions.
158
-     * - `log` - boolean - Whether or not you want exceptions logged.
159
-     * - `exceptionRenderer` - string - The class responsible for rendering
160
-     *   uncaught exceptions. If you choose a custom class you should place
161
-     *   the file for that class in src/Error. This class needs to implement a
162
-     *   render method.
163
-     * - `skipLog` - array - List of exceptions to skip for logging. Exceptions that
164
-     *   extend one of the listed exceptions will also be skipped for logging.
165
-     *   E.g.:
166
-     *   `'skipLog' => ['Cake\Http\Exception\NotFoundException', 'Cake\Http\Exception\UnauthorizedException']`
167
-     * - `extraFatalErrorMemory` - int - The number of megabytes to increase
168
-     *   the memory limit by when a fatal error is encountered. This allows
169
-     *   breathing room to complete logging or error handling.
170
-     */
171
-    'Error' => [
172
-        'errorLevel' => E_ALL,
173
-        'exceptionRenderer' => 'Cake\Error\ExceptionRenderer',
174
-        'skipLog' => [],
175
-        'log' => true,
176
-        'trace' => true,
177
-    ],
142
+	/**
143
+	 * Configure the Error and Exception handlers used by your application.
144
+	 *
145
+	 * By default errors are displayed using Debugger, when debug is true and logged
146
+	 * by Cake\Log\Log when debug is false.
147
+	 *
148
+	 * In CLI environments exceptions will be printed to stderr with a backtrace.
149
+	 * In web environments an HTML page will be displayed for the exception.
150
+	 * With debug true, framework errors like Missing Controller will be displayed.
151
+	 * When debug is false, framework errors will be coerced into generic HTTP errors.
152
+	 *
153
+	 * Options:
154
+	 *
155
+	 * - `errorLevel` - int - The level of errors you are interested in capturing.
156
+	 * - `trace` - boolean - Whether or not backtraces should be included in
157
+	 *   logged errors/exceptions.
158
+	 * - `log` - boolean - Whether or not you want exceptions logged.
159
+	 * - `exceptionRenderer` - string - The class responsible for rendering
160
+	 *   uncaught exceptions. If you choose a custom class you should place
161
+	 *   the file for that class in src/Error. This class needs to implement a
162
+	 *   render method.
163
+	 * - `skipLog` - array - List of exceptions to skip for logging. Exceptions that
164
+	 *   extend one of the listed exceptions will also be skipped for logging.
165
+	 *   E.g.:
166
+	 *   `'skipLog' => ['Cake\Http\Exception\NotFoundException', 'Cake\Http\Exception\UnauthorizedException']`
167
+	 * - `extraFatalErrorMemory` - int - The number of megabytes to increase
168
+	 *   the memory limit by when a fatal error is encountered. This allows
169
+	 *   breathing room to complete logging or error handling.
170
+	 */
171
+	'Error' => [
172
+		'errorLevel' => E_ALL,
173
+		'exceptionRenderer' => 'Cake\Error\ExceptionRenderer',
174
+		'skipLog' => [],
175
+		'log' => true,
176
+		'trace' => true,
177
+	],
178 178
 
179 179
 	'Datasources' => [
180 180
 		'vatNumberCheckWebservice' => [
@@ -183,76 +183,76 @@  discard block
 block discarded – undo
183 183
 		]
184 184
 	],
185 185
 
186
-    /**
187
-     * Configures logging options
188
-     */
189
-    'Log' => [
190
-        'debug' => [
191
-            'className' => 'Cake\Log\Engine\FileLog',
192
-            'path' => LOGS,
193
-            'file' => 'debug',
194
-            'url' => env('LOG_DEBUG_URL', null),
195
-            'scopes' => false,
196
-            'levels' => ['notice', 'info', 'debug'],
197
-        ],
198
-        'error' => [
199
-            'className' => 'Cake\Log\Engine\FileLog',
200
-            'path' => LOGS,
201
-            'file' => 'error',
202
-            'url' => env('LOG_ERROR_URL', null),
203
-            'scopes' => false,
204
-            'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
205
-        ],
206
-        // To enable this dedicated query log, you need set your datasource's log flag to true
207
-        'queries' => [
208
-            'className' => 'Cake\Log\Engine\FileLog',
209
-            'path' => LOGS,
210
-            'file' => 'queries',
211
-            'url' => env('LOG_QUERIES_URL', null),
212
-            'scopes' => ['queriesLog'],
213
-        ],
214
-    ],
186
+	/**
187
+	 * Configures logging options
188
+	 */
189
+	'Log' => [
190
+		'debug' => [
191
+			'className' => 'Cake\Log\Engine\FileLog',
192
+			'path' => LOGS,
193
+			'file' => 'debug',
194
+			'url' => env('LOG_DEBUG_URL', null),
195
+			'scopes' => false,
196
+			'levels' => ['notice', 'info', 'debug'],
197
+		],
198
+		'error' => [
199
+			'className' => 'Cake\Log\Engine\FileLog',
200
+			'path' => LOGS,
201
+			'file' => 'error',
202
+			'url' => env('LOG_ERROR_URL', null),
203
+			'scopes' => false,
204
+			'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
205
+		],
206
+		// To enable this dedicated query log, you need set your datasource's log flag to true
207
+		'queries' => [
208
+			'className' => 'Cake\Log\Engine\FileLog',
209
+			'path' => LOGS,
210
+			'file' => 'queries',
211
+			'url' => env('LOG_QUERIES_URL', null),
212
+			'scopes' => ['queriesLog'],
213
+		],
214
+	],
215 215
 
216
-    /**
217
-     * Session configuration.
218
-     *
219
-     * Contains an array of settings to use for session configuration. The
220
-     * `defaults` key is used to define a default preset to use for sessions, any
221
-     * settings declared here will override the settings of the default config.
222
-     *
223
-     * ## Options
224
-     *
225
-     * - `cookie` - The name of the cookie to use. Defaults to 'CAKEPHP'. Avoid using `.` in cookie names,
226
-     *   as PHP will drop sessions from cookies with `.` in the name.
227
-     * - `cookiePath` - The url path for which session cookie is set. Maps to the
228
-     *   `session.cookie_path` php.ini config. Defaults to base path of app.
229
-     * - `timeout` - The time in minutes the session should be valid for.
230
-     *    Pass 0 to disable checking timeout.
231
-     *    Please note that php.ini's session.gc_maxlifetime must be equal to or greater
232
-     *    than the largest Session['timeout'] in all served websites for it to have the
233
-     *    desired effect.
234
-     * - `defaults` - The default configuration set to use as a basis for your session.
235
-     *    There are four built-in options: php, cake, cache, database.
236
-     * - `handler` - Can be used to enable a custom session handler. Expects an
237
-     *    array with at least the `engine` key, being the name of the Session engine
238
-     *    class to use for managing the session. CakePHP bundles the `CacheSession`
239
-     *    and `DatabaseSession` engines.
240
-     * - `ini` - An associative array of additional ini values to set.
241
-     *
242
-     * The built-in `defaults` options are:
243
-     *
244
-     * - 'php' - Uses settings defined in your php.ini.
245
-     * - 'cake' - Saves session files in CakePHP's /tmp directory.
246
-     * - 'database' - Uses CakePHP's database sessions.
247
-     * - 'cache' - Use the Cache class to save sessions.
248
-     *
249
-     * To define a custom session handler, save it at src/Network/Session/<name>.php.
250
-     * Make sure the class implements PHP's `SessionHandlerInterface` and set
251
-     * Session.handler to <name>
252
-     *
253
-     * To use database sessions, load the SQL file located at config/schema/sessions.sql
254
-     */
255
-    'Session' => [
256
-        'defaults' => 'php',
257
-    ],
216
+	/**
217
+	 * Session configuration.
218
+	 *
219
+	 * Contains an array of settings to use for session configuration. The
220
+	 * `defaults` key is used to define a default preset to use for sessions, any
221
+	 * settings declared here will override the settings of the default config.
222
+	 *
223
+	 * ## Options
224
+	 *
225
+	 * - `cookie` - The name of the cookie to use. Defaults to 'CAKEPHP'. Avoid using `.` in cookie names,
226
+	 *   as PHP will drop sessions from cookies with `.` in the name.
227
+	 * - `cookiePath` - The url path for which session cookie is set. Maps to the
228
+	 *   `session.cookie_path` php.ini config. Defaults to base path of app.
229
+	 * - `timeout` - The time in minutes the session should be valid for.
230
+	 *    Pass 0 to disable checking timeout.
231
+	 *    Please note that php.ini's session.gc_maxlifetime must be equal to or greater
232
+	 *    than the largest Session['timeout'] in all served websites for it to have the
233
+	 *    desired effect.
234
+	 * - `defaults` - The default configuration set to use as a basis for your session.
235
+	 *    There are four built-in options: php, cake, cache, database.
236
+	 * - `handler` - Can be used to enable a custom session handler. Expects an
237
+	 *    array with at least the `engine` key, being the name of the Session engine
238
+	 *    class to use for managing the session. CakePHP bundles the `CacheSession`
239
+	 *    and `DatabaseSession` engines.
240
+	 * - `ini` - An associative array of additional ini values to set.
241
+	 *
242
+	 * The built-in `defaults` options are:
243
+	 *
244
+	 * - 'php' - Uses settings defined in your php.ini.
245
+	 * - 'cake' - Saves session files in CakePHP's /tmp directory.
246
+	 * - 'database' - Uses CakePHP's database sessions.
247
+	 * - 'cache' - Use the Cache class to save sessions.
248
+	 *
249
+	 * To define a custom session handler, save it at src/Network/Session/<name>.php.
250
+	 * Make sure the class implements PHP's `SessionHandlerInterface` and set
251
+	 * Session.handler to <name>
252
+	 *
253
+	 * To use database sessions, load the SQL file located at config/schema/sessions.sql
254
+	 */
255
+	'Session' => [
256
+		'defaults' => 'php',
257
+	],
258 258
 ];
Please login to merge, or discard this patch.
config/requirements.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,19 +21,19 @@
 block discarded – undo
21 21
  * You can remove this if you are confident that your PHP version is sufficient.
22 22
  */
23 23
 if (version_compare(PHP_VERSION, '5.6.0') < 0) {
24
-    trigger_error('Your PHP version must be equal or higher than 5.6.0 to use CakePHP.' . PHP_EOL, E_USER_ERROR);
24
+	trigger_error('Your PHP version must be equal or higher than 5.6.0 to use CakePHP.' . PHP_EOL, E_USER_ERROR);
25 25
 }
26 26
 
27 27
 /*
28 28
  * You can remove this if you are confident you have intl installed.
29 29
  */
30 30
 if (!extension_loaded('intl')) {
31
-    trigger_error('You must enable the intl extension to use CakePHP.' . PHP_EOL, E_USER_ERROR);
31
+	trigger_error('You must enable the intl extension to use CakePHP.' . PHP_EOL, E_USER_ERROR);
32 32
 }
33 33
 
34 34
 /*
35 35
  * You can remove this if you are confident you have mbstring installed.
36 36
  */
37 37
 if (!extension_loaded('mbstring')) {
38
-    trigger_error('You must enable the mbstring extension to use CakePHP.' . PHP_EOL, E_USER_ERROR);
38
+	trigger_error('You must enable the mbstring extension to use CakePHP.' . PHP_EOL, E_USER_ERROR);
39 39
 }
Please login to merge, or discard this patch.