Composer update

master
Peter Babič 8 years ago
parent 6e987c5a69
commit d76f5f230b
Signed by: peter.babic
GPG Key ID: 4BB075BC1884BA40
  1. 27
      .idea/coffeetable.iml
  2. 9
      .idea/inspectionProfiles/Project_Default.xml
  3. 7
      .idea/inspectionProfiles/profiles_settings.xml
  4. 266
      .idea/workspace.xml
  5. 3
      composer.json
  6. 274
      composer.lock
  7. 272
      src/Coffee/Map.php
  8. 368
      src/Coffee/Position.php
  9. 76
      src/Coffee/Spot.php
  10. 98
      src/Coffee/Table.php
  11. 137
      src/Coffee/Tile.php
  12. 226
      tests/Coffee/MapTest.php
  13. 28
      tests/Coffee/PositionTest.php
  14. 10
      tests/Coffee/SpotTest.php
  15. 51
      tests/Coffee/TableTest.php
  16. 40
      tests/Coffee/TileTest.php

@ -3,10 +3,14 @@
<component name="NewModuleRootManager"> <component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/vendor" />
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" /> <excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/instantiator" /> <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/instantiator" />
<excludeFolder url="file://$MODULE_DIR$/vendor/myclabs/deep-copy" /> <excludeFolder url="file://$MODULE_DIR$/vendor/myclabs/deep-copy" />
<excludeFolder url="file://$MODULE_DIR$/vendor/pdepend/pdepend" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-docblock" /> <excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-docblock" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpmd/phpmd" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpspec/prophecy" /> <excludeFolder url="file://$MODULE_DIR$/vendor/phpspec/prophecy" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-code-coverage" /> <excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-code-coverage" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-file-iterator" /> <excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-file-iterator" />
@ -24,6 +28,9 @@
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/recursion-context" /> <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/recursion-context" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/resource-operations" /> <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/resource-operations" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/version" /> <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/version" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/config" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/dependency-injection" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/filesystem" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/yaml" /> <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/yaml" />
</content> </content>
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
@ -34,7 +41,9 @@
<root url="file://$MODULE_DIR$/vendor/composer" /> <root url="file://$MODULE_DIR$/vendor/composer" />
<root url="file://$MODULE_DIR$/vendor/doctrine/instantiator" /> <root url="file://$MODULE_DIR$/vendor/doctrine/instantiator" />
<root url="file://$MODULE_DIR$/vendor/myclabs/deep-copy" /> <root url="file://$MODULE_DIR$/vendor/myclabs/deep-copy" />
<root url="file://$MODULE_DIR$/vendor/pdepend/pdepend" />
<root url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-docblock" /> <root url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-docblock" />
<root url="file://$MODULE_DIR$/vendor/phpmd/phpmd" />
<root url="file://$MODULE_DIR$/vendor/phpspec/prophecy" /> <root url="file://$MODULE_DIR$/vendor/phpspec/prophecy" />
<root url="file://$MODULE_DIR$/vendor/phpunit/php-code-coverage" /> <root url="file://$MODULE_DIR$/vendor/phpunit/php-code-coverage" />
<root url="file://$MODULE_DIR$/vendor/phpunit/php-file-iterator" /> <root url="file://$MODULE_DIR$/vendor/phpunit/php-file-iterator" />
@ -52,13 +61,18 @@
<root url="file://$MODULE_DIR$/vendor/sebastian/recursion-context" /> <root url="file://$MODULE_DIR$/vendor/sebastian/recursion-context" />
<root url="file://$MODULE_DIR$/vendor/sebastian/resource-operations" /> <root url="file://$MODULE_DIR$/vendor/sebastian/resource-operations" />
<root url="file://$MODULE_DIR$/vendor/sebastian/version" /> <root url="file://$MODULE_DIR$/vendor/sebastian/version" />
<root url="file://$MODULE_DIR$/vendor/symfony/config" />
<root url="file://$MODULE_DIR$/vendor/symfony/dependency-injection" />
<root url="file://$MODULE_DIR$/vendor/symfony/filesystem" />
<root url="file://$MODULE_DIR$/vendor/symfony/yaml" /> <root url="file://$MODULE_DIR$/vendor/symfony/yaml" />
</CLASSES> </CLASSES>
<SOURCES> <SOURCES>
<root url="file://$MODULE_DIR$/vendor/composer" /> <root url="file://$MODULE_DIR$/vendor/composer" />
<root url="file://$MODULE_DIR$/vendor/doctrine/instantiator" /> <root url="file://$MODULE_DIR$/vendor/doctrine/instantiator" />
<root url="file://$MODULE_DIR$/vendor/myclabs/deep-copy" /> <root url="file://$MODULE_DIR$/vendor/myclabs/deep-copy" />
<root url="file://$MODULE_DIR$/vendor/pdepend/pdepend" />
<root url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-docblock" /> <root url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-docblock" />
<root url="file://$MODULE_DIR$/vendor/phpmd/phpmd" />
<root url="file://$MODULE_DIR$/vendor/phpspec/prophecy" /> <root url="file://$MODULE_DIR$/vendor/phpspec/prophecy" />
<root url="file://$MODULE_DIR$/vendor/phpunit/php-code-coverage" /> <root url="file://$MODULE_DIR$/vendor/phpunit/php-code-coverage" />
<root url="file://$MODULE_DIR$/vendor/phpunit/php-file-iterator" /> <root url="file://$MODULE_DIR$/vendor/phpunit/php-file-iterator" />
@ -76,9 +90,22 @@
<root url="file://$MODULE_DIR$/vendor/sebastian/recursion-context" /> <root url="file://$MODULE_DIR$/vendor/sebastian/recursion-context" />
<root url="file://$MODULE_DIR$/vendor/sebastian/resource-operations" /> <root url="file://$MODULE_DIR$/vendor/sebastian/resource-operations" />
<root url="file://$MODULE_DIR$/vendor/sebastian/version" /> <root url="file://$MODULE_DIR$/vendor/sebastian/version" />
<root url="file://$MODULE_DIR$/vendor/symfony/config" />
<root url="file://$MODULE_DIR$/vendor/symfony/dependency-injection" />
<root url="file://$MODULE_DIR$/vendor/symfony/filesystem" />
<root url="file://$MODULE_DIR$/vendor/symfony/yaml" /> <root url="file://$MODULE_DIR$/vendor/symfony/yaml" />
</SOURCES> </SOURCES>
</library> </library>
</orderEntry> </orderEntry>
<orderEntry type="module-library">
<library name="PHARS">
<CLASSES>
<root url="phar://$MODULE_DIR$/vendor/symfony/dependency-injection/Tests/Fixtures/includes/ProjectWithXsdExtensionInPhar.phar/" />
</CLASSES>
<SOURCES>
<root url="phar://$MODULE_DIR$/vendor/symfony/dependency-injection/Tests/Fixtures/includes/ProjectWithXsdExtensionInPhar.phar/" />
</SOURCES>
</library>
</orderEntry>
</component> </component>
</module> </module>

@ -0,0 +1,9 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<option name="myLocal" value="true" />
<inspection_tool class="MessDetectorValidationInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false">
<option name="UNUSEDCODE" value="true" />
</inspection_tool>
</profile>
</component>

@ -0,0 +1,7 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" value="Project Default" />
<option name="USE_PROJECT_PROFILE" value="true" />
<version value="1.0" />
</settings>
</component>

