@@ -34,13 +34,13 @@ discard block |
||
| 34 | 34 | public function get() |
| 35 | 35 | {
|
| 36 | 36 | // The config process class should not be null. |
| 37 | - if(self::$configProcessInstance!==null){
|
|
| 37 | + if (self::$configProcessInstance!==null) {
|
|
| 38 | 38 | |
| 39 | 39 | //get config variables |
| 40 | 40 | $config = self::$config; |
| 41 | 41 | |
| 42 | 42 | // offset config variables to config process class |
| 43 | - self::$configProcessInstance->offsetSet('config',$config);
|
|
| 43 | + self::$configProcessInstance->offsetSet('config', $config);
|
|
| 44 | 44 | |
| 45 | 45 | //get config variable from config process class |
| 46 | 46 | return self::$configProcessInstance->get(); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | * @param null $config |
| 54 | 54 | * @return Config |
| 55 | 55 | */ |
| 56 | - public static function make($config=null) |
|
| 56 | + public static function make($config = null) |
|
| 57 | 57 | {
|
| 58 | 58 | self::$config = $config; |
| 59 | 59 | self::$configProcessInstance = app()->resolve(ConfigProcess::class); |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | * @param array $data |
| 67 | 67 | * @return bool|mixed |
| 68 | 68 | */ |
| 69 | - public function set($data=array()) |
|
| 69 | + public function set($data = array()) |
|
| 70 | 70 | {
|
| 71 | 71 | // receive the necessary config settings. |
| 72 | 72 | $configPath = path()->config(); |
@@ -74,12 +74,12 @@ discard block |
||
| 74 | 74 | $setConfigPath = $configPath.''.DIRECTORY_SEPARATOR.''.ucfirst($configArray).'.php'; |
| 75 | 75 | $getConfigWrap = Arr::wrap(config($configArray)); |
| 76 | 76 | |
| 77 | - foreach ($data as $value){
|
|
| 77 | + foreach ($data as $value) {
|
|
| 78 | 78 | |
| 79 | 79 | // we check the config value not to be rewritten. |
| 80 | - if(!in_array($value,$getConfigWrap)){
|
|
| 81 | - $setData = '<?php return '.var_export(array_merge($getConfigWrap,$data), true).';'; |
|
| 82 | - return app()->resolve(FileProcess::class)->dumpFile($setConfigPath,$setData); |
|
| 80 | + if (!in_array($value, $getConfigWrap)) {
|
|
| 81 | + $setData = '<?php return '.var_export(array_merge($getConfigWrap, $data), true).';'; |
|
| 82 | + return app()->resolve(FileProcess::class)->dumpFile($setConfigPath, $setData); |
|
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | } |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | use Resta\Contracts\ConfigProviderContracts; |
| 11 | 11 | use Resta\Foundation\PathManager\StaticPathList; |
| 12 | 12 | |
| 13 | -class ConfigProvider extends ApplicationProvider implements ConfigProviderContracts,HandleContracts |
|
| 13 | +class ConfigProvider extends ApplicationProvider implements ConfigProviderContracts, HandleContracts |
|
| 14 | 14 | {
|
| 15 | 15 | /** |
| 16 | 16 | * config provider handle |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | */ |
| 20 | 20 | public function handle() |
| 21 | 21 | {
|
| 22 | - define('config',true);
|
|
| 22 | + define('config', true);
|
|
| 23 | 23 | |
| 24 | 24 | //automatically add values to the configuration files. |
| 25 | 25 | $this->loadPreDefinedConfigurationFiles(); |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | // Finally, we will set |
| 31 | 31 | // the application's timezone and encoding based on the configuration |
| 32 | - if(config('app')!==null){
|
|
| 32 | + if (config('app')!==null) {
|
|
| 33 | 33 | date_default_timezone_set(config('app.timezone'));
|
| 34 | 34 | mb_internal_encoding('UTF-8');
|
| 35 | 35 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | private function loadPreDefinedConfigurationFiles() |
| 44 | 44 | {
|
| 45 | - $this->app->loadConfig(function(){
|
|
| 45 | + $this->app->loadConfig(function() {
|
|
| 46 | 46 | return [ |
| 47 | 47 | 'Kernel' => path()->kernel().''.DIRECTORY_SEPARATOR.''.StaticPathList::$kernel.'.php', |
| 48 | 48 | 'Response' => path()->storeConfigDir().''.DIRECTORY_SEPARATOR.'Response.php', |
@@ -56,24 +56,24 @@ discard block |
||
| 56 | 56 | * @param array $files |
| 57 | 57 | * @return mixed|void |
| 58 | 58 | */ |
| 59 | - private function registerConfiguration($files=array()) |
|
| 59 | + private function registerConfiguration($files = array()) |
|
| 60 | 60 | {
|
| 61 | 61 | // we are saving all paths in |
| 62 | 62 | // the config directory of each application. |
| 63 | - foreach($files as $key=>$file){
|
|
| 63 | + foreach ($files as $key=>$file) {
|
|
| 64 | 64 | |
| 65 | - if(is_array($file)){
|
|
| 65 | + if (is_array($file)) {
|
|
| 66 | 66 | |
| 67 | - $this->app->register('appConfig',Str::lower($key),[
|
|
| 67 | + $this->app->register('appConfig', Str::lower($key), [
|
|
| 68 | 68 | 'namespace' => null, |
| 69 | 69 | 'file' => null, |
| 70 | 70 | 'data' => $file |
| 71 | 71 | ]); |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - elseif(file_exists($file)){
|
|
| 74 | + elseif (file_exists($file)) {
|
|
| 75 | 75 | |
| 76 | - $this->app->register('appConfig',Str::lower($key),[
|
|
| 76 | + $this->app->register('appConfig', Str::lower($key), [
|
|
| 77 | 77 | 'namespace' =>Utils::getNamespace($file), |
| 78 | 78 | 'file' =>$file |
| 79 | 79 | ]); |
@@ -84,14 +84,14 @@ discard block |
||
| 84 | 84 | /** |
| 85 | 85 | * @param null $path |
| 86 | 86 | */ |
| 87 | - public function setConfig($path=null) |
|
| 87 | + public function setConfig($path = null) |
|
| 88 | 88 | {
|
| 89 | - if(!is_array($path)){
|
|
| 89 | + if (!is_array($path)) {
|
|
| 90 | 90 | |
| 91 | 91 | // path variable for parameter |
| 92 | 92 | // we run a glob function for all of the config files, |
| 93 | 93 | // where we pass namespace and paths to a kernel object and process them. |
| 94 | - $path = ($path === null) ? path()->config() : $path; |
|
| 94 | + $path = ($path===null) ? path()->config() : $path; |
|
| 95 | 95 | $configFiles = Utils::glob($path); |
| 96 | 96 | |
| 97 | 97 | } |
@@ -69,9 +69,7 @@ |
||
| 69 | 69 | 'file' => null, |
| 70 | 70 | 'data' => $file |
| 71 | 71 | ]); |
| 72 | - } |
|
| 73 | - |
|
| 74 | - elseif(file_exists($file)){
|
|
| 72 | + } elseif(file_exists($file)){
|
|
| 75 | 73 | |
| 76 | 74 | $this->app->register('appConfig',Str::lower($key),[
|
| 77 | 75 | 'namespace' =>Utils::getNamespace($file), |
@@ -33,13 +33,13 @@ discard block |
||
| 33 | 33 | $kernelConfig = []; |
| 34 | 34 | |
| 35 | 35 | //we are getting the config data from the kernel object.. |
| 36 | - if(isset(core()->appConfig)){
|
|
| 36 | + if (isset(core()->appConfig)) {
|
|
| 37 | 37 | $kernelConfig = core()->appConfig; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | // if the config variable is not sent, |
| 41 | 41 | // we print the kernel config data directly. |
| 42 | - if(null===$this->config) {
|
|
| 42 | + if (null===$this->config) {
|
|
| 43 | 43 | return (count($kernelConfig)) ? $kernelConfig : null; |
| 44 | 44 | } |
| 45 | 45 | |
@@ -48,11 +48,11 @@ discard block |
||
| 48 | 48 | $this->configList = Str::stringToArray($this->config); |
| 49 | 49 | |
| 50 | 50 | //if the config object exists in the kernel, start the process. |
| 51 | - if(isset($kernelConfig[$config = current($this->configList)])){
|
|
| 51 | + if (isset($kernelConfig[$config = current($this->configList)])) {
|
|
| 52 | 52 | |
| 53 | 53 | // get config data |
| 54 | 54 | // we process and rotate on point basis. |
| 55 | - $configData = $this->getConfigData($kernelConfig,$config); |
|
| 55 | + $configData = $this->getConfigData($kernelConfig, $config); |
|
| 56 | 56 | return $this->configProcessResult($configData); |
| 57 | 57 | } |
| 58 | 58 | |
@@ -66,14 +66,14 @@ discard block |
||
| 66 | 66 | private function configProcessResult($config) |
| 67 | 67 | {
|
| 68 | 68 | //config data if dotted. |
| 69 | - if(count($this->configList)){
|
|
| 69 | + if (count($this->configList)) {
|
|
| 70 | 70 | |
| 71 | 71 | array_shift($this->configList); |
| 72 | 72 | $configdotted = $config; |
| 73 | 73 | |
| 74 | 74 | //we apply the dotted-knit config dataset as nested. |
| 75 | - foreach ($this->configList as $key=>$value){
|
|
| 76 | - $configdotted = Arr::isset($configdotted,$value); |
|
| 75 | + foreach ($this->configList as $key=>$value) {
|
|
| 76 | + $configdotted = Arr::isset($configdotted, $value); |
|
| 77 | 77 | } |
| 78 | 78 | } |
| 79 | 79 | |
@@ -90,22 +90,22 @@ discard block |
||
| 90 | 90 | * @throws \DI\DependencyException |
| 91 | 91 | * @throws \DI\NotFoundException |
| 92 | 92 | */ |
| 93 | - private function getConfigData($kernelConfig,$config) |
|
| 93 | + private function getConfigData($kernelConfig, $config) |
|
| 94 | 94 | {
|
| 95 | 95 | //if the config data is a class instance, we get it as an object. |
| 96 | - if(Utils::isNamespaceExists($configFile = $kernelConfig[$config]['namespace'])){
|
|
| 96 | + if (Utils::isNamespaceExists($configFile = $kernelConfig[$config]['namespace'])) {
|
|
| 97 | 97 | $configData = app()->resolve($configFile)->handle(); |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | //if the config data is just an array. |
| 101 | - if(!isset($configData) && file_exists($configFile=$kernelConfig[$config]['file'])){
|
|
| 101 | + if (!isset($configData) && file_exists($configFile = $kernelConfig[$config]['file'])) {
|
|
| 102 | 102 | $configData = require($configFile); |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | // if there is data key in the kernelConfig array |
| 106 | 106 | // this is not the file data, |
| 107 | 107 | // a loading that contains a hand-written array. |
| 108 | - if(isset($kernelConfig[$config]['data'])) {
|
|
| 108 | + if (isset($kernelConfig[$config]['data'])) {
|
|
| 109 | 109 | return $kernelConfig[$config]['data']; |
| 110 | 110 | } |
| 111 | 111 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | {
|
| 31 | 31 | // Use default autoload implementation |
| 32 | 32 | // Register given function as __autoload() implementation |
| 33 | - spl_autoload_register(function($class){
|
|
| 33 | + spl_autoload_register(function($class) {
|
|
| 34 | 34 | $this->getRegisterCallBackVar($class); |
| 35 | 35 | $this->registerCallBackFormatter(); |
| 36 | 36 | }); |
@@ -44,11 +44,11 @@ discard block |
||
| 44 | 44 | */ |
| 45 | 45 | private function getRegisterCallBackVar($class) :void |
| 46 | 46 | {
|
| 47 | - if(defined('root')){
|
|
| 47 | + if (defined('root')) {
|
|
| 48 | 48 | |
| 49 | 49 | $this->class = $class; |
| 50 | 50 | $this->classPath = root.''.DIRECTORY_SEPARATOR.''.$this->class.''.self::FileExtension; |
| 51 | - $this->classPath = str_replace("\\","/",$this->classPath);
|
|
| 51 | + $this->classPath = str_replace("\\", "/", $this->classPath);
|
|
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | |
@@ -57,9 +57,9 @@ discard block |
||
| 57 | 57 | * |
| 58 | 58 | * return mixed |
| 59 | 59 | */ |
| 60 | - private function registerCallBackFormatter () |
|
| 60 | + private function registerCallBackFormatter() |
|
| 61 | 61 | {
|
| 62 | - $this->checkAliasClassFormatter($this->classPath,function() {
|
|
| 62 | + $this->checkAliasClassFormatter($this->classPath, function() {
|
|
| 63 | 63 | require($this->classPath); |
| 64 | 64 | }); |
| 65 | 65 | } |
@@ -71,16 +71,16 @@ discard block |
||
| 71 | 71 | * @param $callback |
| 72 | 72 | * @return mixed |
| 73 | 73 | */ |
| 74 | - private function checkAliasClassFormatter($class,$callback) |
|
| 74 | + private function checkAliasClassFormatter($class, $callback) |
|
| 75 | 75 | {
|
| 76 | 76 | $systemApp = []; |
| 77 | 77 | |
| 78 | - if(defined('app')){
|
|
| 78 | + if (defined('app')) {
|
|
| 79 | 79 | $systemApp = (new ClassAliasGroup())->handle($class); |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - if(!file_exists($class)){
|
|
| 83 | - $this->getAliasClassFormatter($class,$systemApp); |
|
| 82 | + if (!file_exists($class)) {
|
|
| 83 | + $this->getAliasClassFormatter($class, $systemApp); |
|
| 84 | 84 | return false; |
| 85 | 85 | } |
| 86 | 86 | |
@@ -93,9 +93,9 @@ discard block |
||
| 93 | 93 | * @param $class |
| 94 | 94 | * @param $systemApp |
| 95 | 95 | */ |
| 96 | - private function getAliasClassFormatter($class,$systemApp) |
|
| 96 | + private function getAliasClassFormatter($class, $systemApp) |
|
| 97 | 97 | {
|
| 98 | - $this->setAliasClassGroup($class,$systemApp); |
|
| 98 | + $this->setAliasClassGroup($class, $systemApp); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | /** |
@@ -104,14 +104,14 @@ discard block |
||
| 104 | 104 | * @param $class |
| 105 | 105 | * @param $systemApp |
| 106 | 106 | */ |
| 107 | - private function setAliasClassGroup($class,$systemApp) |
|
| 107 | + private function setAliasClassGroup($class, $systemApp) |
|
| 108 | 108 | {
|
| 109 | - $alias = str_replace(root.''.DIRECTORY_SEPARATOR.'','',$class); |
|
| 110 | - $alias = str_replace(self::FileExtension,'',$alias); |
|
| 109 | + $alias = str_replace(root.''.DIRECTORY_SEPARATOR.'', '', $class); |
|
| 110 | + $alias = str_replace(self::FileExtension, '', $alias); |
|
| 111 | 111 | |
| 112 | 112 | //set class_alias groups |
| 113 | - if(array_key_exists($alias,$systemApp)){
|
|
| 114 | - class_alias($systemApp[$alias],$alias); |
|
| 113 | + if (array_key_exists($alias, $systemApp)) {
|
|
| 114 | + class_alias($systemApp[$alias], $alias); |
|
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | 117 | } |
@@ -35,21 +35,21 @@ |
||
| 35 | 35 | * @param $bind |
| 36 | 36 | * @return mixed|string |
| 37 | 37 | */ |
| 38 | - public function controller($endpoint=null,$bind=array()) |
|
| 38 | + public function controller($endpoint = null, $bind = array()) |
|
| 39 | 39 | {
|
| 40 | - $call=Utils::getNamespace($this->appCall()); |
|
| 40 | + $call = Utils::getNamespace($this->appCall()); |
|
| 41 | 41 | |
| 42 | - if($endpoint===null) return $call; |
|
| 42 | + if ($endpoint===null) return $call; |
|
| 43 | 43 | |
| 44 | 44 | $bundleName = $call.'\\'.ucfirst($endpoint).''.StaticPathList::$controllerBundleName.''; |
| 45 | 45 | |
| 46 | - $endpointCall=$bundleName.'\\'.ucfirst($endpoint).''.StaticPathModel::$callClassPrefix; |
|
| 46 | + $endpointCall = $bundleName.'\\'.ucfirst($endpoint).''.StaticPathModel::$callClassPrefix; |
|
| 47 | 47 | |
| 48 | - if($bind===true) return $endpointCall; |
|
| 48 | + if ($bind===true) return $endpointCall; |
|
| 49 | 49 | |
| 50 | - if($bind=="bundle") return $bundleName; |
|
| 50 | + if ($bind=="bundle") return $bundleName; |
|
| 51 | 51 | |
| 52 | - return app()->resolve($endpointCall,$bind); |
|
| 52 | + return app()->resolve($endpointCall, $bind); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /** |
@@ -39,15 +39,21 @@ |
||
| 39 | 39 | {
|
| 40 | 40 | $call=Utils::getNamespace($this->appCall()); |
| 41 | 41 | |
| 42 | - if($endpoint===null) return $call; |
|
| 42 | + if($endpoint===null) {
|
|
| 43 | + return $call; |
|
| 44 | + } |
|
| 43 | 45 | |
| 44 | 46 | $bundleName = $call.'\\'.ucfirst($endpoint).''.StaticPathList::$controllerBundleName.''; |
| 45 | 47 | |
| 46 | 48 | $endpointCall=$bundleName.'\\'.ucfirst($endpoint).''.StaticPathModel::$callClassPrefix; |
| 47 | 49 | |
| 48 | - if($bind===true) return $endpointCall; |
|
| 50 | + if($bind===true) {
|
|
| 51 | + return $endpointCall; |
|
| 52 | + } |
|
| 49 | 53 | |
| 50 | - if($bind=="bundle") return $bundleName; |
|
| 54 | + if($bind=="bundle") {
|
|
| 55 | + return $bundleName; |
|
| 56 | + } |
|
| 51 | 57 | |
| 52 | 58 | return app()->resolve($endpointCall,$bind); |
| 53 | 59 | } |
@@ -12,9 +12,9 @@ discard block |
||
| 12 | 12 | * @param null $app |
| 13 | 13 | * @return string |
| 14 | 14 | */ |
| 15 | - public function app($app=null) |
|
| 15 | + public function app($app = null) |
|
| 16 | 16 | {
|
| 17 | - $app=($app===null) ? $this->appDetector() : $app; |
|
| 17 | + $app = ($app===null) ? $this->appDetector() : $app; |
|
| 18 | 18 | return StaticPathModel::appPath().''.DIRECTORY_SEPARATOR.''.Str::slashToBackSlash($app); |
| 19 | 19 | } |
| 20 | 20 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | * @param null $app |
| 39 | 39 | * @return string |
| 40 | 40 | */ |
| 41 | - public function appCall($app=null) |
|
| 41 | + public function appCall($app = null) |
|
| 42 | 42 | {
|
| 43 | 43 | return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$controller; |
| 44 | 44 | } |
@@ -56,9 +56,9 @@ discard block |
||
| 56 | 56 | * @param null $app |
| 57 | 57 | * @return string |
| 58 | 58 | */ |
| 59 | - public function appConfig($app=null) |
|
| 59 | + public function appConfig($app = null) |
|
| 60 | 60 | {
|
| 61 | - if(isset(core()->paths['config'])){
|
|
| 61 | + if (isset(core()->paths['config'])) {
|
|
| 62 | 62 | return core()->paths['config']; |
| 63 | 63 | } |
| 64 | 64 | return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$config; |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * @param null $app |
| 77 | 77 | * @return mixed |
| 78 | 78 | */ |
| 79 | - public function appFactory($app=null) |
|
| 79 | + public function appFactory($app = null) |
|
| 80 | 80 | {
|
| 81 | 81 | return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$factory; |
| 82 | 82 | } |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | public function appKernel() |
| 88 | 88 | {
|
| 89 | - $kernel = $this->app().''.DIRECTORY_SEPARATOR.''.StaticPathList::$kernel; |
|
| 89 | + $kernel = $this->app().''.DIRECTORY_SEPARATOR.''.StaticPathList::$kernel; |
|
| 90 | 90 | |
| 91 | 91 | return $kernel; |
| 92 | 92 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | */ |
| 97 | 97 | public function appProvider() |
| 98 | 98 | {
|
| 99 | - $kernel = $this->app().''.DIRECTORY_SEPARATOR.''.StaticPathList::$kernel.''.DIRECTORY_SEPARATOR.''.StaticPathList::$provider; |
|
| 99 | + $kernel = $this->app().''.DIRECTORY_SEPARATOR.''.StaticPathList::$kernel.''.DIRECTORY_SEPARATOR.''.StaticPathList::$provider; |
|
| 100 | 100 | |
| 101 | 101 | return $kernel; |
| 102 | 102 | } |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | * @param null $app |
| 122 | 122 | * @return mixed |
| 123 | 123 | */ |
| 124 | - public function appLogger($app=null) |
|
| 124 | + public function appLogger($app = null) |
|
| 125 | 125 | {
|
| 126 | 126 | return $this->appVersion($app).''.DIRECTORY_SEPARATOR.'ServiceLogManager'; |
| 127 | 127 | } |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | * @param null $app |
| 131 | 131 | * @return mixed |
| 132 | 132 | */ |
| 133 | - public function appMiddleware($app=null) |
|
| 133 | + public function appMiddleware($app = null) |
|
| 134 | 134 | {
|
| 135 | 135 | return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$middleware; |
| 136 | 136 | } |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | * @param null $app |
| 140 | 140 | * @return mixed |
| 141 | 141 | */ |
| 142 | - public function appMigration($app=null) |
|
| 142 | + public function appMigration($app = null) |
|
| 143 | 143 | {
|
| 144 | 144 | return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$migration; |
| 145 | 145 | } |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | * @param null $app |
| 149 | 149 | * @return mixed |
| 150 | 150 | */ |
| 151 | - public function appModel($app=null) |
|
| 151 | + public function appModel($app = null) |
|
| 152 | 152 | {
|
| 153 | 153 | return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$model; |
| 154 | 154 | } |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | * @param null $app |
| 158 | 158 | * @return mixed |
| 159 | 159 | */ |
| 160 | - public function appException($app=null) |
|
| 160 | + public function appException($app = null) |
|
| 161 | 161 | {
|
| 162 | 162 | return $this->appVersion().''.DIRECTORY_SEPARATOR.''.StaticPathList::$exception; |
| 163 | 163 | } |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | * @param null $app |
| 167 | 167 | * @return mixed |
| 168 | 168 | */ |
| 169 | - public function appOptionalEvents($app=null) |
|
| 169 | + public function appOptionalEvents($app = null) |
|
| 170 | 170 | {
|
| 171 | 171 | return $this->appVersion().''.DIRECTORY_SEPARATOR.''.StaticPathList::$events; |
| 172 | 172 | } |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | * @param null $app |
| 176 | 176 | * @return mixed |
| 177 | 177 | */ |
| 178 | - public function appOptionalJob($app=null) |
|
| 178 | + public function appOptionalJob($app = null) |
|
| 179 | 179 | {
|
| 180 | 180 | return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$optional.''.DIRECTORY_SEPARATOR.''.StaticPathList::$job; |
| 181 | 181 | } |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | * @param null $app |
| 185 | 185 | * @return mixed |
| 186 | 186 | */ |
| 187 | - public function appOptionalListeners($app=null) |
|
| 187 | + public function appOptionalListeners($app = null) |
|
| 188 | 188 | {
|
| 189 | 189 | return $this->appVersion().''.DIRECTORY_SEPARATOR.''.StaticPathList::$listeners; |
| 190 | 190 | } |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | * @param null $app |
| 194 | 194 | * @return mixed |
| 195 | 195 | */ |
| 196 | - public function appOptionalSubscribers($app=null) |
|
| 196 | + public function appOptionalSubscribers($app = null) |
|
| 197 | 197 | {
|
| 198 | 198 | return $this->appVersion().''.DIRECTORY_SEPARATOR.''.StaticPathList::$listeners.''.DIRECTORY_SEPARATOR.''.StaticPathList::$subscribers; |
| 199 | 199 | } |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | */ |
| 212 | 212 | public function appRepository() |
| 213 | 213 | {
|
| 214 | - $repository = $this->app().''.DIRECTORY_SEPARATOR.''.StaticPathList::$repository; |
|
| 214 | + $repository = $this->app().''.DIRECTORY_SEPARATOR.''.StaticPathList::$repository; |
|
| 215 | 215 | |
| 216 | 216 | return $repository; |
| 217 | 217 | } |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | * @param null $app |
| 229 | 229 | * @return mixed |
| 230 | 230 | */ |
| 231 | - public function appOptionalSource($app=null) |
|
| 231 | + public function appOptionalSource($app = null) |
|
| 232 | 232 | {
|
| 233 | 233 | return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$optional.''.DIRECTORY_SEPARATOR.''.StaticPathList::$sourcePath; |
| 234 | 234 | } |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | * @param null $app |
| 238 | 238 | * @return mixed |
| 239 | 239 | */ |
| 240 | - public function appOptionalWebservice($app=null) |
|
| 240 | + public function appOptionalWebservice($app = null) |
|
| 241 | 241 | {
|
| 242 | 242 | return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$optional.''.DIRECTORY_SEPARATOR.''.StaticPathList::$webservice; |
| 243 | 243 | } |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | * @param null $app |
| 255 | 255 | * @return mixed |
| 256 | 256 | */ |
| 257 | - public function appServiceAnnotations($app=null) |
|
| 257 | + public function appServiceAnnotations($app = null) |
|
| 258 | 258 | {
|
| 259 | 259 | return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$serviceAnnotations; |
| 260 | 260 | } |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | * @param null $app |
| 264 | 264 | * @return mixed |
| 265 | 265 | */ |
| 266 | - public function appServiceContainer($app=null) |
|
| 266 | + public function appServiceContainer($app = null) |
|
| 267 | 267 | {
|
| 268 | 268 | return $this->appVersion($app).''.DIRECTORY_SEPARATOR.'ServiceContainerController'; |
| 269 | 269 | } |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | * @param null $app |
| 273 | 273 | * @return mixed |
| 274 | 274 | */ |
| 275 | - public function appServiceEventDispatcher($app=null) |
|
| 275 | + public function appServiceEventDispatcher($app = null) |
|
| 276 | 276 | {
|
| 277 | 277 | return $this->appVersion($app).''.DIRECTORY_SEPARATOR.'ServiceEventDispatcherManager'; |
| 278 | 278 | } |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | * @param null $app |
| 282 | 282 | * @return mixed |
| 283 | 283 | */ |
| 284 | - public function appServiceMiddleware($app=null) |
|
| 284 | + public function appServiceMiddleware($app = null) |
|
| 285 | 285 | {
|
| 286 | 286 | return $this->appVersion($app).''.DIRECTORY_SEPARATOR.''.StaticPathList::$serviceMiddleware; |
| 287 | 287 | } |
@@ -308,9 +308,9 @@ discard block |
||
| 308 | 308 | * @param null $app |
| 309 | 309 | * @return mixed |
| 310 | 310 | */ |
| 311 | - public function appVersion($app=null) |
|
| 311 | + public function appVersion($app = null) |
|
| 312 | 312 | {
|
| 313 | - if(defined('app')){
|
|
| 313 | + if (defined('app')) {
|
|
| 314 | 314 | |
| 315 | 315 | $prefixGroup = Str::slashToBackSlash(StaticPathList::$projectPrefixGroup); |
| 316 | 316 | |
@@ -354,19 +354,19 @@ discard block |
||
| 354 | 354 | * @param bool $bool |
| 355 | 355 | * @return mixed |
| 356 | 356 | */ |
| 357 | - public function controller($controller=null,$bool=false) |
|
| 357 | + public function controller($controller = null, $bool = false) |
|
| 358 | 358 | {
|
| 359 | 359 | $namespaceController = ($controller===null) ? app()->namespace()->controller() |
| 360 | - : app()->namespace()->controller($controller,true); |
|
| 360 | + : app()->namespace()->controller($controller, true); |
|
| 361 | 361 | |
| 362 | - if($bool){
|
|
| 363 | - $namespaceControllerExplode = explode("\\",$namespaceController);
|
|
| 362 | + if ($bool) {
|
|
| 363 | + $namespaceControllerExplode = explode("\\", $namespaceController);
|
|
| 364 | 364 | array_pop($namespaceControllerExplode); |
| 365 | 365 | |
| 366 | - $namespaceController = implode("\\",$namespaceControllerExplode);
|
|
| 366 | + $namespaceController = implode("\\", $namespaceControllerExplode);
|
|
| 367 | 367 | } |
| 368 | 368 | |
| 369 | - return Utils::getPathFromNamespace($namespaceController,false); |
|
| 369 | + return Utils::getPathFromNamespace($namespaceController, false); |
|
| 370 | 370 | } |
| 371 | 371 | |
| 372 | 372 | /** |
@@ -390,9 +390,9 @@ discard block |
||
| 390 | 390 | * @param $arg |
| 391 | 391 | * @return mixed |
| 392 | 392 | */ |
| 393 | - public function __call($name,$arg) |
|
| 393 | + public function __call($name, $arg) |
|
| 394 | 394 | {
|
| 395 | - $appCall='app'.ucfirst($name); |
|
| 395 | + $appCall = 'app'.ucfirst($name); |
|
| 396 | 396 | return $this->{$appCall}();
|
| 397 | 397 | } |
| 398 | 398 | |
@@ -7,242 +7,242 @@ |
||
| 7 | 7 | /** |
| 8 | 8 | * @var string |
| 9 | 9 | */ |
| 10 | - public static $appDefine='src'; |
|
| 10 | + public static $appDefine = 'src'; |
|
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * @var string |
| 14 | 14 | */ |
| 15 | - public static $autoloadNamespace='App'; |
|
| 15 | + public static $autoloadNamespace = 'App'; |
|
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * @var string |
| 19 | 19 | */ |
| 20 | - public static $projectPrefixGroup='Api'; |
|
| 20 | + public static $projectPrefixGroup = 'Api'; |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * @var string |
| 24 | 24 | */ |
| 25 | - public static $methodPrefix='Action'; |
|
| 25 | + public static $methodPrefix = 'Action'; |
|
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * @var string |
| 29 | 29 | */ |
| 30 | - public static $callClassPrefix='Controller'; |
|
| 30 | + public static $callClassPrefix = 'Controller'; |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * @var string |
| 34 | 34 | */ |
| 35 | - public static $controllerBundleName=''; |
|
| 35 | + public static $controllerBundleName = ''; |
|
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | 38 | * @var string |
| 39 | 39 | */ |
| 40 | - public static $resourceInController='Resource'; |
|
| 40 | + public static $resourceInController = 'Resource'; |
|
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | 43 | * @var string |
| 44 | 44 | */ |
| 45 | - public static $configurationInController='Config'; |
|
| 45 | + public static $configurationInController = 'Config'; |
|
| 46 | 46 | |
| 47 | 47 | /** |
| 48 | 48 | * @var null |
| 49 | 49 | */ |
| 50 | - public static $appPath=null; |
|
| 50 | + public static $appPath = null; |
|
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | 53 | * @var $kernel |
| 54 | 54 | */ |
| 55 | - public static $kernel='Kernel'; |
|
| 55 | + public static $kernel = 'Kernel'; |
|
| 56 | 56 | |
| 57 | 57 | /** |
| 58 | 58 | * @var $repository |
| 59 | 59 | */ |
| 60 | - public static $repository='Repository'; |
|
| 60 | + public static $repository = 'Repository'; |
|
| 61 | 61 | |
| 62 | 62 | /** |
| 63 | 63 | * @var $listener |
| 64 | 64 | */ |
| 65 | - public static $listener='Listener'; |
|
| 65 | + public static $listener = 'Listener'; |
|
| 66 | 66 | |
| 67 | 67 | /** |
| 68 | 68 | * @var $repository |
| 69 | 69 | */ |
| 70 | - public static $serviceAnnotations='ServiceAnnotationsManager'; |
|
| 70 | + public static $serviceAnnotations = 'ServiceAnnotationsManager'; |
|
| 71 | 71 | |
| 72 | 72 | /** |
| 73 | 73 | * @var $repository |
| 74 | 74 | */ |
| 75 | - public static $serviceMiddleware='ServiceMiddlewareManager'; |
|
| 75 | + public static $serviceMiddleware = 'ServiceMiddlewareManager'; |
|
| 76 | 76 | |
| 77 | 77 | /** |
| 78 | 78 | * @var $storage |
| 79 | 79 | */ |
| 80 | - public static $storage='Storage'; |
|
| 80 | + public static $storage = 'Storage'; |
|
| 81 | 81 | |
| 82 | 82 | /** |
| 83 | 83 | * @var $controller |
| 84 | 84 | */ |
| 85 | - public static $controller='Controllers'; |
|
| 85 | + public static $controller = 'Controllers'; |
|
| 86 | 86 | |
| 87 | 87 | /** |
| 88 | 88 | * @var $platform |
| 89 | 89 | */ |
| 90 | - public static $platform='__Platform'; |
|
| 90 | + public static $platform = '__Platform'; |
|
| 91 | 91 | |
| 92 | 92 | /** |
| 93 | 93 | * @var $sourcePath |
| 94 | 94 | */ |
| 95 | - public static $sourcePath='Source'; |
|
| 95 | + public static $sourcePath = 'Source'; |
|
| 96 | 96 | |
| 97 | 97 | /** |
| 98 | 98 | * @var $sourceRequest |
| 99 | 99 | */ |
| 100 | - public static $sourceRequest='Request'; |
|
| 100 | + public static $sourceRequest = 'Request'; |
|
| 101 | 101 | |
| 102 | 102 | /** |
| 103 | 103 | * @var $model |
| 104 | 104 | */ |
| 105 | - public static $model='Model'; |
|
| 105 | + public static $model = 'Model'; |
|
| 106 | 106 | |
| 107 | 107 | /** |
| 108 | 108 | * @var $builder |
| 109 | 109 | */ |
| 110 | - public static $builder='Builder'; |
|
| 110 | + public static $builder = 'Builder'; |
|
| 111 | 111 | |
| 112 | 112 | /** |
| 113 | 113 | * @var $migration |
| 114 | 114 | */ |
| 115 | - public static $migration='Migrations'; |
|
| 115 | + public static $migration = 'Migrations'; |
|
| 116 | 116 | |
| 117 | 117 | /** |
| 118 | 118 | * @var $config |
| 119 | 119 | */ |
| 120 | - public static $config='Config'; |
|
| 120 | + public static $config = 'Config'; |
|
| 121 | 121 | |
| 122 | 122 | /** |
| 123 | 123 | * @var $config |
| 124 | 124 | */ |
| 125 | - public static $test='Tests'; |
|
| 125 | + public static $test = 'Tests'; |
|
| 126 | 126 | |
| 127 | 127 | |
| 128 | 128 | /** |
| 129 | 129 | * @var $optional |
| 130 | 130 | */ |
| 131 | - public static $optional='Optional'; |
|
| 131 | + public static $optional = 'Optional'; |
|
| 132 | 132 | |
| 133 | 133 | /** |
| 134 | 134 | * @var $events |
| 135 | 135 | */ |
| 136 | - public static $events='Events'; |
|
| 136 | + public static $events = 'Events'; |
|
| 137 | 137 | |
| 138 | 138 | /** |
| 139 | 139 | * @var $listeners |
| 140 | 140 | */ |
| 141 | - public static $listeners='Listeners'; |
|
| 141 | + public static $listeners = 'Listeners'; |
|
| 142 | 142 | |
| 143 | 143 | /** |
| 144 | 144 | * @var $subscribers |
| 145 | 145 | */ |
| 146 | - public static $subscribers='Subscribers'; |
|
| 146 | + public static $subscribers = 'Subscribers'; |
|
| 147 | 147 | |
| 148 | 148 | /** |
| 149 | 149 | * @var $exception |
| 150 | 150 | */ |
| 151 | - public static $exception='Exceptions'; |
|
| 151 | + public static $exception = 'Exceptions'; |
|
| 152 | 152 | |
| 153 | 153 | /** |
| 154 | 154 | * @var $job |
| 155 | 155 | */ |
| 156 | - public static $job='Job'; |
|
| 156 | + public static $job = 'Job'; |
|
| 157 | 157 | |
| 158 | 158 | |
| 159 | 159 | /** |
| 160 | 160 | * @var $webservice |
| 161 | 161 | */ |
| 162 | - public static $webservice='Webservice'; |
|
| 162 | + public static $webservice = 'Webservice'; |
|
| 163 | 163 | |
| 164 | 164 | /** |
| 165 | 165 | * @var $log |
| 166 | 166 | */ |
| 167 | - public static $log='Log'; |
|
| 167 | + public static $log = 'Log'; |
|
| 168 | 168 | |
| 169 | 169 | |
| 170 | 170 | /** |
| 171 | 171 | * @var $resource |
| 172 | 172 | */ |
| 173 | - public static $resource='Resource'; |
|
| 173 | + public static $resource = 'Resource'; |
|
| 174 | 174 | |
| 175 | 175 | /** |
| 176 | 176 | * @var $cache |
| 177 | 177 | */ |
| 178 | - public static $cache='Cache'; |
|
| 178 | + public static $cache = 'Cache'; |
|
| 179 | 179 | |
| 180 | 180 | /** |
| 181 | 181 | * @var $language |
| 182 | 182 | */ |
| 183 | - public static $language='Language'; |
|
| 183 | + public static $language = 'Language'; |
|
| 184 | 184 | /** |
| 185 | 185 | * @var $session |
| 186 | 186 | */ |
| 187 | - public static $session='Session'; |
|
| 187 | + public static $session = 'Session'; |
|
| 188 | 188 | |
| 189 | 189 | /** |
| 190 | 190 | * @var $middleware |
| 191 | 191 | */ |
| 192 | - public static $middleware='Middleware'; |
|
| 192 | + public static $middleware = 'Middleware'; |
|
| 193 | 193 | |
| 194 | 194 | /** |
| 195 | 195 | * @var string $route |
| 196 | 196 | */ |
| 197 | - public static $route='Routes'; |
|
| 197 | + public static $route = 'Routes'; |
|
| 198 | 198 | |
| 199 | 199 | /** |
| 200 | 200 | * @var string |
| 201 | 201 | */ |
| 202 | - public static $request='Request'; |
|
| 202 | + public static $request = 'Request'; |
|
| 203 | 203 | |
| 204 | 204 | /** |
| 205 | 205 | * @var $factory |
| 206 | 206 | */ |
| 207 | - public static $factory='Factory'; |
|
| 207 | + public static $factory = 'Factory'; |
|
| 208 | 208 | |
| 209 | 209 | /** |
| 210 | 210 | * @var $node |
| 211 | 211 | */ |
| 212 | - public static $node='Node'; |
|
| 212 | + public static $node = 'Node'; |
|
| 213 | 213 | |
| 214 | 214 | /** |
| 215 | 215 | * @var $node |
| 216 | 216 | */ |
| 217 | - public static $provider='Providers'; |
|
| 217 | + public static $provider = 'Providers'; |
|
| 218 | 218 | |
| 219 | 219 | /** |
| 220 | 220 | * @var $once |
| 221 | 221 | */ |
| 222 | - public static $once='Once'; |
|
| 222 | + public static $once = 'Once'; |
|
| 223 | 223 | |
| 224 | 224 | /** |
| 225 | 225 | * @var $command |
| 226 | 226 | */ |
| 227 | - public static $command='Command'; |
|
| 227 | + public static $command = 'Command'; |
|
| 228 | 228 | |
| 229 | 229 | /** |
| 230 | 230 | * @var $stub |
| 231 | 231 | */ |
| 232 | - public static $stub='Stub'; |
|
| 232 | + public static $stub = 'Stub'; |
|
| 233 | 233 | |
| 234 | 234 | /** |
| 235 | 235 | * @var $store |
| 236 | 236 | */ |
| 237 | - public static $store='Store'; |
|
| 237 | + public static $store = 'Store'; |
|
| 238 | 238 | |
| 239 | 239 | /** |
| 240 | 240 | * @var $boot |
| 241 | 241 | */ |
| 242 | - public static $boot='Boot'; |
|
| 242 | + public static $boot = 'Boot'; |
|
| 243 | 243 | |
| 244 | 244 | /** |
| 245 | 245 | * @var $store |
| 246 | 246 | */ |
| 247 | - public static $autoService='Autoservice'; |
|
| 247 | + public static $autoService = 'Autoservice'; |
|
| 248 | 248 | } |
| 249 | 249 | \ No newline at end of file |
@@ -11,14 +11,14 @@ discard block |
||
| 11 | 11 | * @param null $group |
| 12 | 12 | * @return mixed|string |
| 13 | 13 | */ |
| 14 | - public static function projectPrefix($group=null) |
|
| 14 | + public static function projectPrefix($group = null) |
|
| 15 | 15 | {
|
| 16 | - if($group!==null){
|
|
| 16 | + if ($group!==null) {
|
|
| 17 | 17 | return self::$projectPrefix.''.DIRECTORY_SEPARATOR.''.$group; |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | - if(defined('group')){
|
|
| 21 | - return str_replace("\\","/",group);
|
|
| 20 | + if (defined('group')) {
|
|
| 21 | + return str_replace("\\", "/", group);
|
|
| 22 | 22 | } |
| 23 | 23 | } |
| 24 | 24 | |
@@ -27,9 +27,9 @@ discard block |
||
| 27 | 27 | * @param $path |
| 28 | 28 | * @return mixed |
| 29 | 29 | */ |
| 30 | - public static function projectPath($prefix,$path) |
|
| 30 | + public static function projectPath($prefix, $path) |
|
| 31 | 31 | {
|
| 32 | - return str_replace($prefix.'',"",$path); |
|
| 32 | + return str_replace($prefix.'', "", $path); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | public static function appPath() |
| 59 | 59 | {
|
| 60 | 60 | //get app path for application |
| 61 | - return self::$appPath=root.''.DIRECTORY_SEPARATOR.''.self::$appDefine.'/app'; |
|
| 61 | + return self::$appPath = root.''.DIRECTORY_SEPARATOR.''.self::$appDefine.'/app'; |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | /** |
@@ -75,10 +75,10 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | public static function getAppStorage() |
| 77 | 77 | {
|
| 78 | - if(!defined('app')) define('app',null);
|
|
| 78 | + if (!defined('app')) define('app', null);
|
|
| 79 | 79 | |
| 80 | 80 | //get app path for application |
| 81 | - return self::projectPath(self::projectPrefix(),self::appPath().''.DIRECTORY_SEPARATOR.''.self::slashToBackSlash(app).''.self::$storage); |
|
| 81 | + return self::projectPath(self::projectPrefix(), self::appPath().''.DIRECTORY_SEPARATOR.''.self::slashToBackSlash(app).''.self::$storage); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |
@@ -95,13 +95,13 @@ discard block |
||
| 95 | 95 | */ |
| 96 | 96 | public static function getEnvironmentFile() |
| 97 | 97 | {
|
| 98 | - if(defined('app')){
|
|
| 98 | + if (defined('app')) {
|
|
| 99 | 99 | |
| 100 | - $appProject=explode("\\",app);
|
|
| 101 | - $app=str_replace("\\","",app);
|
|
| 102 | - $environmentFile=self::appPath().''.DIRECTORY_SEPARATOR.''.strtolower($app).'.yaml'; |
|
| 100 | + $appProject = explode("\\", app);
|
|
| 101 | + $app = str_replace("\\", "", app);
|
|
| 102 | + $environmentFile = self::appPath().''.DIRECTORY_SEPARATOR.''.strtolower($app).'.yaml'; |
|
| 103 | 103 | |
| 104 | - if(file_exists($environmentFile)){
|
|
| 104 | + if (file_exists($environmentFile)) {
|
|
| 105 | 105 | //get app path for application |
| 106 | 106 | return $environmentFile; |
| 107 | 107 | } |
@@ -116,11 +116,11 @@ discard block |
||
| 116 | 116 | * @param bool $path |
| 117 | 117 | * @return string |
| 118 | 118 | */ |
| 119 | - public static function appVersionRoot($app=null,$path=false) |
|
| 119 | + public static function appVersionRoot($app = null, $path = false) |
|
| 120 | 120 | {
|
| 121 | - $app=($app!==null) ? $app : (defined('app')) ? app : null;
|
|
| 121 | + $app = ($app!==null) ? $app : (defined('app')) ? app : null;
|
|
| 122 | 122 | |
| 123 | - if($path){
|
|
| 123 | + if ($path) {
|
|
| 124 | 124 | |
| 125 | 125 | return self::appPath().''.DIRECTORY_SEPARATOR.''.self::slashToBackSlash($app).''.DIRECTORY_SEPARATOR.''.UrlVersionIdentifier::version().''; |
| 126 | 126 | } |
@@ -140,8 +140,8 @@ discard block |
||
| 140 | 140 | */ |
| 141 | 141 | public static function getServiceConf() |
| 142 | 142 | {
|
| 143 | - if(defined('endpoint')){
|
|
| 144 | - return path()->controller(endpoint,true).''.DIRECTORY_SEPARATOR.''.StaticPathModel::$configurationInController.'/ServiceConf.php'; |
|
| 143 | + if (defined('endpoint')) {
|
|
| 144 | + return path()->controller(endpoint, true).''.DIRECTORY_SEPARATOR.''.StaticPathModel::$configurationInController.'/ServiceConf.php'; |
|
| 145 | 145 | } |
| 146 | 146 | return []; |
| 147 | 147 | } |
@@ -158,10 +158,10 @@ discard block |
||
| 158 | 158 | * @param bool $namespace |
| 159 | 159 | * @return string |
| 160 | 160 | */ |
| 161 | - public static function appConfig($namespace=false) |
|
| 161 | + public static function appConfig($namespace = false) |
|
| 162 | 162 | {
|
| 163 | 163 | //get app config path for application |
| 164 | - if(false===$namespace){
|
|
| 164 | + if (false===$namespace) {
|
|
| 165 | 165 | return self::appPath().''.DIRECTORY_SEPARATOR.''.self::slashToBackSlash(app).''.DIRECTORY_SEPARATOR.''.UrlVersionIdentifier::version().''.DIRECTORY_SEPARATOR.''.self::$config; |
| 166 | 166 | } |
| 167 | 167 | return self::$autoloadNamespace.'\\'.app.'\\'.UrlVersionIdentifier::version().'\\'.self::$config; |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | {
|
| 175 | 175 | //get http header |
| 176 | 176 | /*** @var $httpHeaders \Store\Config\HttpHeaders */ |
| 177 | - $httpHeaders=self::$store.'\Config\HttpHeaders'; |
|
| 177 | + $httpHeaders = self::$store.'\Config\HttpHeaders'; |
|
| 178 | 178 | |
| 179 | 179 | //return http headers |
| 180 | 180 | return $httpHeaders::$httpHeaders; |
@@ -193,10 +193,10 @@ discard block |
||
| 193 | 193 | * @param bool $path |
| 194 | 194 | * @return string |
| 195 | 195 | */ |
| 196 | - public static function appAnnotation($app=null,$path=false) |
|
| 196 | + public static function appAnnotation($app = null, $path = false) |
|
| 197 | 197 | {
|
| 198 | - if($path){
|
|
| 199 | - return self::appVersionRoot($app,true).'/ServiceAnnotationsManager.php'; |
|
| 198 | + if ($path) {
|
|
| 199 | + return self::appVersionRoot($app, true).'/ServiceAnnotationsManager.php'; |
|
| 200 | 200 | } |
| 201 | 201 | return self::appVersionRoot($app).'\\ServiceAnnotationsManager'; |
| 202 | 202 | } |
@@ -213,11 +213,11 @@ discard block |
||
| 213 | 213 | * @param null $app |
| 214 | 214 | * @return string |
| 215 | 215 | */ |
| 216 | - public static function appMiddlewarePath($app=null) |
|
| 216 | + public static function appMiddlewarePath($app = null) |
|
| 217 | 217 | {
|
| 218 | - if($app!==null){
|
|
| 219 | - if(!defined('app')){
|
|
| 220 | - define('app',$app);
|
|
| 218 | + if ($app!==null) {
|
|
| 219 | + if (!defined('app')) {
|
|
| 220 | + define('app', $app);
|
|
| 221 | 221 | } |
| 222 | 222 | } |
| 223 | 223 | return self::$autoloadNamespace.'\\'.app.'\\'.UrlVersionIdentifier::version().'\\'.self::$middleware; |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | * @param null $app |
| 228 | 228 | * @return string |
| 229 | 229 | */ |
| 230 | - public static function appSourceEndpoint($app=null) |
|
| 230 | + public static function appSourceEndpoint($app = null) |
|
| 231 | 231 | {
|
| 232 | 232 | return self::appVersionRoot($app).'\\'.self::$optional.'\\'.self::$sourcePath.'\Endpoint'; |
| 233 | 233 | } |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | * @param null $app |
| 237 | 237 | * @return string |
| 238 | 238 | */ |
| 239 | - public static function appBuilder($app=null) |
|
| 239 | + public static function appBuilder($app = null) |
|
| 240 | 240 | {
|
| 241 | 241 | return self::appVersionRoot($app).'\\'.self::$model.'\\'.self::$builder; |
| 242 | 242 | } |
@@ -279,6 +279,6 @@ discard block |
||
| 279 | 279 | */ |
| 280 | 280 | private static function slashToBackSlash($data) |
| 281 | 281 | {
|
| 282 | - return str_replace("\\","/",$data);
|
|
| 282 | + return str_replace("\\", "/", $data);
|
|
| 283 | 283 | } |
| 284 | 284 | } |
| 285 | 285 | \ No newline at end of file |
@@ -75,7 +75,9 @@ |
||
| 75 | 75 | */ |
| 76 | 76 | public static function getAppStorage() |
| 77 | 77 | {
|
| 78 | - if(!defined('app')) define('app',null);
|
|
| 78 | + if(!defined('app')) {
|
|
| 79 | + define('app',null);
|
|
| 80 | + } |
|
| 79 | 81 | |
| 80 | 82 | //get app path for application |
| 81 | 83 | return self::projectPath(self::projectPrefix(),self::appPath().''.DIRECTORY_SEPARATOR.''.self::slashToBackSlash(app).''.self::$storage); |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | * |
| 12 | 12 | * @var array |
| 13 | 13 | */ |
| 14 | - protected $originGroups=[ |
|
| 14 | + protected $originGroups = [ |
|
| 15 | 15 | 'url' => 'url', |
| 16 | 16 | 'environment' => 'environment', |
| 17 | 17 | 'logger' => 'logger', |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * |
| 36 | 36 | * @var array |
| 37 | 37 | */ |
| 38 | - protected $middlewareGroups=[ |
|
| 38 | + protected $middlewareGroups = [ |
|
| 39 | 39 | 'middleware' => 'middleware' |
| 40 | 40 | ]; |
| 41 | 41 | /** |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | * |
| 47 | 47 | * @var array |
| 48 | 48 | */ |
| 49 | - protected $reflectionGroups=[ |
|
| 49 | + protected $reflectionGroups = [ |
|
| 50 | 50 | 'router' => 'router', |
| 51 | 51 | 'response' => 'response', |
| 52 | 52 | ]; |