@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $linkKeys = array_keys($resource['links']); |
| 49 | 49 | $links = ''; |
| 50 | 50 | foreach ($linkKeys as $link) { |
| 51 | - $links .= '<span class="label label-default">' . $link . '</span> '; |
|
| 51 | + $links .= '<span class="label label-default">'.$link.'</span> '; |
|
| 52 | 52 | } |
| 53 | 53 | foreach ($resource['options'] as $method => $param) { |
| 54 | 54 | $param = "<span class=\"strong\">{$param}</span>"; |
@@ -76,5 +76,5 @@ discard block |
||
| 76 | 76 | EOT; |
| 77 | 77 | // two step view |
| 78 | 78 | /** @noinspection PhpIncludeInspection */ |
| 79 | - echo include $devDir . '/view/layout.php'; |
|
| 79 | + echo include $devDir.'/view/layout.php'; |
|
| 80 | 80 | } |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | control: { |
| 34 | 34 | $mode = "Dev"; |
| 35 | - $app = require $appDir . '/bootstrap/instance.php'; |
|
| 35 | + $app = require $appDir.'/bootstrap/instance.php'; |
|
| 36 | 36 | /** @var $app \BEAR\Package\Provide\Application\AbstractApp */ |
| 37 | 37 | $appReflector = new ApplicationReflector($app); |
| 38 | 38 | $resourceInfo = $appReflector->getResources()[$_GET['uri']]; |
@@ -95,5 +95,5 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | EOT; |
| 97 | 97 | // two step view |
| 98 | - echo include $devDir . '/view/layout.php'; |
|
| 98 | + echo include $devDir.'/view/layout.php'; |
|
| 99 | 99 | } |
@@ -5,7 +5,7 @@ discard block |
||
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | 7 | $view['app_name'] = $appDir; |
| 8 | -$contentsForLayout =<<<EOT |
|
| 8 | +$contentsForLayout = <<<EOT |
|
| 9 | 9 | <style> |
| 10 | 10 | .glyphicon { |
| 11 | 11 | font-size: 20px; |
@@ -45,4 +45,4 @@ discard block |
||
| 45 | 45 | </div> |
| 46 | 46 | **** |
| 47 | 47 | EOT; |
| 48 | -echo include __DIR__ . '/view/layout.php'; |
|
| 48 | +echo include __DIR__.'/view/layout.php'; |
|
@@ -19,10 +19,10 @@ discard block |
||
| 19 | 19 | public static function packageUpdate(Event $event) |
| 20 | 20 | { |
| 21 | 21 | $packageDir = dirname(__DIR__); |
| 22 | - $targetHello = dirname(__DIR__) . '/vendor/bear/demo-apps/Demo.Helloworld'; |
|
| 23 | - $targetSandbox = dirname(__DIR__) . '/vendor/bear/demo-apps/Demo.Sandbox'; |
|
| 24 | - $helloApp = dirname(__DIR__) . '/apps/Demo.Helloworld'; |
|
| 25 | - $sandboxApp = dirname(__DIR__) . '/apps/Demo.Sandbox'; |
|
| 22 | + $targetHello = dirname(__DIR__).'/vendor/bear/demo-apps/Demo.Helloworld'; |
|
| 23 | + $targetSandbox = dirname(__DIR__).'/vendor/bear/demo-apps/Demo.Sandbox'; |
|
| 24 | + $helloApp = dirname(__DIR__).'/apps/Demo.Helloworld'; |
|
| 25 | + $sandboxApp = dirname(__DIR__).'/apps/Demo.Sandbox'; |
|
| 26 | 26 | |
| 27 | 27 | if (file_exists($helloApp)) { |
| 28 | 28 | unlink($helloApp); |
@@ -33,6 +33,6 @@ discard block |
||
| 33 | 33 | symlink($targetHello, $helloApp); |
| 34 | 34 | symlink($targetSandbox, $sandboxApp); |
| 35 | 35 | |
| 36 | - include $packageDir . '/bin/bear.env'; |
|
| 36 | + include $packageDir.'/bin/bear.env'; |
|
| 37 | 37 | } |
| 38 | 38 | } |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | ) { |
| 100 | 100 | global $argv; |
| 101 | 101 | |
| 102 | - $this->web = $web ? : new Web; |
|
| 102 | + $this->web = $web ?: new Web; |
|
| 103 | 103 | if (is_null($server) && isset($_SERVER)) { |
| 104 | 104 | $server = $_SERVER; |
| 105 | 105 | } |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | } elseif (isset($argv[2])) { |
| 109 | 109 | $this->requestUri = $argv[2]; |
| 110 | 110 | } |
| 111 | - $this->sapiName = $sapiName ? : php_sapi_name(); |
|
| 111 | + $this->sapiName = $sapiName ?: php_sapi_name(); |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | /** |
@@ -132,10 +132,10 @@ discard block |
||
| 132 | 132 | |
| 133 | 133 | // stop |
| 134 | 134 | register_shutdown_function( |
| 135 | - function () { |
|
| 135 | + function() { |
|
| 136 | 136 | $xhprof = xhprof_disable(); |
| 137 | 137 | if (!$xhprof) { |
| 138 | - error_log('xhprof failed in ' . __FILE__); |
|
| 138 | + error_log('xhprof failed in '.__FILE__); |
|
| 139 | 139 | |
| 140 | 140 | return; |
| 141 | 141 | } |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | ini_set('xdebug.collect_params', 0); |
| 161 | 161 | ini_set('xdebug.max_nesting_level', 500); |
| 162 | 162 | ini_set('xdebug.file_link_format', '/dev/edit/?file=%f&line=$l'); |
| 163 | - if (! ini_get('date.timezone')) { |
|
| 163 | + if (!ini_get('date.timezone')) { |
|
| 164 | 164 | date_default_timezone_set('Asia/Tokyo'); |
| 165 | 165 | } |
| 166 | 166 | |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | */ |
| 173 | 173 | public function registerErrorHandler() |
| 174 | 174 | { |
| 175 | - set_error_handler( function ($errNo, $errStr, $errFile, $errLine) { |
|
| 175 | + set_error_handler(function($errNo, $errStr, $errFile, $errLine) { |
|
| 176 | 176 | if (error_reporting() === 0) { |
| 177 | 177 | |
| 178 | 178 | // return in error-control operator(@) |
@@ -209,14 +209,14 @@ discard block |
||
| 209 | 209 | public function registerExceptionHandler($logDir) |
| 210 | 210 | { |
| 211 | 211 | set_exception_handler( |
| 212 | - function ($e) use ($logDir) { |
|
| 212 | + function($e) use ($logDir) { |
|
| 213 | 213 | if ($e instanceof \Error) { |
| 214 | 214 | $e = new ErrorException($e->getMessage()); |
| 215 | 215 | } |
| 216 | 216 | var_dump(get_class($e)); |
| 217 | 217 | $handler = new ExceptionHandler( |
| 218 | 218 | new SymfonyResponse(new ConsoleOutput), |
| 219 | - (dirname(__DIR__)) . '/Dev/Module/ExceptionHandle/template/exception.php' |
|
| 219 | + (dirname(__DIR__)).'/Dev/Module/ExceptionHandle/template/exception.php' |
|
| 220 | 220 | ); |
| 221 | 221 | $handler->setLogDir($logDir); |
| 222 | 222 | $handler->handle($e); |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | public function registerFatalErrorHandler() |
| 256 | 256 | { |
| 257 | 257 | register_shutdown_function( |
| 258 | - function () { |
|
| 258 | + function() { |
|
| 259 | 259 | if (PHP_SAPI === 'cli') { |
| 260 | 260 | return; |
| 261 | 261 | } |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | $outputBuffer = ob_get_clean(); |
| 275 | 275 | error_log($outputBuffer); |
| 276 | 276 | http_response_code(500); |
| 277 | - $html = require __DIR__ . '/view/fatal_error.php'; |
|
| 277 | + $html = require __DIR__.'/view/fatal_error.php'; |
|
| 278 | 278 | echo $html; |
| 279 | 279 | exit(1); |
| 280 | 280 | } |
@@ -307,10 +307,10 @@ discard block |
||
| 307 | 307 | if (isset($this->app->router)) { |
| 308 | 308 | $this->route($this->app); |
| 309 | 309 | } |
| 310 | - if (! $this->web->isDevWebService($this->sapiName, $this->requestUri)) { |
|
| 310 | + if (!$this->web->isDevWebService($this->sapiName, $this->requestUri)) { |
|
| 311 | 311 | return ''; |
| 312 | 312 | } |
| 313 | - $requestUri = $requestUri ? : $_SERVER['REQUEST_URI']; |
|
| 313 | + $requestUri = $requestUri ?: $_SERVER['REQUEST_URI']; |
|
| 314 | 314 | $html = $this->web->service($requestUri, $this->app, $this->appDir); |
| 315 | 315 | |
| 316 | 316 | return $html; |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | */ |
| 333 | 333 | public function loadDevFunctions() |
| 334 | 334 | { |
| 335 | - error_log(__METHOD__ . ' is no longer necessary.'); |
|
| 335 | + error_log(__METHOD__.' is no longer necessary.'); |
|
| 336 | 336 | |
| 337 | 337 | return $this; |
| 338 | 338 | } |
@@ -361,11 +361,11 @@ discard block |
||
| 361 | 361 | */ |
| 362 | 362 | private function getVendorDirectory() |
| 363 | 363 | { |
| 364 | - $vendorDir = dirname(dirname(__DIR__)) . '/vendor'; |
|
| 364 | + $vendorDir = dirname(dirname(__DIR__)).'/vendor'; |
|
| 365 | 365 | |
| 366 | 366 | if (strpos(__DIR__, '/vendor/bear/package') !== false) { |
| 367 | 367 | $baseDir = explode('/vendor/bear/package', __DIR__)[0]; |
| 368 | - $vendorDir = $baseDir . '/vendor'; |
|
| 368 | + $vendorDir = $baseDir.'/vendor'; |
|
| 369 | 369 | } |
| 370 | 370 | return $vendorDir; |
| 371 | 371 | } |