@ -4,8 +4,23 @@
<option name="ANALYZE_TEST_SOURCES" value="false" /> <option name="ANALYZE_TEST_SOURCES" value="false" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="65f95bb6-3a86-4ed6-841e-441936291ad4" name="Default" comment="BLA BLA BLA"> <list default="true" id="65f95bb6-3a86-4ed6-841e-441936291ad4" name="Default" comment="Rework Table constructor">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/profiles_settings.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/coffeetable.iml" afterPath="$PROJECT_DIR$/.idea/coffeetable.iml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/composer.json" afterPath="$PROJECT_DIR$/composer.json" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/composer.lock" afterPath="$PROJECT_DIR$/composer.lock" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Coffee/Map.php" afterPath="$PROJECT_DIR$/src/Coffee/Map.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Coffee/Position.php" afterPath="$PROJECT_DIR$/src/Coffee/Position.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Coffee/Spot.php" afterPath="$PROJECT_DIR$/src/Coffee/Spot.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Coffee/Table.php" afterPath="$PROJECT_DIR$/src/Coffee/Table.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Coffee/Tile.php" afterPath="$PROJECT_DIR$/src/Coffee/Tile.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/tests/Coffee/MapTest.php" afterPath="$PROJECT_DIR$/tests/Coffee/MapTest.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/tests/Coffee/PositionTest.php" afterPath="$PROJECT_DIR$/tests/Coffee/PositionTest.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/tests/Coffee/SpotTest.php" afterPath="$PROJECT_DIR$/tests/Coffee/SpotTest.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/tests/Coffee/TableTest.php" afterPath="$PROJECT_DIR$/tests/Coffee/TableTest.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/tests/Coffee/TileTest.php" afterPath="$PROJECT_DIR$/tests/Coffee/TileTest.php" />
</list> </list>
<ignored path="coffeetable.iws" /> <ignored path="coffeetable.iws" />
<ignored path=".idea/workspace.xml" /> <ignored path=".idea/workspace.xml" />
@ -31,21 +46,11 @@
</component> </component>
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="index.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/index.php">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-6.0">
<caret line="9" column="21" selection-start-line="9" selection-start-column="21" selection-end-line="9" selection-end-column="21" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Table.php" pinned="false" current-in-tab="false"> <file leaf-file-name="Table.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Coffee/Table.php"> <entry file="file://$PROJECT_DIR$/src/Coffee/Table.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-23.333334"> <state vertical-scroll-proportion="-17.703703">
<caret line="50" column="0" selection-start-line="50" selection-start-column="0" selection-end-line="50" selection-end-column="0" /> <caret line="68" column="0" selection-start-line="68" selection-start-column="0" selection-end-line="68" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>
@ -54,7 +59,7 @@
<file leaf-file-name="Spot.php" pinned="false" current-in-tab="false"> <file leaf-file-name="Spot.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Coffee/Spot.php"> <entry file="file://$PROJECT_DIR$/src/Coffee/Spot.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-10.666667"> <state vertical-scroll-proportion="-12.37037">
<caret line="39" column="7" selection-start-line="39" selection-start-column="7" selection-end-line="39" selection-end-column="7" /> <caret line="39" column="7" selection-start-line="39" selection-start-column="7" selection-end-line="39" selection-end-column="7" />
<folding /> <folding />
</state> </state>
@ -64,7 +69,7 @@
<file leaf-file-name="Position.php" pinned="false" current-in-tab="false"> <file leaf-file-name="Position.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Coffee/Position.php"> <entry file="file://$PROJECT_DIR$/src/Coffee/Position.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-116.111115"> <state vertical-scroll-proportion="-9.703704">
<caret line="175" column="23" selection-start-line="175" selection-start-column="23" selection-end-line="175" selection-end-column="23" /> <caret line="175" column="23" selection-start-line="175" selection-start-column="23" selection-end-line="175" selection-end-column="23" />
<folding /> <folding />
</state> </state>
@ -74,8 +79,8 @@
<file leaf-file-name="Map.php" pinned="false" current-in-tab="false"> <file leaf-file-name="Map.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Coffee/Map.php"> <entry file="file://$PROJECT_DIR$/src/Coffee/Map.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-6.0"> <state vertical-scroll-proportion="-7.3333335">
<caret line="75" column="33" selection-start-line="75" selection-start-column="33" selection-end-line="75" selection-end-column="33" /> <caret line="35" column="7" selection-start-line="35" selection-start-column="7" selection-end-line="35" selection-end-column="7" />
<folding /> <folding />
</state> </state>
</provider> </provider>
@ -84,8 +89,28 @@
<file leaf-file-name="MapTest.php" pinned="false" current-in-tab="true"> <file leaf-file-name="MapTest.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/tests/Coffee/MapTest.php"> <entry file="file://$PROJECT_DIR$/tests/Coffee/MapTest.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.79752064"> <state vertical-scroll-proportion="0.28877005">
<caret line="47" column="52" selection-start-line="47" selection-start-column="52" selection-end-line="47" selection-end-column="52" /> <caret line="12" column="0" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="SpotTest.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tests/Coffee/SpotTest.php">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="TableTest.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tests/Coffee/TableTest.php">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-6.6666665">
<caret line="10" column="22" selection-start-line="10" selection-start-column="22" selection-end-line="10" selection-end-column="22" />
<folding /> <folding />
</state> </state>
</provider> </provider>
@ -94,13 +119,33 @@
<file leaf-file-name="Tile.php" pinned="false" current-in-tab="false"> <file leaf-file-name="Tile.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Coffee/Tile.php"> <entry file="file://$PROJECT_DIR$/src/Coffee/Tile.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-2.3703704"> <state vertical-scroll-proportion="-0.6666667">
<caret line="38" column="6" selection-start-line="38" selection-start-column="6" selection-end-line="38" selection-end-column="6" /> <caret line="38" column="6" selection-start-line="38" selection-start-column="6" selection-end-line="38" selection-end-column="6" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="TileTest.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tests/Coffee/TileTest.php">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="PositionTest.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tests/Coffee/PositionTest.php">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-18.660378">
<caret line="103" column="76" selection-start-line="103" selection-start-column="76" selection-end-line="103" selection-end-column="76" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf> </leaf>
</component> </component>
<component name="FrameworkCommandLineHistory"> <component name="FrameworkCommandLineHistory">
@ -108,11 +153,15 @@
<command text="composer update" /> <command text="composer update" />
<command text="git rm . --cached" /> <command text="git rm . --cached" />
<command text="git rm -r . --cached" /> <command text="git rm -r . --cached" />
<command text="composer update" />
</commandsHistory> </commandsHistory>
</component> </component>
<component name="Git.Settings"> <component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component> </component>
<component name="HighlightingSettingsPerFile">
<setting file="mock:///Dummy.txt" root0="SKIP_INSPECTION" />
</component>
<component name="IdeDocumentHistory"> <component name="IdeDocumentHistory">
<option name="CHANGED_PATHS"> <option name="CHANGED_PATHS">
<list> <list>
@ -137,22 +186,22 @@
<option value="$PROJECT_DIR$/tests/SpotTest.php" /> <option value="$PROJECT_DIR$/tests/SpotTest.php" />
<option value="$PROJECT_DIR$/tests/TileTest.php" /> <option value="$PROJECT_DIR$/tests/TileTest.php" />
<option value="$PROJECT_DIR$/phpunit.xml" /> <option value="$PROJECT_DIR$/phpunit.xml" />
<option value="$PROJECT_DIR$/composer.json" />
<option value="/usr/share/nginx/html/coffeetable/src/Coffee/Map.php" /> <option value="/usr/share/nginx/html/coffeetable/src/Coffee/Map.php" />
<option value="/usr/share/nginx/html/coffeetable/src/Coffee/Tile.php" /> <option value="/usr/share/nginx/html/coffeetable/src/Coffee/Tile.php" />
<option value="$PROJECT_DIR$/tests/Coffee/PositionTest.php" />
<option value="$PROJECT_DIR$/src/Coffee/Position.php" /> <option value="$PROJECT_DIR$/src/Coffee/Position.php" />
<option value="$PROJECT_DIR$/tests/Coffee/TileTest.php" />
<option value="/usr/share/nginx/html/coffeetable/src/Coffee/Spot.php" /> <option value="/usr/share/nginx/html/coffeetable/src/Coffee/Spot.php" />
<option value="$PROJECT_DIR$/tests/Coffee/SpotTest.php" />
<option value="$PROJECT_DIR$/src/Coffee/Spot.php" /> <option value="$PROJECT_DIR$/src/Coffee/Spot.php" />
<option value="/usr/share/nginx/html/coffeetable/index.php" /> <option value="/usr/share/nginx/html/coffeetable/index.php" />
<option value="$PROJECT_DIR$/src/Coffee/Tile.php" /> <option value="$PROJECT_DIR$/src/Coffee/Tile.php" />
<option value="$PROJECT_DIR$/tests/Coffee/MapTest.php" />
<option value="$PROJECT_DIR$/src/Coffee/Map.php" />
<option value="$PROJECT_DIR$/src/Coffee/Table.php" /> <option value="$PROJECT_DIR$/src/Coffee/Table.php" />
<option value="$PROJECT_DIR$/tests/Coffee/TableTest.php" />
<option value="$PROJECT_DIR$/index.php" /> <option value="$PROJECT_DIR$/index.php" />
<option value="$PROJECT_DIR$/composer.json" />
<option value="$PROJECT_DIR$/tests/Coffee/PositionTest.php" />
<option value="$PROJECT_DIR$/src/Coffee/Map.php" />
<option value="$PROJECT_DIR$/tests/Coffee/MapTest.php" />
<option value="$PROJECT_DIR$/tests/Coffee/SpotTest.php" />
<option value="$PROJECT_DIR$/tests/Coffee/TableTest.php" />
<option value="$PROJECT_DIR$/tests/Coffee/TileTest.php" />
</list> </list>
</option> </option>
</component> </component>
@ -188,6 +237,11 @@
<path value="$PROJECT_DIR$/vendor/doctrine/instantiator" /> <path value="$PROJECT_DIR$/vendor/doctrine/instantiator" />
<path value="$PROJECT_DIR$/vendor/composer" /> <path value="$PROJECT_DIR$/vendor/composer" />
<path value="$PROJECT_DIR$/vendor/phpunit/phpunit" /> <path value="$PROJECT_DIR$/vendor/phpunit/phpunit" />
<path value="$PROJECT_DIR$/vendor/symfony/dependency-injection" />
<path value="$PROJECT_DIR$/vendor/symfony/filesystem" />
<path value="$PROJECT_DIR$/vendor/symfony/config" />
<path value="$PROJECT_DIR$/vendor/pdepend/pdepend" />
<path value="$PROJECT_DIR$/vendor/phpmd/phpmd" />
</include_path> </include_path>
</component> </component>
<component name="ProjectFrameBounds"> <component name="ProjectFrameBounds">
@ -274,9 +328,6 @@
<State> <State>
<id>Spelling</id> <id>Spelling</id>
</State> </State>
<State>
<id>UndefinedPHP</id>
</State>
<State> <State>
<id>XML</id> <id>XML</id>
</State> </State>
@ -286,7 +337,27 @@
</expanded-state> </expanded-state>
<selected-state> <selected-state>
<State> <State>
<id>PhpUndefinedFieldInspection</id> <id>PhpCSValidationInspection</id>
</State>
</selected-state>
</profile-state>
</entry>
<entry key="Project Default (copy)">
<profile-state>
<expanded-state>
<State>
<id />
</State>
<State>
<id>PHP</id>
</State>
<State>
<id>UnusedPHP</id>
</State>
</expanded-state>
<selected-state>
<State>
<id>MessDetectorValidationInspection</id>
</State> </State>
</selected-state> </selected-state>
</profile-state> </profile-state>
@ -395,7 +466,7 @@
<property name="options.splitter.main.proportions" value="0.3" /> <property name="options.splitter.main.proportions" value="0.3" />
<property name="options.splitter.details.proportions" value="0.2" /> <property name="options.splitter.details.proportions" value="0.2" />
<property name="WebServerToolWindowFactoryState" value="false" /> <property name="WebServerToolWindowFactoryState" value="false" />
<property name="SearchEverywhereHistoryKey" value="replace in pa&#9;ACTION&#9;ReplaceInPath&#10;hist&#9;ACTION&#9;Vcs.ShowTabbedFileHistory&#10;paste&#9;ACTION&#9;EditorPasteSimple&#10;rear &#9;ACTION&#9;RearrangeCode&#10;histor&#9;ACTION&#9;Vcs.ShowTabbedFileHistory&#10;rep in pa&#9;ACTION&#9;ReplaceInPath&#10;replace in&#9;ACTION&#9;ReplaceInPath&#10;rearr&#9;ACTION&#9;RearrangeCode&#10;rea&#9;ACTION&#9;RearrangeCode&#10;orde&#9;null&#9;null&#10;next hi&#9;ACTION&#9;GotoNextError&#10;next&#9;ACTION&#9;GotoNextError&#10;comm cha&#9;ACTION&#9;ChangesView.Commit&#10;comple&#9;ACTION&#9;CodeCompletionGroup&#10;complet&#9;ACTION&#9;CodeCompletionGroup&#10;sear&#9;ACTION&#9;SearchEverywhere&#10;breakpoint&#9;ACTION&#9;ToggleLineBreakpoint&#10;comm ch&#9;ACTION&#9;ChangesView.Commit&#10;smart&#9;ACTION&#9;SmartTypeCompletion&#10;para&#9;ACTION&#9;IntroduceParameter&#10;keyma&#9;ACTION&#9;ChangeKeymap&#10;commit&#9;ACTION&#9;Vcs.CheckCommitMessageSpelling&#10;commit &#9;ACTION&#9;Vcs.CheckCommitMessageSpelling&#10;phpunit&#9;null&#9;null&#10;exte&#9;ACTION&#9;EditorSelectWord&#10;composer&#9;ACTION&#9;ComposerGroup&#10;test&#9;ACTION&#9;RerunTests&#10;rer&#9;ACTION&#9;RerunTests&#10;tests&#9;ACTION&#9;RerunTests&#10;hpunit&#9;ACTION&#9;PhpUnitGenerateTestMethod&#10;phpuni&#9;ACTION&#9;PhpUnitNewTest&#10;rear&#9;ACTION&#9;RearrangeCode" /> <property name="SearchEverywhereHistoryKey" value="reform&#9;ACTION&#9;ReformatCode&#10;replace in pa&#9;ACTION&#9;ReplaceInPath&#10;hist&#9;ACTION&#9;Vcs.ShowTabbedFileHistory&#10;paste&#9;ACTION&#9;EditorPasteSimple&#10;rear &#9;ACTION&#9;RearrangeCode&#10;histor&#9;ACTION&#9;Vcs.ShowTabbedFileHistory&#10;rep in pa&#9;ACTION&#9;ReplaceInPath&#10;replace in&#9;ACTION&#9;ReplaceInPath&#10;rearr&#9;ACTION&#9;RearrangeCode&#10;rea&#9;ACTION&#9;RearrangeCode&#10;orde&#9;null&#9;null&#10;next hi&#9;ACTION&#9;GotoNextError&#10;next&#9;ACTION&#9;GotoNextError&#10;comm cha&#9;ACTION&#9;ChangesView.Commit&#10;comple&#9;ACTION&#9;CodeCompletionGroup&#10;complet&#9;ACTION&#9;CodeCompletionGroup&#10;sear&#9;ACTION&#9;SearchEverywhere&#10;breakpoint&#9;ACTION&#9;ToggleLineBreakpoint&#10;comm ch&#9;ACTION&#9;ChangesView.Commit&#10;smart&#9;ACTION&#9;SmartTypeCompletion&#10;para&#9;ACTION&#9;IntroduceParameter&#10;keyma&#9;ACTION&#9;ChangeKeymap&#10;commit&#9;ACTION&#9;Vcs.CheckCommitMessageSpelling&#10;commit &#9;ACTION&#9;Vcs.CheckCommitMessageSpelling&#10;phpunit&#9;null&#9;null&#10;exte&#9;ACTION&#9;EditorSelectWord&#10;composer&#9;ACTION&#9;ComposerGroup&#10;test&#9;ACTION&#9;RerunTests&#10;rer&#9;ACTION&#9;RerunTests&#10;tests&#9;ACTION&#9;RerunTests&#10;hpunit&#9;ACTION&#9;PhpUnitGenerateTestMethod&#10;phpuni&#9;ACTION&#9;PhpUnitNewTest&#10;rear&#9;ACTION&#9;RearrangeCode" />
<property name="settings.editor.selected.configurable" value="preferences.sourceCode.PHP" /> <property name="settings.editor.selected.configurable" value="preferences.sourceCode.PHP" />
<property name="settings.editor.splitter.proportion" value="0.2" /> <property name="settings.editor.splitter.proportion" value="0.2" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../coffeetable_branch" /> <property name="last_opened_file_path" value="$PROJECT_DIR$/../coffeetable_branch" />
@ -658,7 +729,13 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1458293744076</updated> <updated>1458293744076</updated>
</task> </task>
<option name="localTasksCounter" value="30" /> <task id="LOCAL-00030" summary="Rework Table constructor">
<created>1458293898715</created>
<option name="number" value="00030" />
<option name="project" value="LOCAL" />
<updated>1458293898715</updated>
</task>
<option name="localTasksCounter" value="31" />
<servers /> <servers />
</component> </component>
<component name="TestHistory"> <component name="TestHistory">
@ -701,12 +778,13 @@
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32917705" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32917705" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="12" side_tool="true" content_ui="tabs" /> <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="12" side_tool="true" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3990025" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3990025" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Command Line Tools Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3316583" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32917705" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" /> <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32917705" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32668328" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" x="0" y="355" width="1446" height="188" /> <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32668328" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" x="0" y="355" width="1446" height="188" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" /> <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.16875" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.23333333" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32917705" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32917705" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24964234" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24964234" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" /> <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3840399" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3840399" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
@ -714,10 +792,31 @@
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="PHP-CGI Server" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" /> <window_info id="PHP-CGI Server" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Command Line Tools Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32917705" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout> </layout>
<layout-to-restore>
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32917705" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="PHP-CGI Server" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="12" side_tool="true" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3990025" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Command Line Tools Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32917705" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32917705" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32668328" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" x="0" y="355" width="1446" height="188" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.16875" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32917705" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24964234" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3840399" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
</layout-to-restore>
</component> </component>
<component name="UpdateCopyrightCheckinHandler"> <component name="UpdateCopyrightCheckinHandler">
<option name="UPDATE_COPYRIGHT" value="true" /> <option name="UPDATE_COPYRIGHT" value="true" />
@ -735,7 +834,6 @@
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<option name="USE_COMMIT_MESSAGE_MARGIN" value="true" /> <option name="USE_COMMIT_MESSAGE_MARGIN" value="true" />
<MESSAGE value="Create Spot and SpotTest" />
<MESSAGE value="Refactor coordinates in Tile from X,Y to col,row" /> <MESSAGE value="Refactor coordinates in Tile from X,Y to col,row" />
<MESSAGE value="Refactor Table.isValidFortile to couldContainTile" /> <MESSAGE value="Refactor Table.isValidFortile to couldContainTile" />
<MESSAGE value="Split Table and Map to the separate classes for decoupling" /> <MESSAGE value="Split Table and Map to the separate classes for decoupling" />
@ -760,7 +858,8 @@
<MESSAGE value="Implement Map.getNeighboursOfTile" /> <MESSAGE value="Implement Map.getNeighboursOfTile" />
<MESSAGE value="Rework Tile constructor" /> <MESSAGE value="Rework Tile constructor" />
<MESSAGE value="BLA BLA BLA" /> <MESSAGE value="BLA BLA BLA" />
<option name="LAST_COMMIT_MESSAGE" value="BLA BLA BLA" /> <MESSAGE value="Rework Table constructor" />
<option name="LAST_COMMIT_MESSAGE" value="Rework Table constructor" />
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="true" /> <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="true" />
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" /> <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
<option name="REARRANGE_BEFORE_PROJECT_COMMIT" value="true" /> <option name="REARRANGE_BEFORE_PROJECT_COMMIT" value="true" />
@ -928,13 +1027,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/composer.json">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.14438502">
<caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file:///usr/share/nginx/html/coffeetable/src/Coffee/Map.php"> <entry file="file:///usr/share/nginx/html/coffeetable/src/Coffee/Map.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.47678572"> <state vertical-scroll-proportion="0.47678572">
@ -1020,66 +1112,106 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Tile.php"> <entry file="file://$PROJECT_DIR$/vendor/bin/phpunit">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-2.3703704"> <state vertical-scroll-proportion="0.3901869">
<caret line="38" column="6" selection-start-line="38" selection-start-column="6" selection-end-line="38" selection-end-column="6" /> <caret line="37" column="42" selection-start-line="37" selection-start-column="42" selection-end-line="37" selection-end-column="42" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Spot.php"> <entry file="file://$PROJECT_DIR$/index.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-10.666667"> <state vertical-scroll-proportion="-6.0">
<caret line="39" column="7" selection-start-line="39" selection-start-column="7" selection-end-line="39" selection-end-column="7" /> <caret line="9" column="21" selection-start-line="9" selection-start-column="21" selection-end-line="9" selection-end-column="21" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Position.php"> <entry file="file://$PROJECT_DIR$/composer.json">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-116.111115"> <state vertical-scroll-proportion="0.29752067">
<caret line="175" column="23" selection-start-line="175" selection-start-column="23" selection-end-line="175" selection-end-column="23" /> <caret line="8" column="5" selection-start-line="8" selection-start-column="5" selection-end-line="8" selection-end-column="5" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Table.php"> <entry file="file://$PROJECT_DIR$/tests/Coffee/PositionTest.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-23.333334"> <state vertical-scroll-proportion="-18.660378">
<caret line="50" column="0" selection-start-line="50" selection-start-column="0" selection-end-line="50" selection-end-column="0" /> <caret line="103" column="76" selection-start-line="103" selection-start-column="76" selection-end-line="103" selection-end-column="76" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/vendor/bin/phpunit"> <entry file="file://$PROJECT_DIR$/tests/Coffee/SpotTest.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.3901869"> <state vertical-scroll-proportion="0.0">
<caret line="37" column="42" selection-start-line="37" selection-start-column="42" selection-end-line="37" selection-end-column="42" /> <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/index.php"> <entry file="file://$PROJECT_DIR$/tests/Coffee/TableTest.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-6.0"> <state vertical-scroll-proportion="-6.6666665">
<caret line="9" column="21" selection-start-line="9" selection-start-column="21" selection-end-line="9" selection-end-column="21" /> <caret line="10" column="22" selection-start-line="10" selection-start-column="22" selection-end-line="10" selection-end-column="22" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/Coffee/TileTest.php">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Map.php"> <entry file="file://$PROJECT_DIR$/src/Coffee/Map.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-6.0"> <state vertical-scroll-proportion="-7.3333335">
<caret line="75" column="33" selection-start-line="75" selection-start-column="33" selection-end-line="75" selection-end-column="33" /> <caret line="35" column="7" selection-start-line="35" selection-start-column="7" selection-end-line="35" selection-end-column="7" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Position.php">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-9.703704">
<caret line="175" column="23" selection-start-line="175" selection-start-column="23" selection-end-line="175" selection-end-column="23" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Spot.php">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-12.37037">
<caret line="39" column="7" selection-start-line="39" selection-start-column="7" selection-end-line="39" selection-end-column="7" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Table.php">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-17.703703">
<caret line="68" column="0" selection-start-line="68" selection-start-column="0" selection-end-line="68" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Tile.php">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-0.6666667">
<caret line="38" column="6" selection-start-line="38" selection-start-column="6" selection-end-line="38" selection-end-column="6" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/tests/Coffee/MapTest.php"> <entry file="file://$PROJECT_DIR$/tests/Coffee/MapTest.php">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.79752064"> <state vertical-scroll-proportion="0.28877005">
<caret line="47" column="52" selection-start-line="47" selection-start-column="52" selection-end-line="47" selection-end-column="52" /> <caret line="12" column="0" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>

