diff --git a/Maslosoft/Signals/Utility.php b/Maslosoft/Signals/Utility.php index e9b5287..47ecb86 100644 --- a/Maslosoft/Signals/Utility.php +++ b/Maslosoft/Signals/Utility.php @@ -20,10 +20,8 @@ class Utility extends CComponent private $_data = [ Signal::slots => [ - ], Signal::signals => [ - ] ]; @@ -34,10 +32,10 @@ public function generate() 'SignalFor' ]; $paths = []; - foreach(Yii::app()->signal->searchAliases as $alias) + foreach (Yii::app()->signal->searchAliases as $alias) { $path = Yii::getPathOfAlias($alias); - if($path) + if ($path) { $paths[] = $path; } @@ -58,7 +56,7 @@ public function processFile($file) // Create alias for current file $namespace = AnnotationUtility::rawAnnotate($file)['namespace']; $className = AnnotationUtility::rawAnnotate($file)['className']; - + // Remove global `\` namespace $namespace = preg_replace('~^\\\\+~', '', $namespace); @@ -66,12 +64,12 @@ public function processFile($file) /** * TODO Investigate this case, this is only workaround */ - if(!is_string($namespace)) + if (!is_string($namespace)) { // var_dump($file); return false; } - if(strstr($namespace, '\\')) + if (strstr($namespace, '\\')) { // Use namespaced name, class must autoload $alias = $namespace . '\\' . $className; @@ -140,7 +138,7 @@ private function _getValuesFor($src) $value = []; foreach ($src as $val) { - if(!isset($val['value'])) + if (!array_key_exists('value', $val)) { continue; } @@ -157,10 +155,4 @@ private function _getValuesFor($src) return array_values(array_unique($value)); } - private function _getAlias($val, $file) - { - - return $alias; - } - } diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 0000000..b652f77 --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,7 @@ +include.path=${php.global.include.path} +php.version=PHP_55 +source.encoding=UTF-8 +src.dir=. +tags.asp=false +tags.short=false +web.root=. diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 0000000..86eaeb2 --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,9 @@ + + + org.netbeans.modules.php.project + + + signals + + +