@@ -120,10 +120,10 @@ discard block |
||
| 120 | 120 | $fileArray = array_map('htmlspecialchars', $files); |
| 121 | 121 | $fileArray[$line - 1] = "<span class=\"hit-line\">{$fileArray[$line - 1]}</span>"; |
| 122 | 122 | $shortListArray = array_slice($fileArray, $line - $num, $num * 2); |
| 123 | - $shortListArray[$num - 1] = '<strong>' . $fileArray[$line - 1] . '</strong>'; |
|
| 123 | + $shortListArray[$num - 1] = '<strong>'.$fileArray[$line - 1].'</strong>'; |
|
| 124 | 124 | $shortList = implode('', $shortListArray); |
| 125 | - $shortList = '<pre class="short-list" style="background-color: #F0F0F9;">' . $shortList . '</pre>'; |
|
| 126 | - $result .= $shortList . '</div>'; |
|
| 125 | + $shortList = '<pre class="short-list" style="background-color: #F0F0F9;">'.$shortList.'</pre>'; |
|
| 126 | + $result .= $shortList.'</div>'; |
|
| 127 | 127 | |
| 128 | 128 | return $result; |
| 129 | 129 | } |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | $divObject = $this->divObject($arg); |
| 150 | 150 | $objHash = spl_object_hash($arg); |
| 151 | 151 | $link = "<a href=\"#\" class=\"\" data-toggle=\"collapse\" data-target=\"#obj{$objHash}\">"; |
| 152 | - $arg = $link . '(object) ' . $this->getObjectName($arg) . '</a>'; |
|
| 152 | + $arg = $link.'(object) '.$this->getObjectName($arg).'</a>'; |
|
| 153 | 153 | } |
| 154 | 154 | if (is_array($arg)) { |
| 155 | 155 | $this->makeArgsElementsScalar($arg); |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | $html .= "<tr><td>{$index}</td><td>{$type}</td></td><td>{$arg}</td></tr>"; |
| 158 | 158 | } |
| 159 | 159 | $html .= '</table>'; |
| 160 | - return $html . $divObject; |
|
| 160 | + return $html.$divObject; |
|
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | /** |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | */ |
| 206 | 206 | private function getObjectName($obj) |
| 207 | 207 | { |
| 208 | - return '<strong>' . get_class($obj) . '</strong><span class="weak">#' . spl_object_hash($obj) . '</span>'; |
|
| 208 | + return '<strong>'.get_class($obj).'</strong><span class="weak">#'.spl_object_hash($obj).'</span>'; |
|
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | /** |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | $this |
| 20 | 20 | ->bind('') |
| 21 | 21 | ->annotatedWith('exceptionTpl') |
| 22 | - ->toInstance(__DIR__ . '/template/exception.php'); |
|
| 22 | + ->toInstance(__DIR__.'/template/exception.php'); |
|
| 23 | 23 | $this |
| 24 | 24 | ->bind('BEAR\Resource\ResourceObject') |
| 25 | 25 | ->annotatedWith('errorPage') |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | private function getPageLog(ExtendedPdo $db, $page) |
| 58 | 58 | { |
| 59 | 59 | $result = $db->fetchAll( |
| 60 | - 'SELECT * FROM `log` WHERE `extra_page` = ' . "'{$page}' ORDER BY id ASC" |
|
| 60 | + 'SELECT * FROM `log` WHERE `extra_page` = '."'{$page}' ORDER BY id ASC" |
|
| 61 | 61 | ); |
| 62 | 62 | $logs = []; |
| 63 | 63 | $log = ''; |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $body = print_a(json_decode($log['body'], true), "return:1"); |
| 90 | 90 | $meta = $this->getHeaderInfo($log['req'], $log['header']); |
| 91 | 91 | if ($meta) { |
| 92 | - $body .= '<i class="icon-info-sign"></i><br>' . print_a($meta, "return:1"); |
|
| 92 | + $body .= '<i class="icon-info-sign"></i><br>'.print_a($meta, "return:1"); |
|
| 93 | 93 | } |
| 94 | 94 | $tableBody .= <<<EOT |
| 95 | 95 | <tr> |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | EOT; |
| 104 | 104 | } |
| 105 | 105 | $path = isset($log['path']) ? $log['path'] : ''; |
| 106 | - $body = $this->getTableOpen($path, $logs) . $tableBody . self::TABLE_CLOSE; |
|
| 106 | + $body = $this->getTableOpen($path, $logs).$tableBody.self::TABLE_CLOSE; |
|
| 107 | 107 | |
| 108 | 108 | return $body; |
| 109 | 109 | } |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | $meta = []; |
| 161 | 161 | |
| 162 | 162 | $method = substr($req, 0, 3); |
| 163 | - $onMethod = 'on' . ucwords($method); |
|
| 163 | + $onMethod = 'on'.ucwords($method); |
|
| 164 | 164 | $header = json_decode($header, true); |
| 165 | 165 | |
| 166 | 166 | // interceptors |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | */ |
| 53 | 53 | private function getPath($path) |
| 54 | 54 | { |
| 55 | - if (! is_array($path)) { |
|
| 55 | + if (!is_array($path)) { |
|
| 56 | 56 | $isDir = 'true'; |
| 57 | 57 | $path = $this->root; |
| 58 | 58 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | public function service($pagePath, AppInterface $app, $appDir) |
| 34 | 34 | { |
| 35 | - global $app; // for template |
|
| 35 | + global $app; // for template |
|
| 36 | 36 | global $appDir; // for template |
| 37 | 37 | |
| 38 | 38 | $path = parse_url(substr($pagePath, 4))['path']; |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $path .= 'index.php'; |
| 42 | 42 | } |
| 43 | 43 | $packageRoot = dirname(dirname(dirname(__DIR__))); |
| 44 | - $scriptFile = $packageRoot . '/var/www/dev/' . $path; |
|
| 44 | + $scriptFile = $packageRoot.'/var/www/dev/'.$path; |
|
| 45 | 45 | if (file_exists($scriptFile) && is_file($scriptFile)) { |
| 46 | 46 | /** @noinspection PhpIncludeInspection */ |
| 47 | 47 | ob_start(); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | public function isDevWebService($sapiName, $requestUri) |
| 73 | 73 | { |
| 74 | 74 | $path = substr($requestUri, 0, 5); |
| 75 | - $isDevTool = ($sapiName !== 'cli') && ($path === '/dev' || $path === '/dev/'); |
|
| 75 | + $isDevTool = ($sapiName !== 'cli') && ($path === '/dev' || $path === '/dev/'); |
|
| 76 | 76 | |
| 77 | 77 | return $isDevTool; |
| 78 | 78 | } |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | function getCachedApp($appName, $context, $tmpDir) |
| 40 | 40 | { |
| 41 | - $injector = function () use ($appName, $context, $tmpDir) { |
|
| 41 | + $injector = function() use ($appName, $context, $tmpDir) { |
|
| 42 | 42 | $appModule = "{$appName}\Module\AppModule"; |
| 43 | 43 | return new Injector( |
| 44 | 44 | new Container(new Forge(new Config(new Annotation(new Definition, new AnnotationReader)))), |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | new DiLogger |
| 52 | 52 | ); |
| 53 | 53 | }; |
| 54 | - $initialization = function (AbstractApp $app) use ($context) { |
|
| 54 | + $initialization = function(AbstractApp $app) use ($context) { |
|
| 55 | 55 | if ($context === 'prod') { |
| 56 | 56 | (new ApplicationReflector($app))->compileAllResources(); |
| 57 | 57 | } |
@@ -60,12 +60,12 @@ discard block |
||
| 60 | 60 | $cache = function_exists('apc_fetch') ? |
| 61 | 61 | new FusionCache( |
| 62 | 62 | new ApcCache, |
| 63 | - function () use ($tmpDir) { |
|
| 63 | + function() use ($tmpDir) { |
|
| 64 | 64 | return new FilesystemCache($tmpDir); |
| 65 | 65 | } |
| 66 | 66 | ) |
| 67 | 67 | : new FilesystemCache($tmpDir); |
| 68 | - $injector = new CacheInjector($injector, $initialization, $appName . $context, $cache); |
|
| 68 | + $injector = new CacheInjector($injector, $initialization, $appName.$context, $cache); |
|
| 69 | 69 | $app = $injector->getInstance('\BEAR\Sunday\Extension\Application\AppInterface'); |
| 70 | 70 | /* @var $app \BEAR\Sunday\Extension\Application\AppInterface */ |
| 71 | 71 | return $app; |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | public function getEtag($object, $args) |
| 20 | 20 | { |
| 21 | 21 | $args = ($args instanceof \ArrayObject) ? $args->getArrayCopy() : $args; |
| 22 | - $etag = crc32(get_class($object) . serialize($args)); |
|
| 22 | + $etag = crc32(get_class($object).serialize($args)); |
|
| 23 | 23 | |
| 24 | 24 | return $etag; |
| 25 | 25 | } |
@@ -19,12 +19,12 @@ |
||
| 19 | 19 | $this->bindInterceptor( |
| 20 | 20 | $this->matcher->any(), |
| 21 | 21 | $this->matcher->annotatedWith('BEAR\Sunday\Annotation\Cache'), |
| 22 | - [$this->requestInjection(__NAMESPACE__ . '\Interceptor\CacheLoader')] |
|
| 22 | + [$this->requestInjection(__NAMESPACE__.'\Interceptor\CacheLoader')] |
|
| 23 | 23 | ); |
| 24 | 24 | $this->bindInterceptor( |
| 25 | 25 | $this->matcher->any(), |
| 26 | 26 | $this->matcher->annotatedWith('BEAR\Sunday\Annotation\CacheUpdate'), |
| 27 | - [$this->requestInjection(__NAMESPACE__ . '\Interceptor\CacheUpdater')] |
|
| 27 | + [$this->requestInjection(__NAMESPACE__.'\Interceptor\CacheUpdater')] |
|
| 28 | 28 | ); |
| 29 | 29 | } |
| 30 | 30 | } |
@@ -48,9 +48,9 @@ discard block |
||
| 48 | 48 | global $appDir; |
| 49 | 49 | |
| 50 | 50 | $appDir = $this->appDir; |
| 51 | - $constantsCollection = require $this->appDir . '/var/conf/constants.php'; |
|
| 51 | + $constantsCollection = require $this->appDir.'/var/conf/constants.php'; |
|
| 52 | 52 | $constants = $constantsCollection[$this->context] + $constantsCollection['prod'] + ($this->getDefaultConstants($appDir)); |
| 53 | - $paramsCollection = require $this->appDir . '/var/conf/params.php'; |
|
| 53 | + $paramsCollection = require $this->appDir.'/var/conf/params.php'; |
|
| 54 | 54 | $params = $paramsCollection[$this->context] + $paramsCollection['prod']; |
| 55 | 55 | $appClass = $constants['app_class']; |
| 56 | 56 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | { |
| 75 | 75 | return [ |
| 76 | 76 | 'app_name'=> $this->nameSpace, |
| 77 | - 'app_class' => $this->nameSpace . '\App', |
|
| 77 | + 'app_class' => $this->nameSpace.'\App', |
|
| 78 | 78 | 'tmp_dir' => "{$appDir}/var/tmp", |
| 79 | 79 | 'log_dir' => "{$appDir}/var/log", |
| 80 | 80 | 'lib_dir' => "{$appDir}/var/lib", |