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 | |
class TimeValidator | |
{ | |
public function isValid($time_specification) | |
{ | |
return 1 == preg_match($this->buildRegExp(), $time_specification); | |
} | |
private function buildRegExp() |
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
class Book { | |
private String title; | |
private String author; | |
private int price; | |
public String getTitle() { | |
return title; | |
} | |
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
class Book { | |
public String title; | |
public String author; | |
public int price; | |
} |
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
class BookConsumer { | |
public void printTheTitleOfABook(Book book) { | |
if(!book.getTitle().isEmpty()) { | |
System.out.println(book.getTitle()); | |
} | |
} | |
} |
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
class Book { | |
private String title; | |
private String author; | |
private int price; | |
public Book(String title, String author, int price) { | |
this.title = title; | |
this.author = author; | |
this.price = price; |
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
public class GreetPrinter { | |
public void static main(String[] args) { | |
User user = new User(); | |
if (args.length > 1) { | |
user.setEmail(args[0]); | |
} | |
Greeter greeter = new Greeter(); | |
String msg = greeter.greetMessage(user); | |
if (msg != null) { | |
System.out.println(msg); |
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
public class GreetPrinter { | |
public void static main(String[] args) { | |
if (args.length < 1) { | |
throw new RuntimeException("No email"); | |
} | |
User user = new User(args[0]); | |
Greeter greeter = new Greeter(); | |
System.out.println(greeter.greetMessage(user)); | |
} |
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 | |
class DemoClass | |
{ | |
public function someMethod() | |
{ | |
$val1 = SomeClass1::staticMethod1(); | |
$val2 = SomeClass2::staticMethod2(); | |
} | |
public function process() |
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
public class SuperfluousAccessors { | |
public boolean anUnderstandablyLongVariableNameForAnOddUsecase; | |
} |
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
*.* | |
!README | |
!*.feature | |
!*.gitignore |
OlderNewer