@@ -89,7 +89,7 @@ |
||
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | if (!$target) { |
| 92 | - $target = get_class($source) . 'Snapshot'; |
|
| 92 | + $target = get_class($source).'Snapshot'; |
|
| 93 | 93 | $target = new $target($source); |
| 94 | 94 | } |
| 95 | 95 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | } |
| 72 | 72 | $config['log'] = $log; |
| 73 | 73 | |
| 74 | - return new static($eventManager,$config); |
|
| 74 | + return new static($eventManager, $config); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | public function startDebug() |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | /** @var Logger $logger */ |
| 102 | 102 | $logger = Debugger::getLogger(); |
| 103 | 103 | $logger->emailSnooze = $config['email_snooze']; |
| 104 | - $logger->mailer = function ($message, $email) use ($logger) { |
|
| 104 | + $logger->mailer = function($message, $email) use ($logger) { |
|
| 105 | 105 | $exceptionFile = null; |
| 106 | 106 | |
| 107 | 107 | if ($message instanceof \Exception || $message instanceof \Throwable) { |
@@ -110,9 +110,9 @@ discard block |
||
| 110 | 110 | while ($message) { |
| 111 | 111 | $tmp[] = ( |
| 112 | 112 | $message instanceof \ErrorException |
| 113 | - ? Helpers::errorTypeToString($message->getSeverity()) . ': ' . $message->getMessage() |
|
| 114 | - : Helpers::getClass($message) . ': ' . $message->getMessage() . ($message->getCode() ? ' #' . $message->getCode() : '') |
|
| 115 | - ) . ' in ' . $message->getFile() . ':' . $message->getLine(); |
|
| 113 | + ? Helpers::errorTypeToString($message->getSeverity()).': '.$message->getMessage() |
|
| 114 | + : Helpers::getClass($message).': '.$message->getMessage().($message->getCode() ? ' #'.$message->getCode() : '') |
|
| 115 | + ).' in '.$message->getFile().':'.$message->getLine(); |
|
| 116 | 116 | $message = $message->getPrevious(); |
| 117 | 117 | } |
| 118 | 118 | $message = implode("\ncaused by ", $tmp); |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | $host = preg_replace('#[^\w.-]+#', '', isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : php_uname('n')); |
| 129 | 129 | $mimeMessage = new Mime\Message(); |
| 130 | 130 | |
| 131 | - $text = new Mime\Part($message . "\n\nsource: " . Helpers::getSource()); |
|
| 131 | + $text = new Mime\Part($message."\n\nsource: ".Helpers::getSource()); |
|
| 132 | 132 | $text->type = Mime\Mime::TYPE_TEXT; |
| 133 | 133 | $text->charset = 'utf-8'; |
| 134 | 134 | $mimeMessage->addPart($text); |
@@ -92,8 +92,8 @@ |
||
| 92 | 92 | */ |
| 93 | 93 | protected function authetificate() |
| 94 | 94 | { |
| 95 | - $auth = array_key_exists('user', $this->config)?$this->config['user']:''; |
|
| 96 | - $pass = array_key_exists('pass', $this->config)?$this->config['pass']:''; |
|
| 95 | + $auth = array_key_exists('user', $this->config) ? $this->config['user'] : ''; |
|
| 96 | + $pass = array_key_exists('pass', $this->config) ? $this->config['pass'] : ''; |
|
| 97 | 97 | return $this->setAuth($auth, $pass); |
| 98 | 98 | } |
| 99 | 99 | |
@@ -89,11 +89,11 @@ discard block |
||
| 89 | 89 | $config = $this->serviceManager->get('Config'); |
| 90 | 90 | $appConfig = $this->serviceManager->get('ApplicationConfig'); |
| 91 | 91 | foreach ($appConfig['modules'] as $module) { |
| 92 | - $this->config[$module] = array_key_exists($module, $config)?$config[$module]:array(); |
|
| 92 | + $this->config[$module] = array_key_exists($module, $config) ? $config[$module] : array(); |
|
| 93 | 93 | } |
| 94 | 94 | } |
| 95 | 95 | if (isset($namespace)) { |
| 96 | - return array_key_exists($namespace, $this->config)?$this->config[$namespace]: array(); |
|
| 96 | + return array_key_exists($namespace, $this->config) ? $this->config[$namespace] : array(); |
|
| 97 | 97 | } |
| 98 | 98 | return $this->config; |
| 99 | 99 | } |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | } |
| 107 | 107 | if (!empty($this->map[$key])) { |
| 108 | 108 | $module = $this->getNamespace(); |
| 109 | - return isset($this->map[$key][$module])?$this->map[$key][$module]:array(); |
|
| 109 | + return isset($this->map[$key][$module]) ? $this->map[$key][$module] : array(); |
|
| 110 | 110 | } |
| 111 | 111 | return array(); |
| 112 | 112 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | public function setEventPrototype(EventInterface $prototype) |
| 36 | 36 | { |
| 37 | 37 | if (!$prototype instanceof DependencyResultEvent) { |
| 38 | - throw new \InvalidArgumentException('This event manager only accepts events of the type ' . DependencyResultEvent::class); |
|
| 38 | + throw new \InvalidArgumentException('This event manager only accepts events of the type '.DependencyResultEvent::class); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | parent::setEventPrototype($prototype); |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | protected function triggerListeners(EventInterface $event, callable $callback = null) |
| 56 | 56 | { |
| 57 | 57 | if (!$event instanceof DependencyResultEvent) { |
| 58 | - throw new \InvalidArgumentException('This event manager only accepts events of the type ' . DependencyResultEvent::class); |
|
| 58 | + throw new \InvalidArgumentException('This event manager only accepts events of the type '.DependencyResultEvent::class); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | $results = parent::triggerListeners($event, $callback); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | { |
| 51 | 51 | use ZfListenerAggregateTrait; |
| 52 | 52 | |
| 53 | - public function attach(EventManagerInterface $events, $priority=1) |
|
| 53 | + public function attach(EventManagerInterface $events, $priority = 1) |
|
| 54 | 54 | { |
| 55 | 55 | return $this->attachEvents($events); |
| 56 | 56 | } |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $method = $spec[1]; |
| 90 | 90 | $priority = isset($spec[2]) ? $spec[2] : 0; |
| 91 | 91 | |
| 92 | - $this->listeners[] = $events->attach($event, [ $this, $method ], $priority); |
|
| 92 | + $this->listeners[] = $events->attach($event, [$this, $method], $priority); |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | return $this; |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | $inputLabel = isset($this->labelMap[$inputName]) ? $this->labelMap[$inputName] : $inputName; |
| 75 | 75 | |
| 76 | 76 | if (is_array($inputLabel)) { |
| 77 | - $priority = isset($inputLabel[1])?$inputLabel[1]:0; |
|
| 77 | + $priority = isset($inputLabel[1]) ? $inputLabel[1] : 0; |
|
| 78 | 78 | $inputLabel = $inputLabel[0]; |
| 79 | 79 | } else { |
| 80 | 80 | $priority = 0; |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | ), |
| 89 | 89 | ); |
| 90 | 90 | if (is_bool($value)) { |
| 91 | - $input['type']= 'Checkbox'; |
|
| 91 | + $input['type'] = 'Checkbox'; |
|
| 92 | 92 | $input['attributes']['checked'] = $value; |
| 93 | 93 | } else { |
| 94 | 94 | $input['attributes']['value'] = $value; |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | foreach ($children as $name => $child) { |
| 100 | 100 | $objectClass = ltrim(get_class($settings), '\\'); |
| 101 | 101 | $moduleName = substr($objectClass, 0, strpos($objectClass, '\\')); |
| 102 | - $fieldsetName = $moduleName . '/' . ucfirst($name) . 'SettingsFieldset'; |
|
| 102 | + $fieldsetName = $moduleName.'/'.ucfirst($name).'SettingsFieldset'; |
|
| 103 | 103 | |
| 104 | 104 | if ($this->formManager->has($fieldsetName)) { |
| 105 | 105 | $fieldset = $this->formManager->get($fieldsetName); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | } |
| 71 | 71 | $this->setAttribute('method', 'post'); |
| 72 | 72 | $object = $this->getObject(); |
| 73 | - $fieldsetName = $object->getModuleName() . '/SettingsFieldset'; |
|
| 73 | + $fieldsetName = $object->getModuleName().'/SettingsFieldset'; |
|
| 74 | 74 | |
| 75 | 75 | if ($this->formManager->has($fieldsetName)) { |
| 76 | 76 | $fieldset = $this->formManager->get($fieldsetName); |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | $this->add([ |
| 89 | 89 | 'type' => 'DefaultButtonsFieldset' |
| 90 | 90 | ]); |
| 91 | - $this->isBuild=true; |
|
| 91 | + $this->isBuild = true; |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | |
| 107 | 107 | public function setName($name) |
| 108 | 108 | { |
| 109 | - parent::setName(strtolower($name) . '-settings'); |
|
| 109 | + parent::setName(strtolower($name).'-settings'); |
|
| 110 | 110 | $urlHelper = $this->viewHelper->get('url'); |
| 111 | 111 | |
| 112 | 112 | $url = $urlHelper('lang/settings', array('module' => $name), true); |
@@ -45,6 +45,6 @@ |
||
| 45 | 45 | */ |
| 46 | 46 | public function getConfig() |
| 47 | 47 | { |
| 48 | - return include __DIR__ . '/../config/module.config.php'; |
|
| 48 | + return include __DIR__.'/../config/module.config.php'; |
|
| 49 | 49 | } |
| 50 | 50 | } |