@ -1,6 +1,7 @@
{ {
"require-dev": { "require-dev": {
"phpunit/phpunit": "5.2.*" "phpunit/phpunit": "5.2.*",
"phpmd/phpmd": "@stable"
}, },
"autoload-dev": { "autoload-dev": {
"psr-0": { "psr-0": {

274
composer.lock generated

@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "2886793b37f8ff226b298154be898209", "hash": "835e1d546c82d631358062e62966525c",
"content-hash": "5c48139016fec53f7c43de7c6ff8508d", "content-hash": "8c9ffcab7de4c22d081223c7d31ad609",
"packages": [], "packages": [],
"packages-dev": [ "packages-dev": [
{ {
@ -104,6 +104,46 @@
], ],
"time": "2015-11-07 22:20:37" "time": "2015-11-07 22:20:37"
}, },
{
"name": "pdepend/pdepend",
"version": "2.2.4",
"source": {
"type": "git",
"url": "https://github.com/pdepend/pdepend.git",
"reference": "b086687f3a01dc6bb92d633aef071d2c5dd0db06"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pdepend/pdepend/zipball/b086687f3a01dc6bb92d633aef071d2c5dd0db06",
"reference": "b086687f3a01dc6bb92d633aef071d2c5dd0db06",
"shasum": ""
},
"require": {
"php": ">=5.3.7",
"symfony/config": "^2.3.0|^3",
"symfony/dependency-injection": "^2.3.0|^3",
"symfony/filesystem": "^2.3.0|^3"
},
"require-dev": {
"phpunit/phpunit": "^4.4.0,<4.8",
"squizlabs/php_codesniffer": "^2.0.0"
},
"bin": [
"src/bin/pdepend"
],
"type": "library",
"autoload": {
"psr-4": {
"PDepend\\": "src/main/php/PDepend"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Official version of pdepend to be handled with Composer",
"time": "2016-03-10 15:15:04"
},
{ {
"name": "phpdocumentor/reflection-docblock", "name": "phpdocumentor/reflection-docblock",
"version": "2.0.4", "version": "2.0.4",
@ -153,6 +193,71 @@
], ],
"time": "2015-02-03 12:10:50" "time": "2015-02-03 12:10:50"
}, },
{
"name": "phpmd/phpmd",
"version": "2.4.2",
"source": {
"type": "git",
"url": "https://github.com/phpmd/phpmd.git",
"reference": "fccbdb6b222f6d7a6d35af1c396ba5435cec76a9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpmd/phpmd/zipball/fccbdb6b222f6d7a6d35af1c396ba5435cec76a9",
"reference": "fccbdb6b222f6d7a6d35af1c396ba5435cec76a9",
"shasum": ""
},
"require": {
"pdepend/pdepend": "~2.0",
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0",
"squizlabs/php_codesniffer": "^2.0"
},
"bin": [
"src/bin/phpmd"
],
"type": "project",
"autoload": {
"psr-0": {
"PHPMD\\": "src/main/php"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Manuel Pichler",
"email": "github@manuel-pichler.de",
"homepage": "https://github.com/manuelpichler",
"role": "Project Founder"
},
{
"name": "Other contributors",
"homepage": "https://github.com/phpmd/phpmd/graphs/contributors",
"role": "Contributors"
},
{
"name": "Marc Würth",
"email": "ravage@bluewin.ch",
"homepage": "https://github.com/ravage84",
"role": "Project Maintainer"
}
],
"description": "PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.",
"homepage": "http://phpmd.org/",
"keywords": [
"mess detection",
"mess detector",
"pdepend",
"phpmd",
"pmd"
],
"time": "2016-03-10 17:17:44"
},
{ {
"name": "phpspec/prophecy", "name": "phpspec/prophecy",
"version": "v1.6.0", "version": "v1.6.0",
@ -1052,6 +1157,167 @@
"homepage": "https://github.com/sebastianbergmann/version", "homepage": "https://github.com/sebastianbergmann/version",
"time": "2016-02-04 12:56:52" "time": "2016-02-04 12:56:52"
}, },
{
"name": "symfony/config",
"version": "v3.0.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
"reference": "79a97025f7bf4bbf8352b5df1905aa136a531066"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/config/zipball/79a97025f7bf4bbf8352b5df1905aa136a531066",
"reference": "79a97025f7bf4bbf8352b5df1905aa136a531066",
"shasum": ""
},
"require": {
"php": ">=5.5.9",
"symfony/filesystem": "~2.8|~3.0"
},
"suggest": {
"symfony/yaml": "To use the yaml reference dumper"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Config\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
"time": "2016-02-23 15:16:06"
},
{
"name": "symfony/dependency-injection",
"version": "v3.0.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
"reference": "821800ae6753b88dab55a7280811d8734b8112bf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/821800ae6753b88dab55a7280811d8734b8112bf",
"reference": "821800ae6753b88dab55a7280811d8734b8112bf",
"shasum": ""
},
"require": {
"php": ">=5.5.9"
},
"require-dev": {
"symfony/config": "~2.8|~3.0",
"symfony/expression-language": "~2.8|~3.0",
"symfony/yaml": "~2.8|~3.0"
},
"suggest": {
"symfony/config": "",
"symfony/proxy-manager-bridge": "Generate service proxies to lazy load them",
"symfony/yaml": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\DependencyInjection\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony DependencyInjection Component",
"homepage": "https://symfony.com",
"time": "2016-02-28 16:50:08"
},
{
"name": "symfony/filesystem",
"version": "v3.0.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
"reference": "23ae8f9648d0a7fe94a47c8e20e5bf37c489a451"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/23ae8f9648d0a7fe94a47c8e20e5bf37c489a451",
"reference": "23ae8f9648d0a7fe94a47c8e20e5bf37c489a451",
"shasum": ""
},
"require": {
"php": ">=5.5.9"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Filesystem\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
"time": "2016-02-23 15:16:06"
},
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
"version": "v3.0.3", "version": "v3.0.3",
@ -1104,7 +1370,9 @@
], ],
"aliases": [], "aliases": [],
"minimum-stability": "stable", "minimum-stability": "stable",
"stability-flags": [], "stability-flags": {
"phpmd/phpmd": 0
},
"prefer-stable": false, "prefer-stable": false,
"prefer-lowest": false, "prefer-lowest": false,
"platform": [], "platform": [],

@ -2,11 +2,11 @@
namespace Coffee; namespace Coffee;
/** /**
* Class Map * Class Map
* *
* @package Coffee * @package Coffee
*/ */
/** /**
* Class Map * Class Map
* *
@ -14,137 +14,137 @@ namespace Coffee;
*/ */
class Map { class Map {
/** /**
* @var Tile[] * @var Tile[]
*/ */
private $tiles = []; private $tiles = [];
/** /**
* @var int * @var int
*/ */
private $height = 0; private $height = 0;
/** /**
* @var int * @var int
*/ */
private $width = 0; private $width = 0;
/** /**
* Map constructor. * Map constructor.
* *
* @param $description [][] * @param $description [][]
* @throws \Exception * @throws \Exception
*/ */
public function __construct($description) { public function __construct($description) {
// The description must be 2D array containing at least one element // The description must be 2D array containing at least one element
if (is_null($description) || !is_array($description) || !is_array($description[0]) || count($description[0]) < 1) { if (is_null($description) || !is_array($description) || !is_array($description[0]) || count($description[0]) < 1) {
throw new \Exception('The Coffee Table map could not be loaded.'); throw new \Exception('The Coffee Table map could not be loaded.');
} }
$height = 0; $height = 0;
$width = 0; $width = 0;
// This data processing could be written more read-ably in multiple cycles / private methods, // This data processing could be written more read-ably in multiple cycles / private methods,
// but at a cost of reduced performance (minor). // but at a cost of reduced performance (minor).
foreach ($description as $rowIndex => $row) { foreach ($description as $rowIndex => $row) {
foreach ($row as $columnIndex => $tileRepresentation) { foreach ($row as $columnIndex => $tileRepresentation) {
// W need to convert indices to positions // W need to convert indices to positions
$this->tiles[] = new Tile($rowIndex + 1, $columnIndex + 1, $tileRepresentation); $this->tiles[] = new Tile($rowIndex + 1, $columnIndex + 1, $tileRepresentation);
// Find maximum // Find maximum
$width = $columnIndex > $width ? $columnIndex : $width; $width = $columnIndex > $width ? $columnIndex : $width;
} }
// Find maximum // Find maximum
$height = $rowIndex > $height ? $rowIndex : $height; $height = $rowIndex > $height ? $rowIndex : $height;
} }
// Convert indices to dimensions // Convert indices to dimensions
$this->height = $height + 1; $this->height = $height + 1;
$this->width = $width + 1; $this->width = $width + 1;
} }
/** /**
* @return Tile[] * @return Tile[]
*/ */
public function getTiles() { public function getTiles() {
return $this->tiles; return $this->tiles;
} }
/** /**
* @return Tile[] * @return Tile[]
*/ */
public function getUnvisitedTiles() { public function getUnvisitedTiles() {
$array = []; $array = [];
foreach ($this->getTiles() as $tile) { foreach ($this->getTiles() as $tile) {
if (!$tile->isVisited()) { if (!$tile->isVisited()) {
$array[] = $tile; $array[] = $tile;
} }
} }
return $array; return $array;
} }
public function getUnvisitedTile() { public function getUnvisitedTile() {
foreach ($this->getTiles() as $tile) { foreach ($this->getTiles() as $tile) {
if (!$tile->isVisited()) { if (!$tile->isVisited()) {
return $tile; return $tile;
} }
} }
return false; return false;
} }
/** /**
* @param Position $position * @param Position $position
* @return Tile|null * @return Tile|null
*/ */
public function getTileByPosition(Position $position) { public function getTileByPosition(Position $position) {
foreach ($this->getTiles() as $tile) { foreach ($this->getTiles() as $tile) {
if ($tile->isTheSamePosition($position)) { if ($tile->isTheSamePosition($position)) {
return $tile; return $tile;
} }
} }
return null; return null;
} }
/** /**
* @return array * @return array
*/ */
public function describedByArray() { public function describedByArray() {
$array = []; $array = [];
foreach ($this->getTiles() as $tile) { foreach ($this->getTiles() as $tile) {
$array[$tile->getRowIndex()][$tile->getColumnIndex()] = $tile->isRepresentingSpot(); $array[$tile->getRowIndex()][$tile->getColumnIndex()] = $tile->isRepresentingSpot();
} }
return $array; return $array;
} }
/** /**
* @param Tile $tile * @param Tile $tile
* @return Tile[] * @return Tile[]
*/ */
public function getNeighboursOfTile(Tile $tile) { public function getNeighboursOfTile(Tile $tile) {
$neighbouringTiles = []; $neighbouringTiles = [];
foreach ($tile->getNeighbouringPositions() as $neighbouringPosition) { foreach ($tile->getNeighbouringPositions() as $neighbouringPosition) {
$neighbouringTiles[] = $this->getTileByPosition($neighbouringPosition); $neighbouringTiles[] = $this->getTileByPosition($neighbouringPosition);
} }
return array_values(array_filter($neighbouringTiles)); return array_values(array_filter($neighbouringTiles));
} }
/** /**
* @return int * @return int
*/ */
public function getHeight() { public function getHeight() {
return $this->height; return $this->height;
} }
/** /**
* @return int * @return int
*/ */
public function getWidth() { public function getWidth() {
return $this->width; return $this->width;
} }
// //
// /** // /**
// * @param Position $position // * @param Position $position

@ -2,11 +2,11 @@
namespace Coffee; namespace Coffee;
/** /**
* Class Position * Class Position
* *
* @package Coffee * @package Coffee
*/ */
/** /**
* Class Position * Class Position
* *
@ -14,184 +14,184 @@ namespace Coffee;
*/ */
class Position { class Position {
/** /**
* The lowest possible position for rows and columns * The lowest possible position for rows and columns
*/ */
const LOWER_BOUND = 1; const LOWER_BOUND = 1;
/** /**
* @var int * @var int
*/ */
private $column = 0; private $column = 0;
/** /**
* @var int * @var int
*/ */
private $row = 0; private $row = 0;
/** /**
* @param $row * @param $row
* @param $column * @param $column
* @throws \Exception * @throws \Exception
*/ */
function __construct($row, $column) { function __construct($row, $column) {
if (!$this->fitsIntoLowerBound($row, $column)) { if (!$this->fitsIntoLowerBound($row, $column)) {
throw new \Exception('The row argument must be higher than ' . self::LOWER_BOUND . '.'); throw new \Exception('The row argument must be higher than ' . self::LOWER_BOUND . '.');
} }
$this->column = $column; $this->column = $column;
$this->row = $row; $this->row = $row;
} }
/** /**
* @return int * @return int
*/ */
public function getColumn() { public function getColumn() {
return $this->column; return $this->column;
} }
/** /**
* @return int * @return int
*/ */
public function getColumnIndex() { public function getColumnIndex() {
return $this->column - 1; return $this->column - 1;
} }
/** /**
* @return int * @return int
*/ */
public function getRow() { public function getRow() {
return $this->row; return $this->row;
} }
/** /**
* @return int * @return int
*/ */
public function getRowIndex() { public function getRowIndex() {
return $this->row - 1; return $this->row - 1;
} }
/** /**
* @param Position $position * @param Position $position
* @return bool * @return bool
*/ */
public function isTheSameColumn(Position $position) { public function isTheSameColumn(Position $position) {
return $this->getColumn() == $position->getColumn(); return $this->getColumn() == $position->getColumn();
} }
/** /**
* @param Position $position * @param Position $position
* @return bool * @return bool
*/ */
public function isTheSameRow(Position $position) { public function isTheSameRow(Position $position) {
return $this->getRow() == $position->getRow(); return $this->getRow() == $position->getRow();
} }
/** /**
* @param Position $position * @param Position $position
* @return bool * @return bool
*/ */
public function isTheSamePosition(Position $position) { public function isTheSamePosition(Position $position) {
return $this->isTheSameColumn($position) && $this->isTheSameRow($position); return $this->isTheSameColumn($position) && $this->isTheSameRow($position);
} }
/** /**
* @return Position * @return Position
*/ */
public function getNorthEastPosition() { public function getNorthEastPosition() {
return $this->getSafeNeighbourPosition($this->getRow() - 1, $this->getColumn() + 1); return $this->getSafeNeighbourPosition($this->getRow() - 1, $this->getColumn() + 1);
} }
/** /**
* @return Position * @return Position
*/ */
public function getEastPosition() { public function getEastPosition() {
return $this->getSafeNeighbourPosition($this->getRow(), $this->getColumn() + 1); return $this->getSafeNeighbourPosition($this->getRow(), $this->getColumn() + 1);
} }
/** /**
* @return Position * @return Position
*/ */
public function getSouthEastPosition() { public function getSouthEastPosition() {
return $this->getSafeNeighbourPosition($this->getRow() + 1, $this->getColumn() + 1); return $this->getSafeNeighbourPosition($this->getRow() + 1, $this->getColumn() + 1);
} }
/** /**
* @return Position * @return Position
*/ */
public function getSouthPosition() { public function getSouthPosition() {
return $this->getSafeNeighbourPosition($this->getRow() + 1, $this->getColumn()); return $this->getSafeNeighbourPosition($this->getRow() + 1, $this->getColumn());
} }
/** /**
* @return Position * @return Position
*/ */
public function getSouthWestPosition() { public function getSouthWestPosition() {
return $this->getSafeNeighbourPosition($this->getRow() + 1, $this->getColumn() - 1); return $this->getSafeNeighbourPosition($this->getRow() + 1, $this->getColumn() - 1);
} }
/** /**
* @return Position * @return Position
*/ */
public function getWestPosition() { public function getWestPosition() {
return $this->getSafeNeighbourPosition($this->getRow(), $this->getColumn() - 1); return $this->getSafeNeighbourPosition($this->getRow(), $this->getColumn() - 1);
} }
/** /**
* @return Position * @return Position
*/ */
public function getNorthWestPosition() { public function getNorthWestPosition() {
return $this->getSafeNeighbourPosition($this->getRow() - 1, $this->getColumn() - 1); return $this->getSafeNeighbourPosition($this->getRow() - 1, $this->getColumn() - 1);
} }
/** /**
* @return Position * @return Position
*/ */
public function getNorthPosition() { public function getNorthPosition() {
return $this->getSafeNeighbourPosition($this->getRow() - 1, $this->getColumn()); return $this->getSafeNeighbourPosition($this->getRow() - 1, $this->getColumn());
} }
/** /**
* @return array Positions of neighbours from NE to N; CW direction * @return array Positions of neighbours from NE to N; CW direction
*/ */
public function getNeighbouringPositions() { public function getNeighbouringPositions() {
// null values from out-of-lower-bound neighbours are filtered out and indices are fixed // null values from out-of-lower-bound neighbours are filtered out and indices are fixed
return array_values(array_filter([ return array_values(array_filter([
$this->getNorthEastPosition(), $this->getNorthEastPosition(),
$this->getEastPosition(), $this->getEastPosition(),
$this->getSouthEastPosition(), $this->getSouthEastPosition(),
$this->getSouthPosition(), $this->getSouthPosition(),
$this->getSouthWestPosition(), $this->getSouthWestPosition(),
$this->getWestPosition(), $this->getWestPosition(),
$this->getNorthWestPosition(), $this->getNorthWestPosition(),
$this->getNorthPosition(), $this->getNorthPosition(),
])); ]));
} }
/** /**
* @param $row * @param $row
* @param $column * @param $column
* @return bool * @return bool
*/ */
protected function fitsIntoLowerBound($row, $column) { protected function fitsIntoLowerBound($row, $column) {
if ($row < self::LOWER_BOUND || $column < self::LOWER_BOUND) { if ($row < self::LOWER_BOUND || $column < self::LOWER_BOUND) {
return false; return false;
} }
return true; return true;
} }
/** /**
* @param $row * @param $row
* @param $column * @param $column
* @return Position|null * @return Position|null
*/ */
protected function getSafeNeighbourPosition($row, $column) { protected function getSafeNeighbourPosition($row, $column) {
if ($this->fitsIntoLowerBound($row, $column)) { if ($this->fitsIntoLowerBound($row, $column)) {
return new Position($row, $column); return new Position($row, $column);
} }
return null; return null;
} }
} }

@ -8,11 +8,11 @@
namespace Coffee; namespace Coffee;
/** /**
* Class Spot * Class Spot
* *
* @package Coffee * @package Coffee
*/ */
/** /**
* Class Spot * Class Spot
* *
@ -20,38 +20,38 @@ namespace Coffee;
*/ */
class Spot { class Spot {
/** /**
* @var Position[] * @var Position[]
*/ */
private $positions = []; private $positions = [];
/** /**
* Spot constructor. * Spot constructor.
* *
* @param Position $position * @param Position $position
*/ */
public function __construct(Position $position) { public function __construct(Position $position) {
$this->positions[] = $position; $this->positions[] = $position;
} }
/** /**
* @param Position $position * @param Position $position
* @return bool * @return bool
*/ */
public function addPosition(Position $position) { public function addPosition(Position $position) {
if (is_null($position)) { if (is_null($position)) {
return false; return false;
} }
$this->positions[] = $position; $this->positions[] = $position;
return true; return true;
} }
/** /**
* @return Position[] * @return Position[]
*/ */
public function getPositions() { public function getPositions() {
return $this->positions; return $this->positions;
} }
} }

@ -14,65 +14,65 @@ namespace Coffee;
*/ */
class Table { class Table {
/** /**
* @var Spot[] * @var Spot[]
*/ */
private $spots = []; private $spots = [];
/** /**
* Table constructor. * Table constructor.
* *
* @param Map $map * @param Map $map
*/ */
public function __construct(Map $map) { public function __construct(Map $map) {
foreach ($map->getTiles() as $currentTile) { foreach ($map->getTiles() as $currentTile) {
if (!$currentTile->isVisited()) { if (!$currentTile->isVisited()) {
$currentTile->visit(); $currentTile->visit();
if ($currentTile->isRepresentingSpot()) { if ($currentTile->isRepresentingSpot()) {
$spot = new Spot($currentTile->getPosition()); $spot = new Spot($currentTile->getPosition());
foreach ($map->getNeighboursOfTile($currentTile) as $neighbouringTile) { foreach ($map->getNeighboursOfTile($currentTile) as $neighbouringTile) {
$neighbouringTile->visit(); $neighbouringTile->visit();
if ($neighbouringTile->isRepresentingSpot()) { if ($neighbouringTile->isRepresentingSpot()) {
$spot->addPosition($neighbouringTile->getPosition()); $spot->addPosition($neighbouringTile->getPosition());
} }
} }
$this->addSpot($spot); $this->addSpot($spot);
} }
} }
} }
} }
/** /**
* @return Spot[] * @return Spot[]
*/ */
public function getSpots() { public function getSpots() {
return $this->spots; return $this->spots;
} }
/** /**
* @return int * @return int
*/ */
public function getSpotsCount() { public function getSpotsCount() {
return count($this->spots); return count($this->spots);
} }
/** /**
* @param Spot $spot * @param Spot $spot
* @return bool * @return bool
*/ */
protected function addSpot(Spot $spot) { protected function addSpot(Spot $spot) {
if (is_null($spot)) { if (is_null($spot)) {
return false; return false;
} }
$this->spots[] = $spot; $this->spots[] = $spot;
return true; return true;
} }
} }

@ -14,83 +14,84 @@ namespace Coffee;
*/ */
class Tile extends Position { class Tile extends Position {
/** /**
* Representation on the map, that element exists on the given tile * Representation on the map, that element exists on the given tile
*/ */
const REPRESENTS_SPOT = 1; const REPRESENTS_SPOT = 1;
/** /**
* Representation on the map, that element does not exist on the given tile * Representation on the map, that element does not exist on the given tile
*/ */
const REPRESENTS_VOID = 0; const REPRESENTS_VOID = 0;
/** /**
* @var integer * @var integer
*/ */
private $representation; private $representation;
/** /**
* Tiles are inherently unvisited * Tiles are inherently unvisited
* *
*@var bool * @var bool
*/ */
private $visited = false; private $visited = false;
/** /**
* Tile constructor. * Tile constructor.
* *
* @param $row * @param $row
* @param $column * @param $column
* @param $tileRepresentation * @param $tileRepresentation
* @throws \Exception * @throws \Exception
*/ */
public function __construct($row, $column, $tileRepresentation) { public function __construct($row, $column, $tileRepresentation) {
if (!$this->isRepresentingSpot() && !$this->isRepresentingVoid()) { if (!$this->isRepresentingSpot() && !$this->isRepresentingVoid()) {
throw new \Exception('The map contains invalid representations'); throw new \Exception('The map contains invalid representations');
} }
parent::__construct($row, $column); parent::__construct($row, $column);
$this->representation = $tileRepresentation; $this->representation = $tileRepresentation;
} }
/** /**
* @return boolean * @return boolean
*/ */
public function isVisited() { public function isVisited() {
return $this->visited; return $this->visited;
} }
/** /**
* Flags this Tile as "visited" * Flags this Tile as "visited"
* *
* @return bool * @return bool
*/ */
public function visit() { public function visit() {
if ($this->isVisited()) if ($this->isVisited()) {
return false; return false;
}
$this->visited = true; $this->visited = true;
return true; return true;
} }
/** /**
* @return boolean * @return boolean
*/ */
public function isRepresentingSpot() { public function isRepresentingSpot() {
return $this->representation == self::REPRESENTS_SPOT; return $this->representation == self::REPRESENTS_SPOT;
} }
/** /**
* @return bool * @return bool
*/ */
public function isRepresentingVoid() { public function isRepresentingVoid() {
return $this->representation == self::REPRESENTS_VOID; return $this->representation == self::REPRESENTS_VOID;
} }
/** /**
* @return Position * @return Position
*/ */
public function getPosition() { public function getPosition() {
return new Position($this->getRow(), $this->getColumn()); return new Position($this->getRow(), $this->getColumn());
} }
} }

@ -7,119 +7,119 @@ require __DIR__ . '/../../vendor/autoload.php';
class MapTest extends \PHPUnit_Framework_TestCase { class MapTest extends \PHPUnit_Framework_TestCase {
public function testGetTiles() { public function testGetTiles() {
$tileA = new Tile(1, 1, Tile::REPRESENTS_SPOT); $tileA = new Tile(1, 1, Tile::REPRESENTS_SPOT);
$tileB = new Tile(1, 2, Tile::REPRESENTS_VOID); $tileB = new Tile(1, 2, Tile::REPRESENTS_VOID);
$map = new Map([[1, 0]]); $map = new Map([[1, 0]]);
$this->assertEquals([$tileA, $tileB], $map->getTiles()); $this->assertEquals([$tileA, $tileB], $map->getTiles());
} }
public function testUnvisitedTile() { public function testUnvisitedTile() {
$description = [ $description = [
[1, 0], [1, 0],
[0, 1], [0, 1],
]; ];
$map = new Map($description); $map = new Map($description);
$tiles = $map->getTiles(); $tiles = $map->getTiles();
$tiles[0]->visit(); $tiles[0]->visit();
$tiles[3]->visit(); $tiles[3]->visit();
$tile = new Tile(1, 2, Tile::REPRESENTS_VOID); $tile = new Tile(1, 2, Tile::REPRESENTS_VOID);
$this->assertEquals($tile, $map->getUnvisitedTile()); $this->assertEquals($tile, $map->getUnvisitedTile());
} }
public function testUnVisitedTiles() { public function testUnVisitedTiles() {
$description = [ $description = [
[1, 0], [1, 0],
[0, 1], [0, 1],
]; ];
$map = new Map($description); $map = new Map($description);
$tiles = $map->getTiles(); $tiles = $map->getTiles();
$tiles[2]->visit(); $tiles[2]->visit();
$tiles[3]->visit(); $tiles[3]->visit();
$tileA = new Tile(1, 1, Tile::REPRESENTS_SPOT); $tileA = new Tile(1, 1, Tile::REPRESENTS_SPOT);
$tileB = new Tile(1, 2, Tile::REPRESENTS_VOID); $tileB = new Tile(1, 2, Tile::REPRESENTS_VOID);
$this->assertEquals([$tileA, $tileB], $map->getUnvisitedTiles()); $this->assertEquals([$tileA, $tileB], $map->getUnvisitedTiles());
} }
public function testDescribedByArray() { public function testDescribedByArray() {
$description = [ $description = [
[1, 0], [1, 0],
[0, 1], [0, 1],
]; ];
$map = new Map($description); $map = new Map($description);
$this->assertEquals($description, $map->describedByArray()); $this->assertEquals($description, $map->describedByArray());
} }
public function testTileByPosition() { public function testTileByPosition() {
$description = [ $description = [
[1, 0], [1, 0],
[0, 1], [0, 1],
]; ];
$map = new Map($description); $map = new Map($description);
$row = 1; $row = 1;
$column = 1; $column = 1;
$position = new Position($row, $column); $position = new Position($row, $column);
$tile = new Tile($row, $column, Tile::REPRESENTS_SPOT); $tile = new Tile($row, $column, Tile::REPRESENTS_SPOT);
$this->assertEquals($tile, $map->getTileByPosition($position)); $this->assertEquals($tile, $map->getTileByPosition($position));
} }
public function testHeight() { public function testHeight() {
$description = [ $description = [
[0, 1, 0, 1], [0, 1, 0, 1],
[1, 0, 0, 0], [1, 0, 0, 0],
[0, 0, 0, 1], [0, 0, 0, 1],
[0, 0, 0, 1] [0, 0, 0, 1]
]; ];
$map = new Map($description); $map = new Map($description);
$this->assertEquals(4, $map->getHeight()); $this->assertEquals(4, $map->getHeight());
} }
public function testWidth() { public function testWidth() {
$description = [ $description = [
[0, 1, 0, 1], [0, 1, 0, 1],
[1, 0, 0, 0], [1, 0, 0, 0],
[0, 0, 0, 1], [0, 0, 0, 1],
[0, 0, 0, 1] [0, 0, 0, 1]
]; ];
$map = new Map($description); $map = new Map($description);
$this->assertEquals(4, $map->getWidth()); $this->assertEquals(4, $map->getWidth());
} }
public function testNeighboursOfTile() { public function testNeighboursOfTile() {
$description = [ $description = [
[0, 1, 0, 1], [0, 1, 0, 1],
[1, 0, 0, 0], [1, 0, 0, 0],
[0, 0, 0, 1], [0, 0, 0, 1],
[0, 0, 0, 1] [0, 0, 0, 1]
]; ];
$map = new Map($description); $map = new Map($description);
$position = new Position(4, 4); $position = new Position(4, 4);
$tile = $map->getTileByPosition($position); $tile = $map->getTileByPosition($position);
$neighbours = [ $neighbours = [
new Tile(4, 3, Tile::REPRESENTS_VOID), new Tile(4, 3, Tile::REPRESENTS_VOID),
new Tile(3, 3, Tile::REPRESENTS_VOID), new Tile(3, 3, Tile::REPRESENTS_VOID),
new Tile(3, 4, Tile::REPRESENTS_SPOT), new Tile(3, 4, Tile::REPRESENTS_SPOT),
]; ];
$this->assertEquals($neighbours, $map->getNeighboursOfTile($tile)); $this->assertEquals($neighbours, $map->getNeighboursOfTile($tile));
} }
// public function testValidPosition() { // public function testValidPosition() {
// $description = [ // $description = [

@ -51,57 +51,57 @@ class PositionTest extends \PHPUnit_Framework_TestCase {
public function testEastPosition() { public function testEastPosition() {
$position = new Position(2, 2); $position = new Position(2, 2);
$northPositionA = $position->getEastPosition(); $northPositionA = $position->getEastPosition();
$NorthPositionB = new Position(2, 3); $northPositionB = new Position(2, 3);
$this->assertTrue($northPositionA->isTheSamePosition($NorthPositionB)); $this->assertTrue($northPositionA->isTheSamePosition($northPositionB));
} }
public function testSouthEastPosition() { public function testSouthEastPosition() {
$position = new Position(2, 2); $position = new Position(2, 2);
$northPositionA = $position->getSouthEastPosition(); $northPositionA = $position->getSouthEastPosition();
$NorthPositionB = new Position(3, 3); $northPositionB = new Position(3, 3);
$this->assertTrue($northPositionA->isTheSamePosition($NorthPositionB)); $this->assertTrue($northPositionA->isTheSamePosition($northPositionB));
} }
public function testSouthPosition() { public function testSouthPosition() {
$position = new Position(2, 2); $position = new Position(2, 2);
$northPositionA = $position->getSouthPosition(); $northPositionA = $position->getSouthPosition();
$NorthPositionB = new Position(3, 2); $northPositionB = new Position(3, 2);
$this->assertTrue($northPositionA->isTheSamePosition($NorthPositionB)); $this->assertTrue($northPositionA->isTheSamePosition($northPositionB));
} }
public function testsSouthWestPosition() { public function testsSouthWestPosition() {
$position = new Position(2, 2); $position = new Position(2, 2);
$northPositionA = $position->getSouthWestPosition(); $northPositionA = $position->getSouthWestPosition();
$NorthPositionB = new Position(3, 1); $northPositionB = new Position(3, 1);
$this->assertTrue($northPositionA->isTheSamePosition($NorthPositionB)); $this->assertTrue($northPositionA->isTheSamePosition($northPositionB));
} }
public function testWestPosition() { public function testWestPosition() {
$position = new Position(2, 2); $position = new Position(2, 2);
$northPositionA = $position->getWestPosition(); $northPositionA = $position->getWestPosition();
$NorthPositionB = new Position(2, 1); $northPositionB = new Position(2, 1);
$this->assertTrue($northPositionA->isTheSamePosition($NorthPositionB)); $this->assertTrue($northPositionA->isTheSamePosition($northPositionB));
} }
public function testNorthWestPosition() { public function testNorthWestPosition() {
$position = new Position(2, 2); $position = new Position(2, 2);
$northPositionA = $position->getNorthWestPosition(); $northPositionA = $position->getNorthWestPosition();
$NorthPositionB = new Position(1, 1); $northPositionB = new Position(1, 1);
$this->assertTrue($northPositionA->isTheSamePosition($NorthPositionB)); $this->assertTrue($northPositionA->isTheSamePosition($northPositionB));
} }
public function testNorthPosition() { public function testNorthPosition() {
$position = new Position(2, 2); $position = new Position(2, 2);
$northPositionA = $position->getNorthPosition(); $northPositionA = $position->getNorthPosition();
$NorthPositionB = new Position(1, 2); $northPositionB = new Position(1, 2);
$this->assertTrue($northPositionA->isTheSamePosition($NorthPositionB)); $this->assertTrue($northPositionA->isTheSamePosition($northPositionB));
} }
public function testOpenSpaceNeighbours() { public function testOpenSpaceNeighbours() {

@ -7,10 +7,10 @@ require __DIR__ . '/../../vendor/autoload.php';
class SpotTest extends \PHPUnit_Framework_TestCase { class SpotTest extends \PHPUnit_Framework_TestCase {
public function testGetPositions() { public function testGetPositions() {
$position = new Position(2, 1); $position = new Position(2, 1);
$spot = new Spot($position); $spot = new Spot($position);
$this->assertEquals([$position], $spot->getPositions()); $this->assertEquals([$position], $spot->getPositions());
} }
} }

@ -14,31 +14,30 @@ class TableTest extends \PHPUnit_Framework_TestCase {
// $this->assertEquals([$spot], $table->getSpots()); // $this->assertEquals([$spot], $table->getSpots());
// } // }
public function testZeroSpotsCount() { public function testZeroSpotsCount() {
$description = [ $description = [
[0, 0], [0, 0],
[0, 0], [0, 0],
]; ];
$map = new Map($description); $map = new Map($description);
$table = new Table($map); $table = new Table($map);
$this->assertEquals(0, $table->getSpotsCount()); $this->assertEquals(0, $table->getSpotsCount());
} }
public function testTwoSingleSpotsCount() { public function testTwoSingleSpotsCount() {
$description = [ $description = [
[0, 1, 0], [0, 1, 0],
[0, 0, 0], [0, 0, 0],
[1, 0, 0], [1, 0, 0],
[0, 0, 0], [0, 0, 0],
]; ];
$map = new Map($description); $map = new Map($description);
$table = new Table($map); $table = new Table($map);
$this->assertEquals(2, $table->getSpotsCount()); $this->assertEquals(2, $table->getSpotsCount());
} }
} }

@ -7,34 +7,34 @@ require __DIR__ . '/../../vendor/autoload.php';
class TileTest extends \PHPUnit_Framework_TestCase { class TileTest extends \PHPUnit_Framework_TestCase {
public function testRepresentingSpot() { public function testRepresentingSpot() {
$tile = new Tile(2, 2, Tile::REPRESENTS_SPOT); $tile = new Tile(2, 2, Tile::REPRESENTS_SPOT);
$this->assertTrue($tile->isRepresentingSpot()); $this->assertTrue($tile->isRepresentingSpot());
} }
public function testRepresentingVoid() { public function testRepresentingVoid() {
$tile = new Tile(2, 2, Tile::REPRESENTS_VOID); $tile = new Tile(2, 2, Tile::REPRESENTS_VOID);
$this->assertTrue($tile->isRepresentingVoid()); $this->assertTrue($tile->isRepresentingVoid());
} }
public function testGetPosition() { public function testGetPosition() {
$row = 2; $row = 2;
$column = 2; $column = 2;
$tile = new Tile($row, $column, Tile::REPRESENTS_VOID); $tile = new Tile($row, $column, Tile::REPRESENTS_VOID);
$position = new Position($row, $column); $position = new Position($row, $column);
$this->assertEquals($position, $tile->getPosition()); $this->assertEquals($position, $tile->getPosition());
} }
public function testIsVisited() { public function testIsVisited() {
$tile = new Tile(2, 2, Tile::REPRESENTS_SPOT); $tile = new Tile(2, 2, Tile::REPRESENTS_SPOT);
$tile->visit(); $tile->visit();
$this->assertTrue($tile->isVisited()); $this->assertTrue($tile->isVisited());
} }
} }

Loading…
Cancel
Save