Skip to content

Commit

Permalink
Indentation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Dec 13, 2024
1 parent d66b3d4 commit ef7ec8e
Show file tree
Hide file tree
Showing 18 changed files with 47 additions and 47 deletions.
2 changes: 1 addition & 1 deletion test/Mustache/Test/Cache/AbstractCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function testGetSetLogger()

public function testSetLoggerThrowsExceptions()
{
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
$cache = new CacheStub();
$logger = new StdClass();
$cache->setLogger($logger);
Expand Down
2 changes: 1 addition & 1 deletion test/Mustache/Test/CompilerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function getCompileValues()

public function testCompilerThrowsSyntaxException()
{
$this->expectException(Mustache_Exception_SyntaxException::class);
$this->expectException(Mustache_Exception_SyntaxException::class);
$compiler = new Mustache_Compiler();
$compiler->compile('', array(array(Mustache_Tokenizer::TYPE => 'invalid')), 'SomeClass');
}
Expand Down
18 changes: 9 additions & 9 deletions test/Mustache/Test/ContextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public function testAnchoredDotNotation()

public function testAnchoredDotNotationThrowsExceptions()
{
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
$context = new Mustache_Context();
$context->push(array('a' => 1));
$context->findAnchoredDot('a');
Expand Down Expand Up @@ -262,7 +262,7 @@ public function __construct($array)
}
}

#[\ReturnTypeWillChange]
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
Expand All @@ -272,19 +272,19 @@ public function offsetSet($offset, $value)
}
}

#[\ReturnTypeWillChange]
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}

#[\ReturnTypeWillChange]
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}

#[\ReturnTypeWillChange]
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
Expand All @@ -302,13 +302,13 @@ public function foo()
return 'win';
}

#[\ReturnTypeWillChange]
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return true;
}

#[\ReturnTypeWillChange]
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
switch ($offset) {
Expand All @@ -325,13 +325,13 @@ public function offsetGet($offset)
}
}

#[\ReturnTypeWillChange]
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
// nada
}

#[\ReturnTypeWillChange]
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
// nada
Expand Down
12 changes: 6 additions & 6 deletions test/Mustache/Test/EngineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function testWithoutLambdaCache()

