Update templates, white spacings and code format.
This commit is contained in:
@@ -59,8 +59,8 @@ class Component_Builder {
|
||||
private string $dist_path = '';
|
||||
|
||||
function __construct( $args = [] ) {
|
||||
if ( empty( $args['backPath'] ) || empty( $args['projectPath'] ) || empty( $args['blockName'] ) || empty( $args['platform'] ) ) {
|
||||
die( 'Error: Missing arguments. Make sure all parameter passed.' );
|
||||
if ( ! isset( $args['backPath'] ) || ! isset( $args['projectPath'] ) || ! isset( $args['blockName'] ) || ! isset( $args['platform'] ) ) {
|
||||
throw new \Exception( 'Error: Missing arguments. Make sure all parameter passed.' );
|
||||
}
|
||||
|
||||
$this->module_path = $args['backPath'];
|
||||
@@ -121,7 +121,7 @@ class Component_Builder {
|
||||
|
||||
$t = file_put_contents( $file_path, '<?php ' . $comment . $content . ' ?>' );
|
||||
if ( $t === false ) {
|
||||
die( "Error: Can't generate HBS template to PHP file. Cache folder is not accessible." );
|
||||
throw new \Exception( "Error: Can't generate HBS template to PHP file. Cache folder is not accessible." );
|
||||
}
|
||||
|
||||
return $file_path;
|
||||
|
||||
Reference in New Issue
Block a user