Completed
Push — 0.x ( a2b070...a5c73d )
by Akihito
09:21
created
src/Module/Database/Dbal/PagerConnection.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      */
164 164
     public function query()
165 165
     {
166
-        $this->currentPage = $this->currentPage ? : (isset($_GET[$this->pageKey]) ? $_GET[$this->pageKey] : 1);
166
+        $this->currentPage = $this->currentPage ?: (isset($_GET[$this->pageKey]) ? $_GET[$this->pageKey] : 1);
167 167
         $firstResult = ($this->currentPage - 1) * $this->maxPerPage;
168 168
         $args = func_get_args();
169 169
         $query = $args[0];
@@ -206,8 +206,8 @@  discard block
 block discarded – undo
206 206
      */
207 207
     private function getHtml()
208 208
     {
209
-        $view = $this->view ? : new TwitterBootstrap3View;
210
-        $routeGenerator = $this->routeGenerator ? : function ($page) {
209
+        $view = $this->view ?: new TwitterBootstrap3View;
210
+        $routeGenerator = $this->routeGenerator ?: function($page) {
211 211
             return "?{$this->pageKey}={$page}";
212 212
         };
213 213
         $html = $view->render(
Please login to merge, or discard this patch.
src/Module/Database/Dbal/DbalModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     private function installDbInjector()
30 30
     {
31
-        $dbInjector = $this->requestInjection(__NAMESPACE__ . '\Interceptor\DbInjector');
31
+        $dbInjector = $this->requestInjection(__NAMESPACE__.'\Interceptor\DbInjector');
32 32
         $this->bindInterceptor(
33 33
             $this->matcher->annotatedWith('BEAR\Sunday\Annotation\Db'),
34 34
             $this->matcher->startWith('on'),
Please login to merge, or discard this patch.
src/Module/Database/Dbal/PagingQuery.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     {
129 129
         // be smart and try to guess the total number of records
130 130
         $countQuery = $this->getCountQuery($query);
131
-        if (! $countQuery) {
131
+        if (!$countQuery) {
132 132
             // GROUP BY => fetch the whole result set and count the rows returned
133 133
             $result = $this->pdo->query($query)->fetchAll();
134 134
             $count = count($result);
@@ -157,13 +157,13 @@  discard block
 block discarded – undo
157 157
         }
158 158
         $openParenthesis = '(?:\()';
159 159
         $closeParenthesis = '(?:\))';
160
-        $subQueryInSelect = $openParenthesis . '.*\bFROM\b.*' . $closeParenthesis;
161
-        $pattern = '/(?:.*' . $subQueryInSelect . '.*)\bFROM\b\s+/Uims';
160
+        $subQueryInSelect = $openParenthesis.'.*\bFROM\b.*'.$closeParenthesis;
161
+        $pattern = '/(?:.*'.$subQueryInSelect.'.*)\bFROM\b\s+/Uims';
162 162
         if (preg_match($pattern, $query)) {
163 163
             return false;
164 164
         }
165
-        $subQueryWithLimitOrder = $openParenthesis . '.*\b(LIMIT|ORDER)\b.*' . $closeParenthesis;
166
-        $pattern = '/.*\bFROM\b.*(?:.*' . $subQueryWithLimitOrder . '.*).*/Uims';
165
+        $subQueryWithLimitOrder = $openParenthesis.'.*\b(LIMIT|ORDER)\b.*'.$closeParenthesis;
166
+        $pattern = '/.*\bFROM\b.*(?:.*'.$subQueryWithLimitOrder.'.*).*/Uims';
167 167
         if (preg_match($pattern, $query)) {
168 168
             return false;
169 169
         }
Please login to merge, or discard this patch.
src/Module/Di/DiCompilerModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,6 +13,6 @@
 block discarded – undo
13 13
 {
14 14
     protected function configure()
15 15
     {
16
-        $this->bind('Ray\Di\InstanceInterface')->toProvider(__NAMESPACE__ . '\DiCompilerProvider')->in(Scope::SINGLETON);
16
+        $this->bind('Ray\Di\InstanceInterface')->toProvider(__NAMESPACE__.'\DiCompilerProvider')->in(Scope::SINGLETON);
17 17
     }
18 18
 }
Please login to merge, or discard this patch.
src/Module/Di/DiModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,6 +13,6 @@
 block discarded – undo
13 13
 {
14 14
     protected function configure()
15 15
     {
16
-        $this->bind('Ray\Di\InjectorInterface')->toProvider(__NAMESPACE__ . '\DiProvider')->in(Scope::SINGLETON);
16
+        $this->bind('Ray\Di\InjectorInterface')->toProvider(__NAMESPACE__.'\DiProvider')->in(Scope::SINGLETON);
17 17
     }
18 18
 }
Please login to merge, or discard this patch.
src/Module/Form/AuraForm/AuraFormModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,6 +15,6 @@
 block discarded – undo
15 15
      */
16 16
     protected function configure()
17 17
     {
18
-        $this->bind('Aura\Input\Form')->toProvider(__NAMESPACE__ . '\AuraFormProvider');
18
+        $this->bind('Aura\Input\Form')->toProvider(__NAMESPACE__.'\AuraFormProvider');
19 19
     }
20 20
 }
Please login to merge, or discard this patch.
src/Provide/ApplicationLogger/ApplicationLoggerModule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@
 block discarded – undo
19 19
         // log register
20 20
         $this
21 21
             ->bind('BEAR\Sunday\Extension\ApplicationLogger\ApplicationLoggerInterface')
22
-            ->to(__NAMESPACE__ . '\ApplicationLogger')
22
+            ->to(__NAMESPACE__.'\ApplicationLogger')
23 23
             ->in(Scope::SINGLETON);
24 24
 
25 25
         // log writer
26 26
         $this
27 27
             ->bind('BEAR\Resource\LogWriterInterface')
28
-            ->toProvider(__NAMESPACE__ . '\ResourceLog\DevWritersProvider')
28
+            ->toProvider(__NAMESPACE__.'\ResourceLog\DevWritersProvider')
29 29
             ->in(Scope::SINGLETON);
30 30
 
31 31
         $this
Please login to merge, or discard this patch.
src/Provide/ApplicationLogger/ResourceLog/Writer/Fire.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function __construct(FirePHP $fire = null)
34 34
     {
35
-        $this->fire = $fire ? : FirePHP::getInstance(true);
35
+        $this->fire = $fire ?: FirePHP::getInstance(true);
36 36
     }
37 37
 
38 38
     /**
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     {
91 91
         $body = $this->normalize($result->body);
92 92
         $isTable = is_array($body) && isset($body[0]) && isset($body[1]) && (array_keys($body[0]) === array_keys($body[1]));
93
-        if (! $isTable) {
93
+        if (!$isTable) {
94 94
             $this->fire->log($body, 'body');
95 95
             return;
96 96
         }
@@ -117,16 +117,16 @@  discard block
 block discarded – undo
117 117
         }
118 118
         array_walk_recursive(
119 119
             $body,
120
-            function (&$value) {
120
+            function(&$value) {
121 121
                 if ($value instanceof RequestInterface) {
122
-                    $value = '(Request) ' . $value->toUri();
122
+                    $value = '(Request) '.$value->toUri();
123 123
                 }
124 124
                 if ($value instanceof ResourceObject) {
125 125
                     /** @var $value ResourceObject */
126
-                    $value = '(ResourceObject) ' . get_class($value) . json_encode($value->body);
126
+                    $value = '(ResourceObject) '.get_class($value).json_encode($value->body);
127 127
                 }
128 128
                 if (is_object($value)) {
129
-                    $value = '(object) ' . get_class($value);
129
+                    $value = '(object) '.get_class($value);
130 130
                 }
131 131
             }
132 132
         );
Please login to merge, or discard this patch.
src/Provide/ApplicationLogger/ResourceLog/Writer/Zf2LogProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $this->zf2Log->addWriter(new Syslog);
38 38
         $dbConfig = [
39 39
             'driver' => 'Pdo_Sqlite',
40
-            'dsn' => 'sqlite:' . $logDir . '/resource.db'
40
+            'dsn' => 'sqlite:'.$logDir.'/resource.db'
41 41
         ];
42 42
         $this->db = new Adapter($dbConfig);
43 43
     }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     {
50 50
         static $zf2Log;
51 51
 
52
-        if (! $zf2Log) {
52
+        if (!$zf2Log) {
53 53
             $this->db->query(
54 54
                 'CREATE TABLE IF NOT EXISTS log(id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, timestamp, message, priority, priorityName, extra_page)',
55 55
                 Adapter::QUERY_MODE_EXECUTE
Please login to merge, or discard this patch.