public function testEmptyTemplatePrefixThrowsException()
{
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
new Mustache_Engine(array(
'template_class_prefix' => '',
));
Expand All @@ -171,7 +171,7 @@ public function testEmptyTemplatePrefixThrowsException()
*/
public function testNonCallableEscapeThrowsException($escape)
{
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
new Mustache_Engine(array('escape' => $escape));
}

Expand All @@ -185,7 +185,7 @@ public function getBadEscapers()

public function testImmutablePartialsLoadersThrowException()
{
$this->expectException(Mustache_Exception_RuntimeException::class);
$this->expectException(Mustache_Exception_RuntimeException::class);
$mustache = new Mustache_Engine(array(
'partials_loader' => new Mustache_Loader_StringLoader(),
));
Expand Down Expand Up @@ -248,14 +248,14 @@ public static function wrapWithUnderscores($text)

public function testSetHelpersThrowsExceptions()
{
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
$mustache = new Mustache_Engine();
$mustache->setHelpers('monkeymonkeymonkey');
}

public function testSetLoggerThrowsExceptions()
{
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
$mustache = new Mustache_Engine();
$mustache->setLogger(new StdClass());
}
Expand Down Expand Up @@ -325,7 +325,7 @@ public function testVerboseLoggingIsVerbose()

public function testUnknownPragmaThrowsException()
{
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
new Mustache_Engine(array(
'pragmas' => array('UNKNOWN'),
));
Expand Down
2 changes: 1 addition & 1 deletion test/Mustache/Test/FiveThree/Functional/FiltersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function interpolateFirstData()
*/
public function testThrowsExceptionForBrokenPipes($tpl, $data)
{
$this->expectException(Mustache_Exception_UnknownFilterException::class);
$this->expectException(Mustache_Exception_UnknownFilterException::class);
$this->mustache->render($tpl, $data);
}

Expand Down
4 changes: 2 additions & 2 deletions test/Mustache/Test/Functional/DynamicPartialsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public function getDynamicNameParseErrors()
*/
public function testDynamicNameParseErrors($template)
{
$this->expectException(Mustache_Exception_SyntaxException::class);
$this->expectExceptionMessage('Nesting error:');
$this->expectException(Mustache_Exception_SyntaxException::class);
$this->expectExceptionMessage('Nesting error:');
$this->mustache->render($template);
}

Expand Down
14 changes: 7 additions & 7 deletions test/Mustache/Test/Functional/HigherOrderSectionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ public function testMonsters()
public function testPassthroughOptimization()
{
$mustache = $this->getMockBuilder('Mustache_Engine');
if (method_exists($mustache, 'onlyMethods')) {
$mustache->onlyMethods(array('loadLambda'));
} else {
$mustache->setMethods(array('loadLambda'));
}
if (method_exists($mustache, 'onlyMethods')) {
$mustache->onlyMethods(array('loadLambda'));
} else {
$mustache->setMethods(array('loadLambda'));
}
$mustache = $mustache->getMock();

$mustache->expects($this->never())
Expand All @@ -98,9 +98,9 @@ public function testWithoutPassthroughOptimization()
{
$mustache = $this->getMockBuilder('Mustache_Engine');
if (method_exists($mustache, 'onlyMethods')) {
$mustache->onlyMethods(array('loadLambda'));
$mustache->onlyMethods(array('loadLambda'));
} else {
$mustache->setMethods(array('loadLambda'));
$mustache->setMethods(array('loadLambda'));
}
$mustache = $mustache->getMock();

Expand Down
4 changes: 2 additions & 2 deletions test/Mustache/Test/Functional/InheritanceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,8 @@ public function testInheritanceWithLazyEvaluationAndSections()
*/
public function testIllegalInheritanceExamples($partials, $data, $template)
{
$this->expectException(Mustache_Exception_SyntaxException::class);
$this->expectExceptionMessage('Illegal content in < parent tag');
$this->expectException(Mustache_Exception_SyntaxException::class);
$this->expectExceptionMessage('Illegal content in < parent tag');
$this->mustache->setPartials($partials);
$tpl = $this->mustache->loadTemplate($template);
$tpl->render($data);
Expand Down
2 changes: 1 addition & 1 deletion test/Mustache/Test/HelperCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function testMagicMethods()
public function testHelperCollectionIsntAfraidToThrowExceptions($helpers = array(), $actions = array(), $exception = null)
{
if ($exception) {
$this->expectException($exception);
$this->expectException($exception);
}

$helpers = new Mustache_HelperCollection($helpers);
Expand Down
2 changes: 1 addition & 1 deletion test/Mustache/Test/Loader/ArrayLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function testSetAndLoadTemplates()

public function testMissingTemplatesThrowExceptions()
{
$this->expectException(Mustache_Exception_UnknownTemplateException::class);
$this->expectException(Mustache_Exception_UnknownTemplateException::class);
$loader = new Mustache_Loader_ArrayLoader();
$loader->load('not_a_real_template');
}
Expand Down
2 changes: 1 addition & 1 deletion test/Mustache/Test/Loader/CascadingLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function testLoadTemplates()

public function testMissingTemplatesThrowExceptions()
{
$this->expectException(Mustache_Exception_UnknownTemplateException::class);
$this->expectException(Mustache_Exception_UnknownTemplateException::class);
$loader = new Mustache_Loader_CascadingLoader(array(
new Mustache_Loader_ArrayLoader(array('foo' => '{{ foo }}')),
new Mustache_Loader_ArrayLoader(array('bar' => '{{#bar}}BAR{{/bar}}')),
Expand Down
4 changes: 2 additions & 2 deletions test/Mustache/Test/Loader/FilesystemLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ public function testEmptyExtensionString()

public function testMissingBaseDirThrowsException()
{
$this->expectException(Mustache_Exception_RuntimeException::class);
$this->expectException(Mustache_Exception_RuntimeException::class);
new Mustache_Loader_FilesystemLoader(dirname(__FILE__) . '/not_a_directory');
}

public function testMissingTemplateThrowsException()
{
$this->expectException(Mustache_Exception_UnknownTemplateException::class);
$this->expectException(Mustache_Exception_UnknownTemplateException::class);
$baseDir = realpath(dirname(__FILE__) . '/../../../fixtures/templates');
$loader = new Mustache_Loader_FilesystemLoader($baseDir);

Expand Down
6 changes: 3 additions & 3 deletions test/Mustache/Test/Loader/InlineLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ public function testLoadTemplates()

public function testMissingTemplatesThrowExceptions()
{
$this->expectException(Mustache_Exception_UnknownTemplateException::class);
$this->expectException(Mustache_Exception_UnknownTemplateException::class);
$loader = new Mustache_Loader_InlineLoader(__FILE__, __COMPILER_HALT_OFFSET__);
$loader->load('not_a_real_template');
}

public function testInvalidOffsetThrowsException()
{
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
new Mustache_Loader_InlineLoader(__FILE__, 'notanumber');
}

public function testInvalidFileThrowsException()
{
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
new Mustache_Loader_InlineLoader('notarealfile', __COMPILER_HALT_OFFSET__);
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/Mustache/Test/Loader/ProductionFilesystemLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ public function testEmptyExtensionString()

public function testMissingBaseDirThrowsException()
{
$this->expectException(Mustache_Exception_RuntimeException::class);
$this->expectException(Mustache_Exception_RuntimeException::class);
new Mustache_Loader_ProductionFilesystemLoader(dirname(__FILE__) . '/not_a_directory');
}

public function testMissingTemplateThrowsException()
{
$this->expectException(Mustache_Exception_UnknownTemplateException::class);
$this->expectException(Mustache_Exception_UnknownTemplateException::class);
$baseDir = realpath(dirname(__FILE__) . '/../../../fixtures/templates');
$loader = new Mustache_Loader_ProductionFilesystemLoader($baseDir);

Expand Down
6 changes: 3 additions & 3 deletions test/Mustache/Test/Logger/StreamLoggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function acceptsStreamData()

public function testPrematurelyClosedStreamThrowsException()
{
$this->expectException(Mustache_Exception_LogicException::class);
$this->expectException(Mustache_Exception_LogicException::class);
$stream = tmpfile();
$logger = new Mustache_Logger_StreamLogger($stream);
fclose($stream);
Expand Down Expand Up @@ -189,14 +189,14 @@ public function testChangeLoggingLevels()

public function testThrowsInvalidArgumentExceptionWhenSettingUnknownLevels()
{
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
$logger = new Mustache_Logger_StreamLogger(tmpfile());
$logger->setLevel('bacon');
}

public function testThrowsInvalidArgumentExceptionWhenLoggingUnknownLevels()
{
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
$this->expectException(Mustache_Exception_InvalidArgumentException::class);
$logger = new Mustache_Logger_StreamLogger(tmpfile());
$logger->log('bacon', 'CODE BACON ERROR!');
}
Expand Down
2 changes: 1 addition & 1 deletion test/Mustache/Test/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public function getInheritanceTokenSets()
*/
public function testParserThrowsExceptions($tokens)
{
$this->expectException(Mustache_Exception_SyntaxException::class);
$this->expectException(Mustache_Exception_SyntaxException::class);
$parser = new Mustache_Parser();
$parser->parse($tokens);
}
Expand Down
2 changes: 1 addition & 1 deletion test/Mustache/Test/Source/FilesystemSourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Mustache_Test_Source_FilesystemSourceTest extends Yoast\PHPUnitPolyfills\T
{
public function testMissingTemplateThrowsException()
{
$this->expectException(Mustache_Exception_RuntimeException::class);
$this->expectException(Mustache_Exception_RuntimeException::class);
$source = new Mustache_Source_FilesystemSource(dirname(__FILE__) . '/not_a_file.mustache', array('mtime'));
$source->getKey();
}
Expand Down
6 changes: 3 additions & 3 deletions test/Mustache/Test/TokenizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function testScan($text, $delimiters, $expected)

public function testUnevenBracesThrowExceptions()
{
$this->expectException(Mustache_Exception_SyntaxException::class);
$this->expectException(Mustache_Exception_SyntaxException::class);
$tokenizer = new Mustache_Tokenizer();

$text = '{{{ name }}';
Expand All @@ -34,7 +34,7 @@ public function testUnevenBracesThrowExceptions()

public function testUnevenBracesWithCustomDelimiterThrowExceptions()
{
$this->expectException(Mustache_Exception_SyntaxException::class);
$this->expectException(Mustache_Exception_SyntaxException::class);
$tokenizer = new Mustache_Tokenizer();

$text = '<%{ name %>';
Expand Down Expand Up @@ -353,7 +353,7 @@ public function getTokens()
*/
public function testUnclosedTagsThrowExceptions($text)
{
$this->expectException(Mustache_Exception_SyntaxException::class);
$this->expectException(Mustache_Exception_SyntaxException::class);
$tokenizer = new Mustache_Tokenizer();
$tokenizer->scan($text, null);
}
Expand Down

0 comments on commit ef7ec8e

Please sign in to comment.