@@ -9,27 +9,27 @@ |
||
| 9 | 9 | use Net\Bazzline\Component\Requirement\AndCondition; |
| 10 | 10 | use Net\Bazzline\Component\Requirement\Requirement; |
| 11 | 11 | |
| 12 | -require __DIR__ . '/../../../../vendor/autoload.php'; |
|
| 12 | +require __DIR__.'/../../../../vendor/autoload.php'; |
|
| 13 | 13 | |
| 14 | 14 | $requirement = new Requirement(); |
| 15 | 15 | $willFailItem = new WillFailItem(); |
| 16 | 16 | $andCondition = new AndCondition(); |
| 17 | 17 | |
| 18 | -echo str_repeat('-', 40) . PHP_EOL; |
|
| 18 | +echo str_repeat('-', 40).PHP_EOL; |
|
| 19 | 19 | |
| 20 | 20 | $andCondition->addItem($willFailItem); |
| 21 | 21 | |
| 22 | -echo 'Added "will fail" item to and condition.' . PHP_EOL; |
|
| 22 | +echo 'Added "will fail" item to and condition.'.PHP_EOL; |
|
| 23 | 23 | |
| 24 | 24 | $requirement->addCondition($andCondition); |
| 25 | 25 | |
| 26 | -echo 'Added and condition to requirement.' . PHP_EOL; |
|
| 27 | -echo str_repeat('-', 40) . PHP_EOL; |
|
| 28 | -echo 'Return of requirement "isMet" call "' . var_export($requirement->isMet(), true) . '".' . PHP_EOL; |
|
| 29 | -echo str_repeat('-', 40) . PHP_EOL; |
|
| 26 | +echo 'Added and condition to requirement.'.PHP_EOL; |
|
| 27 | +echo str_repeat('-', 40).PHP_EOL; |
|
| 28 | +echo 'Return of requirement "isMet" call "'.var_export($requirement->isMet(), true).'".'.PHP_EOL; |
|
| 29 | +echo str_repeat('-', 40).PHP_EOL; |
|
| 30 | 30 | |
| 31 | 31 | $requirement->disable(); |
| 32 | 32 | |
| 33 | -echo 'Requested disabled for requirement.' . PHP_EOL; |
|
| 34 | -echo 'Return of requirement "isMet" call "' . var_export($requirement->isMet(), true) . '".' . PHP_EOL; |
|
| 35 | -echo str_repeat('-', 40) . PHP_EOL; |
|
| 33 | +echo 'Requested disabled for requirement.'.PHP_EOL; |
|
| 34 | +echo 'Return of requirement "isMet" call "'.var_export($requirement->isMet(), true).'".'.PHP_EOL; |
|
| 35 | +echo str_repeat('-', 40).PHP_EOL; |
|
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | |
| 7 | 7 | namespace Example\Validator; |
| 8 | 8 | |
| 9 | -require __DIR__ . '/../../../../vendor/autoload.php'; |
|
| 9 | +require __DIR__.'/../../../../vendor/autoload.php'; |
|
| 10 | 10 | |
| 11 | 11 | Example::create() |
| 12 | 12 | ->setup() |
@@ -87,17 +87,17 @@ discard block |
||
| 87 | 87 | */ |
| 88 | 88 | public function andRun() |
| 89 | 89 | { |
| 90 | - echo str_repeat('-', 48) . PHP_EOL; |
|
| 91 | - echo 'Number of tables: ' . count($this->tables) . PHP_EOL; |
|
| 92 | - echo str_repeat('-', 48) . PHP_EOL; |
|
| 93 | - echo 'Iterating over tables.' . PHP_EOL; |
|
| 90 | + echo str_repeat('-', 48).PHP_EOL; |
|
| 91 | + echo 'Number of tables: '.count($this->tables).PHP_EOL; |
|
| 92 | + echo str_repeat('-', 48).PHP_EOL; |
|
| 93 | + echo 'Iterating over tables.'.PHP_EOL; |
|
| 94 | 94 | foreach ($this->tables as $table) { |
| 95 | 95 | /** |
| 96 | 96 | * @var Table $table |
| 97 | 97 | */ |
| 98 | 98 | $this->validator->setTable($table); |
| 99 | - echo 'Is valid table: ' . ($this->validator->isMet() ? 'yes' : 'no') . PHP_EOL; |
|
| 99 | + echo 'Is valid table: '.($this->validator->isMet() ? 'yes' : 'no').PHP_EOL; |
|
| 100 | 100 | } |
| 101 | - echo str_repeat('-', 48) . PHP_EOL; |
|
| 101 | + echo str_repeat('-', 48).PHP_EOL; |
|
| 102 | 102 | } |
| 103 | 103 | } |
| 104 | 104 | \ No newline at end of file |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | |
| 7 | 7 | namespace Example\Table; |
| 8 | 8 | |
| 9 | -require __DIR__ . '/../../../../vendor/autoload.php'; |
|
| 9 | +require __DIR__.'/../../../../vendor/autoload.php'; |
|
| 10 | 10 | |
| 11 | 11 | $tables = array( |
| 12 | 12 | new Table('black', 'heatable', '40cm', 'BSD daemon'), |
@@ -16,9 +16,9 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | $requirement = new IsAGoodTableRequirement(); |
| 18 | 18 | |
| 19 | -echo '----------------------------' . PHP_EOL; |
|
| 20 | -echo '| using the "isMet" method |' . PHP_EOL; |
|
| 21 | -echo '----------------------------' . PHP_EOL; |
|
| 19 | +echo '----------------------------'.PHP_EOL; |
|
| 20 | +echo '| using the "isMet" method |'.PHP_EOL; |
|
| 21 | +echo '----------------------------'.PHP_EOL; |
|
| 22 | 22 | /** @var Table[] $tables */ |
| 23 | 23 | foreach ($tables as $table) { |
| 24 | 24 | $requirement->setColor($table->getColor()); |
@@ -28,20 +28,20 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | $isMet = $requirement->isMet(); |
| 30 | 30 | |
| 31 | - echo 'Requirement "' . get_class($requirement) . |
|
| 32 | - '" is ' . (($isMet == true) ? 'met' : 'not met') . ' for table: ' . PHP_EOL . |
|
| 33 | - var_export($table, true) . PHP_EOL; |
|
| 31 | + echo 'Requirement "'.get_class($requirement). |
|
| 32 | + '" is '.(($isMet == true) ? 'met' : 'not met').' for table: '.PHP_EOL. |
|
| 33 | + var_export($table, true).PHP_EOL; |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | echo PHP_EOL; |
| 37 | -echo '-------------------------------------' . PHP_EOL; |
|
| 38 | -echo '| using the requirement as function |' . PHP_EOL; |
|
| 39 | -echo '-------------------------------------' . PHP_EOL; |
|
| 37 | +echo '-------------------------------------'.PHP_EOL; |
|
| 38 | +echo '| using the requirement as function |'.PHP_EOL; |
|
| 39 | +echo '-------------------------------------'.PHP_EOL; |
|
| 40 | 40 | /** @var Table[] $tables */ |
| 41 | 41 | foreach ($tables as $table) { |
| 42 | 42 | $isMet = $requirement($table->getColor(), $table->getDeveloper(), $table->getFeature(), $table->getHeight()); |
| 43 | 43 | |
| 44 | - echo 'Requirement "' . get_class($requirement) . |
|
| 45 | - '" is ' . (($isMet == true) ? 'met' : 'not met') . ' for table: ' . PHP_EOL . |
|
| 46 | - var_export($table, true) . PHP_EOL; |
|
| 44 | + echo 'Requirement "'.get_class($requirement). |
|
| 45 | + '" is '.(($isMet == true) ? 'met' : 'not met').' for table: '.PHP_EOL. |
|
| 46 | + var_export($table, true).PHP_EOL; |
|
| 47 | 47 | } |
| 48 | 48 | \ No newline at end of file |
@@ -9,27 +9,27 @@ |
||
| 9 | 9 | use Net\Bazzline\Component\Requirement\AndCondition; |
| 10 | 10 | use Net\Bazzline\Component\Requirement\Requirement; |
| 11 | 11 | |
| 12 | -require __DIR__ . '/../../../../vendor/autoload.php'; |
|
| 12 | +require __DIR__.'/../../../../vendor/autoload.php'; |
|
| 13 | 13 | |
| 14 | 14 | $requirement = new Requirement(); |
| 15 | 15 | $willFailItem = new WillFailItem(); |
| 16 | 16 | $andCondition = new AndCondition(); |
| 17 | 17 | |
| 18 | -echo str_repeat('-', 40) . PHP_EOL; |
|
| 18 | +echo str_repeat('-', 40).PHP_EOL; |
|
| 19 | 19 | |
| 20 | 20 | $andCondition->addItem($willFailItem); |
| 21 | 21 | |
| 22 | -echo 'Added "will fail" item to and condition.' . PHP_EOL; |
|
| 22 | +echo 'Added "will fail" item to and condition.'.PHP_EOL; |
|
| 23 | 23 | |
| 24 | 24 | $requirement->addCondition($andCondition); |
| 25 | 25 | |
| 26 | -echo 'Added and condition to requirement.' . PHP_EOL; |
|
| 27 | -echo str_repeat('-', 40) . PHP_EOL; |
|
| 28 | -echo 'Return of requirement "isMet" call "' . var_export($requirement->isMet(), true) . '".' . PHP_EOL; |
|
| 29 | -echo str_repeat('-', 40) . PHP_EOL; |
|
| 26 | +echo 'Added and condition to requirement.'.PHP_EOL; |
|
| 27 | +echo str_repeat('-', 40).PHP_EOL; |
|
| 28 | +echo 'Return of requirement "isMet" call "'.var_export($requirement->isMet(), true).'".'.PHP_EOL; |
|
| 29 | +echo str_repeat('-', 40).PHP_EOL; |
|
| 30 | 30 | |
| 31 | 31 | $willFailItem->disable(); |
| 32 | 32 | |
| 33 | -echo 'Requested disable for item.' . PHP_EOL; |
|
| 34 | -echo 'Return of requirement "isMet" call "' . var_export($requirement->isMet(), true) . '".' . PHP_EOL; |
|
| 35 | -echo str_repeat('-', 40) . PHP_EOL; |
|
| 33 | +echo 'Requested disable for item.'.PHP_EOL; |
|
| 34 | +echo 'Return of requirement "isMet" call "'.var_export($requirement->isMet(), true).'".'.PHP_EOL; |
|
| 35 | +echo str_repeat('-', 40).PHP_EOL; |
|
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | use Net\Bazzline\Component\Requirement\OrCondition; |
| 11 | 11 | use Net\Bazzline\Component\Requirement\Requirement; |
| 12 | 12 | |
| 13 | -require __DIR__ . '/../../../../vendor/autoload.php'; |
|
| 13 | +require __DIR__.'/../../../../vendor/autoload.php'; |
|
| 14 | 14 | |
| 15 | 15 | /* |
| 16 | 16 | * Example with two items wrapped in an OR-condition |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | if ($requirement->isMet()) { |
| 30 | 30 | printf('Current weekday "%s" meets the requirement ("Mon" or "Tue")', $weekday); |
| 31 | 31 | } else { |
| 32 | - printf('Current weekday "%s" does not meet the requirement ("Mon" or "Tue")', $weekday) . PHP_EOL; |
|
| 32 | + printf('Current weekday "%s" does not meet the requirement ("Mon" or "Tue")', $weekday).PHP_EOL; |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | print PHP_EOL; |
@@ -9,27 +9,27 @@ |
||
| 9 | 9 | use Net\Bazzline\Component\Requirement\AndCondition; |
| 10 | 10 | use Net\Bazzline\Component\Requirement\Requirement; |
| 11 | 11 | |
| 12 | -require __DIR__ . '/../../../../vendor/autoload.php'; |
|
| 12 | +require __DIR__.'/../../../../vendor/autoload.php'; |
|
| 13 | 13 | |
| 14 | 14 | $requirement = new Requirement(); |
| 15 | 15 | $willFailItem = new WillFailItem(); |
| 16 | 16 | $andCondition = new AndCondition(); |
| 17 | 17 | |
| 18 | -echo str_repeat('-', 40) . PHP_EOL; |
|
| 18 | +echo str_repeat('-', 40).PHP_EOL; |
|
| 19 | 19 | |
| 20 | 20 | $andCondition->addItem($willFailItem); |
| 21 | 21 | |
| 22 | -echo 'Added "will fail" item to and condition.' . PHP_EOL; |
|
| 22 | +echo 'Added "will fail" item to and condition.'.PHP_EOL; |
|
| 23 | 23 | |
| 24 | 24 | $requirement->addCondition($andCondition); |
| 25 | 25 | |
| 26 | -echo 'Added and condition to requirement.' . PHP_EOL; |
|
| 27 | -echo str_repeat('-', 40) . PHP_EOL; |
|
| 28 | -echo 'Return of requirement "isMet" call "' . var_export($requirement->isMet(), true) . '".' . PHP_EOL; |
|
| 29 | -echo str_repeat('-', 40) . PHP_EOL; |
|
| 26 | +echo 'Added and condition to requirement.'.PHP_EOL; |
|
| 27 | +echo str_repeat('-', 40).PHP_EOL; |
|
| 28 | +echo 'Return of requirement "isMet" call "'.var_export($requirement->isMet(), true).'".'.PHP_EOL; |
|
| 29 | +echo str_repeat('-', 40).PHP_EOL; |
|
| 30 | 30 | |
| 31 | 31 | $andCondition->disable(); |
| 32 | 32 | |
| 33 | -echo 'Requested disable for condition.' . PHP_EOL; |
|
| 34 | -echo 'Return of requirement "isMet" call "' . var_export($requirement->isMet(), true) . '".' . PHP_EOL; |
|
| 35 | -echo str_repeat('-', 40) . PHP_EOL; |
|
| 33 | +echo 'Requested disable for condition.'.PHP_EOL; |
|
| 34 | +echo 'Return of requirement "isMet" call "'.var_export($requirement->isMet(), true).'".'.PHP_EOL; |
|
| 35 | +echo str_repeat('-', 40).PHP_EOL; |
|
@@ -15,13 +15,13 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | if ($isSupportedClassnameByNamespace) { |
| 17 | 17 | $classNameWithRemovedNamespace = str_replace($namespace, '', $className); |
| 18 | - $fileName = str_replace('\\', DIRECTORY_SEPARATOR, $classNameWithRemovedNamespace) . '.php'; |
|
| 18 | + $fileName = str_replace('\\', DIRECTORY_SEPARATOR, $classNameWithRemovedNamespace).'.php'; |
|
| 19 | 19 | $includePaths = array( |
| 20 | - realpath(__DIR__ . DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR |
|
| 20 | + realpath(__DIR__.DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR |
|
| 21 | 21 | ); |
| 22 | 22 | |
| 23 | 23 | foreach ($includePaths as $includePath) { |
| 24 | - $filePath = realpath($includePath . DIRECTORY_SEPARATOR . $fileName); |
|
| 24 | + $filePath = realpath($includePath.DIRECTORY_SEPARATOR.$fileName); |
|
| 25 | 25 | |
| 26 | 26 | if (file_exists($filePath)) { |
| 27 | 27 | require $filePath; |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | 'includedPath' => $includePath |
| 37 | 37 | ), |
| 38 | 38 | true |
| 39 | - ) . PHP_EOL; |
|
| 39 | + ).PHP_EOL; |
|
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | } else { |