This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends 'base.html.twig' %} | |
{% block stylesheets %} | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.css"> | |
{% endblock %} | |
{% block body %} | |
<div class="container"> | |
<div class="col-md-12"> | |
<div class="col-md-6"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
class SomaTest extends \PHPUnit_Framework_TestCase | |
{ | |
public function testSeASomaFuncionaCorretamente() | |
{ | |
$soma = new Soma(); | |
$result = $soma->fazSoma(15, 15); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<phpunit backupGlobals="false" | |
backupStaticAttributes="false" | |
bootstrap="./bootstrap.php" | |
cacheTokens="true" | |
colors="true" | |
convertErrorsToExceptions="true" | |
convertNoticesToExceptions="false" | |
convertWarningsToExceptions="true" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('DS', DIRECTORY_SEPARATOR); | |
require __DIR__ . DS . 'vendor' . DS . 'autoload.php'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
class Soma | |
{ | |
public function fazSoma($num1, $num2): int | |
{ | |
return 30; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
class Soma | |
{ | |
public function fazSoma(int $num1, int $num2): int | |
{ | |
return $num1 + $num2; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$a = 10; | |
if($a == 10) { | |
print 'A variável $a é igual a ' . $a; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$a = 15; | |
if($a == 10) { | |
print 'A variável $a é igual a 10'; | |
} else { | |
print 'A variável $a não é igual a 10'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$a = 15; | |
if($a == 10) { | |
print 'A variável $a é igual a 10'; | |
else if($a == 15) { | |
print 'A variável $a é igual a 15'; | |
} else { | |
print 'Nenhum valor encontrado...'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$a = 15; | |
switch($a) { | |
case 10: | |
print 'A variável $a é igual a 10'; | |
break; | |
case 15: | |
print 'A variável $a é igual a 15'; | |
break; |