File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 4343}
4444
4545// in case of error it throws Nette\Schema\ValidationException
46- 
4746``` 
4847
4948Defining schema
@@ -229,7 +228,7 @@ Regular expressions
229228String can be restricted by regular expression using the ` pattern() ` :
230229
231230``` php 
232- // just 9 numbers 
231+ // just 9 digits 
233232$schema = Expect::string()->pattern('\d{9}');
234233``` 
235234
@@ -239,7 +238,8 @@ Data mapping to objects
239238Schema can be generated from class:
240239
241240``` php 
242- class Config {
241+ class Config
242+ {
243243	/** @var string */
244244	public $dsn;
245245
@@ -272,7 +272,8 @@ You can even use PHP 7.4 notation:
272272
273273
274274``` php 
275- class Config {
275+ class Config
276+ {
276277	public string $dsn;
277278	public ?string $user;
278279	public ?string $password;
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments