File tree Expand file tree Collapse file tree 4 files changed +12
-8
lines changed
tests/JsLocalization/Http/Responses Expand file tree Collapse file tree 4 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -48,12 +48,15 @@ public function refreshCache()
48
48
}
49
49
50
50
/**
51
- * @param bool $noCache
51
+ * Returns the config (already JSON encoded).
52
+ * Refreshes the cache if necessary.
53
+ *
54
+ * @param bool $noCache (optional) Defines if cache should be ignored.
52
55
* @return mixed|string string The JSON-encoded config exports.
53
56
*/
54
57
public function getConfigJson ($ noCache = false )
55
58
{
56
- if ($ noCache or $ this ->isDisabled ()) {
59
+ if ($ noCache || $ this ->isDisabled ()) {
57
60
return $ this ->createConfigJson ();
58
61
} else {
59
62
return $ this ->getData ();
Original file line number Diff line number Diff line change @@ -36,9 +36,10 @@ public function __construct()
36
36
}
37
37
38
38
/**
39
- * Returns the messages (already JSON encoded), fresh if wanted .
40
- * Creates the necessary cache item if necessary.
39
+ * Returns the messages (already JSON encoded).
40
+ * Refreshes the cache if necessary.
41
41
*
42
+ * @param bool $noCache (optional) Defines if cache should be ignored.
42
43
* @return string JSON encoded messages object.
43
44
*/
44
45
public function getMessagesJson ($ noCache = false )
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ protected function getOptions()
53
53
*/
54
54
public function handle ()
55
55
{
56
- $ noCache = $ this ->option ('no-cache ' );
56
+ $ noCache = ( bool ) $ this ->option ('no-cache ' );
57
57
if ($ noCache == true ) $ this ->line ('Exporting messages and config... ' );
58
58
else $ this ->line ('Refreshing and exporting the message and config cache... ' );
59
59
Original file line number Diff line number Diff line change 5
5
6
6
class StaticFileResponseTest extends TestCase
7
7
{
8
- protected $ testFilePath , $ testFileContent ;
8
+ protected $ testFilePath ;
9
+ protected $ testFileContent ;
9
10
10
11
public function setUp ()
11
12
{
@@ -34,7 +35,6 @@ public function testExceptionHandling()
34
35
$ filePath = "/tmp/x/y/z/does-not-exist " ;
35
36
$ this ->setExpectedException ('Exception ' , "Cannot read file: $ filePath " );
36
37
37
- $ response = new StaticFileResponse ($ filePath );
38
+ new StaticFileResponse ($ filePath );
38
39
}
39
40
}
40
- ?>
You can’t perform that action at this time.
0 commit comments